Linux kernel out-of-bounds write in Rust UML warning handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.647.3.27.4-rc1In the Linux kernel, the following vulnerability has been resolved:
rust: bug: pass TAINT_WARN to warn_slowpath_fmt() on UML
On UML, `warn_flags!` calls `warn_slowpath_fmt()` directly. Its third argument is a taint number, but `warn_on!` passes its bug flags there.
As a result, `add_taint()` gets 2304 instead of 9 (`TAINT_WARN`). The warning is not recorded: `/proc/sys/kernel/tainted` stays 0 after `warn_on!` fires, where it should be 512. It also causes an out-of-bounds write in `add_taint()`.
Pass `TAINT_WARN` directly, as C does on UML.
From the CVE record · Linux
On UML, the Linux kernel's Rust `warn_on!` passes bug flags where `warn_slowpath_fmt()` expects a taint number. When the warning fires, it can cause an out-of-bounds write and leave the warning unrecorded in `/proc/sys/kernel/tainted`. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with UML and Rust warning handling should check their systems; affected versions are not specified.