bpf,fork: wipe ->bpf_storage before bailouts that access it
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.217, 6.1.184, 6.6.145, 6.12.97, 6.18.40, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf,fork: wipe ->bpf_storage before bailouts that access it Currently, copy_process() can bail out to free_task() before p->bpf_storage has been initialized, with this call graph (shown here for the !CONFIG_MEMCG case): copy_process dup_task_struct arch_dup_task_struct [copies the entire task_struct, including ->bpf_storage member] [RLIMIT_NPROC check fails] delayed_free_task free_task bpf_task_storage_free rcu_dereference(task->bpf_storage) bpf_local_storage_destroy In this case, the nascent task's ->bpf_storage member that bpf_local_storage_destroy() operates on is a plain copy of the parent's ->bpf_storage pointer, not a real initialized pointer. This leads to badness (kernel hangs, UAF). This is reachable as long as the process calling fork() has been inserted into a task storage map.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in 7df67a4799067a59e6a2d53f8059a6be6e73e678; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in aff686efd38728e06daf12417a0d7ed454ce4cff; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in c3fd6f28c7ce1142a3b23dbb840eaa4777de1d74; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in 9cff220ddb65b022cc668bb652200742476e744c; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in c4f626ddf2350652ad2f79daf1f10847f3f6eabd; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in 43f0005f81b8ce3be962d653cde8db9022f1e9b0; From a10787e6d58c24b51e91c19c6d16c5da89fcaa4b · fixed in 9b51a6155d14389876916726430da30eabb1d4ed
- Linux Linux
5.13
- KernelLinux
From 5.13.0 · fixed in 5.15.217; From 5.16.0 · fixed in 6.1.184; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5
References 7
git.kernel.org
- stable/c/7df67a4799067a59e6a2d53f8059a6be6e73e678
- stable/c/aff686efd38728e06daf12417a0d7ed454ce4cff
- stable/c/c3fd6f28c7ce1142a3b23dbb840eaa4777de1d74
- stable/c/9cff220ddb65b022cc668bb652200742476e744c
- stable/c/c4f626ddf2350652ad2f79daf1f10847f3f6eabd
- stable/c/43f0005f81b8ce3be962d653cde8db9022f1e9b0
- stable/c/9b51a6155d14389876916726430da30eabb1d4ed