AI + Rust = More Backdoors

The speaker warns that the combination of AI-generated code and the Rust programming language creates an environment ripe for undetectable backdoors, due to increased unknown code contributions, rapid integration, and compiler trust vulnerabilities. While acknowledging the benefits of these technologies, they emphasize the need for vigilance and caution to prevent subtle security exploits in software development.

In recent months, AI code generation has dramatically improved, leading to widespread adoption across both open-source and closed-source projects, including major ones like the Linux kernel and Marci Linux. These organizations are leveraging AI to accelerate development and produce code more efficiently. Simultaneously, the Rust programming language is gaining traction and becoming more viable for various projects. Despite these advancements, the speaker expresses significant concerns about the combination of AI-generated code and Rust, arguing that this pairing creates an ideal environment for introducing undetectable backdoors and vulnerabilities into software.

The speaker outlines four key objectives a malicious actor would pursue to insert hidden backdoors effectively. First, they would aim to increase the volume of code contributed by unknown parties, making it harder to scrutinize every line. AI code generation and Rust crates contribute to this by flooding projects with large amounts of code that no one on the team may have written or fully understands. Second, they would seek to accelerate the pace at which new, unreviewed code is introduced, overwhelming code reviewers and making thorough examination nearly impossible. The rapid influx of AI-generated code into projects like the Linux kernel exemplifies this challenge.

Third, the speaker highlights the risk associated with compiler trust, referencing Ken Thompson’s famous “trusting trust” attack, where a self-replicating backdoor was embedded in a C compiler. Since Rust’s compiler is primarily built using itself, this creates a similar vulnerability where a malicious backdoor could persist undetected through compiler updates. The existence of a single dominant compiler for Rust exacerbates this risk, making it easier for such backdoors to propagate without detection.

The combination of these factors—massive unknown code contributions, rapid code integration, and compiler trust issues—creates a perfect storm for malicious actors to exploit. The speaker warns that while AI code generation and Rust have technical merits and are improving, their widespread adoption increases the likelihood of backdoors and subtle exploits becoming more common. This is not a matter of fearmongering but a realistic assessment based on historical precedents and current technological trends.

In conclusion, the speaker urges caution and awareness about the potential security implications of relying heavily on AI-generated code and Rust. They acknowledge the benefits of these technologies but emphasize the need to remain vigilant against the risks they introduce. The talk ends with a call to support independent tech journalism and a lighthearted promotion of the speaker’s subscription service, underscoring the importance of discussing these critical issues openly.