CVE-2026-72428: bpf: Fix stack slot index in nospec checks
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix stack slot index in nospec checks
check_stack_write_fixed_off() computes the byte slot for a fixed-offset stack write as -off - 1, and records each written byte in slot_type[] with (slot - i) % BPF_REG_SIZE.
The Spectre v4 sanitization pre-check uses slot_type[i] instead. For a 4-byte write at fp-8 after the lower half of fp-8 has been zeroed, the pre-check scans bytes 0..3 and sees STACK_ZERO while the actual write updates bytes 7..4. That can leave the second half-slot write without nospec_result even though the bytes being overwritten still require sanitization.
Use the same slot index in the sanitization pre-check that the write path uses when updating slot_type[].
The Linux kernel CVE team has assigned CVE-2026-72428 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.10.56 with commit 0e9280654aa482088ee6ef3deadef331f5ac5fb0 and fixed in 5.10.261 with commit e62268e695075a481a6c4feeb022c19cf57422a6 Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 5.15.212 with commit a71eb8f730a91271cf47ce291e785b6b7e54622f Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 6.1.178 with commit ca119656baa8f48a56e0c2f3ab63fdd33ca9e307 Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 6.6.145 with commit 475405593de2b796224c6297aece44f321195919 Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 6.12.97 with commit f1471aa76d74e0df3b2a90731ca0208f498c670b Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 6.18.40 with commit 68b41e68a62299f26cb16af422b5c7d1c69dafd9 Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 7.1.5 with commit db8f1dcf5950b91886b9df4270bc816370d292c1 Issue introduced in 5.14 with commit 2039f26f3aca5b0e419b98f65dd36481337b86ee and fixed in 7.2-rc1 with commit d1d53aa30ab3b5ae89161c9cc840b3f7489ad386 Issue introduced in 4.19.207 with commit 872968502114d68c21419cf7eb5ab97717e7b803 Issue introduced in 5.4.146 with commit f5893af2704eb763eb982f01d573f5b19f06b623 Issue introduced in 5.13.8 with commit 0b27bdf02c400684225ee5ee99970bcbf5082282
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-72428
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:
kernel/bpf/verifier.c
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/e62268e695075a481a6c4feeb022c19cf57422a6 https://git.kernel.org/stable/c/a71eb8f730a91271cf47ce291e785b6b7e54622f https://git.kernel.org/stable/c/ca119656baa8f48a56e0c2f3ab63fdd33ca9e307 https://git.kernel.org/stable/c/475405593de2b796224c6297aece44f321195919 https://git.kernel.org/stable/c/f1471aa76d74e0df3b2a90731ca0208f498c670b https://git.kernel.org/stable/c/68b41e68a62299f26cb16af422b5c7d1c69dafd9 https://git.kernel.org/stable/c/db8f1dcf5950b91886b9df4270bc816370d292c1 https://git.kernel.org/stable/c/d1d53aa30ab3b5ae89161c9cc840b3f7489ad386