CVE-2026-90300: bpf: Clear buf on error in __bpf_get_task_stack
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
bpf: Clear buf on error in __bpf_get_task_stack
Both bpf_get_task_stack and bpf_get_task_stack_sleepable helpers that use __bpf_get_task_stack have buf defined as ARG_PTR_TO_UNINIT_MEM argument and we should initialize the buf on every return path.
Adding missing buf memset for __bpf_get_task_stack fail paths. This provides deterministic buffer contents, which is useful when the buffer is used directly as a map key.
The Linux kernel CVE team has assigned CVE-2026-90300 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.12 with commit 06ab134ce8ecfa5a69e850f88f81c8a4c3fa91df and fixed in 7.2.6 with commit f523359c4789bb0396d2d642464a6e2fd4f2299d Issue introduced in 5.12 with commit 06ab134ce8ecfa5a69e850f88f81c8a4c3fa91df and fixed in 7.3-rc1 with commit f5d242825ca417bb6afe35fde6e8880f97ca43fb Issue introduced in 5.10.30 with commit d921baabd96445ef9c9c9410ca06164359c8a1a5 Issue introduced in 5.11.14 with commit 9c020a533eaae1c2d41a7e3835c4c818a9b4b656 Issue introduced in 5.10.96 with commit ff6bdc205fd0a83bd365405d4e31fb5905826996
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-90300
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/stackmap.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/f523359c4789bb0396d2d642464a6e2fd4f2299d https://git.kernel.org/stable/c/f5d242825ca417bb6afe35fde6e8880f97ca43fb