---
id: 10203
lang: en
title: "Greg Kroah-Hartman: Rust Can Shield Linux from the Risks of AI-Generated Code"
published_at: "2026-05-29 15:57:19"
source_name: "ZDNet AI"
source_url: "https://www.zdnet.com/article/rust-will-save-linux-from-ai-says-greg-kroah-hartman/"
canonical_url: "https://news.hamidun.com/en/news/10203"
categories: ["ethics"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Greg Kroah-Hartman: Rust Can Shield Linux from the Risks of AI-Generated Code

> **Краткая суть (BLUF):** Greg Kroah-Hartman, a Linux kernel maintainer, considers Rust key to the system's security. The language helps avoid an entire class of vulnerabilities, particularly in the context of AI-generated code, which he sees as the main new threat to critical systems.  He is clear that Rust is not magic. It is a pragmatic way to eliminate a whole category of bugs.

Greg Kroah-Hartman, the stable maintainer of the Linux kernel, considers Rust critically important for the operating system's future security. He stresses, however, that Rust is not magic but a pragmatic solution for eliminating an entire class of vulnerabilities.

## Rust in the Linux kernel

Rust has been working its way into the Linux kernel source code for several years, and the integration is accelerating. Kroah-Hartman sees this as a strategic necessity, not a fad. Rust lets developers write systems code with much stronger safety guarantees than C, the language in which most of the kernel is written.

## Protection against AI vulnerabilities

The new threat is code generated by neural networks. When ChatGPT or other LLMs write functions for Linux, they often contain classic bugs: buffer overflows, use-after-free, race conditions. Human review does not always catch them. Rust, by contrast, simply will not compile such code: the language forces the developer to rewrite dangerous constructs.

That does not mean AI code will be perfect. But a whole class of the most serious vulnerabilities, which in C code require painstaking code review, simply will not compile in Rust.

## How it works

Rust achieves safety through several mechanisms:

- **Ownership and borrowing**: a system that guarantees memory is always managed safely
- **No null pointers**: Rust has no null pointers; an Option type is used instead
- **Type system**: strict typing catches logic errors at compile time
- **Panic instead of undefined behavior**: instead of silently corrupting memory, Rust panics and logs the error

All this means an entire class of vulnerabilities is simply impossible in Rust. Not because the language is magical, but because its design forces the developer to think about security from the start.

> "Rust forces you to write correct code on the first try" is the principle in the community, and it is exactly what Linux needs.

## Scale of the integration

Kroah-Hartman is not talking about rewriting the entire kernel in Rust. That is unrealistic and unnecessary. Instead, the strategy is to gradually add new subsystems in Rust where it matters most: drivers, file systems, network stacks. The old C code will live alongside them, but the new components will benefit from the language.

## What this means

Integrating Rust into Linux is not a philosophical choice but a practical response to new threats. AI-generated code will not go away; it will be increasingly embedded in development. Linux, as the foundation of the internet and of critical systems, must protect itself: not from all errors (that is impossible), but from the most dangerous ones. Rust, though not perfect, gives Linux a powerful tool for that protection.

---
- **Первоисточник:** [ZDNet AI](https://www.zdnet.com/article/rust-will-save-linux-from-ai-says-greg-kroah-hartman/)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/10203
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
