CVE-2026-99487: rust: bug: pass TAINT_WARN to warn_slowpath_fmt() on UML
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In 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.
The Linux kernel CVE team has assigned CVE-2026-99487 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.17 with commit dff64b072708ffef23c117fa1ee1ea59eb417807 and fixed in 6.18.64 with commit 8a16e766cf58c26d5aa5e41cc88e649e9cd97157 Issue introduced in 6.17 with commit dff64b072708ffef23c117fa1ee1ea59eb417807 and fixed in 7.3.2 with commit e05c740e7536fbd5dd85b437eea50f39e45fc87d Issue introduced in 6.17 with commit dff64b072708ffef23c117fa1ee1ea59eb417807 and fixed in 7.4-rc1 with commit 951d09ca450ca76a695016ea76c3fa653bd20439
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99487
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
rust/kernel/bug.rs
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8a16e766cf58c26d5aa5e41cc88e649e9cd97157 https://git.kernel.org/stable/c/e05c740e7536fbd5dd85b437eea50f39e45fc87d https://git.kernel.org/stable/c/951d09ca450ca76a695016ea76c3fa653bd20439