bpf: Fix ld_{abs,ind} failure path analysis in subprogs
- 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.10.265, 5.15.216, 6.1.183, 6.6.148, 6.12.101, and 2 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: Fix ld_{abs,ind} failure path analysis in subprogs Usage of ld_{abs,ind} instructions got extended into subprogs some time ago via commit 09b28d76eac4 ("bpf: Add abnormal return checks."). These are only allowed in subprograms when the latter are BTF annotated and have scalar return types. The code generator in bpf_gen_ld_abs() has an abnormal exit path (r0=0 + exit) from legacy cBPF times. While the enforcement is on scalar return types, the verifier must also simulate the path of abnormal exit if the packet data load via ld_{abs,ind} failed. This is currently not the case. Fix it by having the verifier simulate both success and failure paths, and extend it in similar ways as we do for tail calls. The success path (r0=unknown, continue to next insn) is pushed onto stack for later validation and the r0=0 and return to the caller is done on the fall-through side.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in 928d354ae3557e8f755a227e67be88034eb3cd7f; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in 8a800497d9f6c2ec9c2c1ba7b71d0ac2ea7f7bbe; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in de1055e7f9e67af32b1f3376066272b04e5223c0; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in 37ad2bb11e9de92cb7b94548705eeedd87f7d392; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in 8674e2db06cff6b50f2216eed9a761d15425bb34; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in ce01a4e5cfac7adbe0be565f90cd32ecbb2f8337; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in d846d83bdacbd8f14fc45c63b8c1d22608452e1c; From 09b28d76eac48e922dc293da1aa2b2b85c32aeee · fixed in ee861486e377edc55361c08dcbceab3f6b6577bd
- Linux Linux
5.10
- KernelLinux
From 5.10.0 · fixed in 5.10.265; From 5.11.0 · fixed in 5.15.216; From 5.16.0 · fixed in 6.1.183; From 6.2.0 · fixed in 6.6.148; From 6.7.0 · fixed in 6.12.101; From 6.13.0 · fixed in 6.18.42; From 6.19.0 · fixed in 7.0.10
References 8
git.kernel.org
- stable/c/928d354ae3557e8f755a227e67be88034eb3cd7f
- stable/c/8a800497d9f6c2ec9c2c1ba7b71d0ac2ea7f7bbe
- stable/c/de1055e7f9e67af32b1f3376066272b04e5223c0
- stable/c/37ad2bb11e9de92cb7b94548705eeedd87f7d392
- stable/c/8674e2db06cff6b50f2216eed9a761d15425bb34
- stable/c/ce01a4e5cfac7adbe0be565f90cd32ecbb2f8337
- stable/c/d846d83bdacbd8f14fc45c63b8c1d22608452e1c
- stable/c/ee861486e377edc55361c08dcbceab3f6b6577bd