Buffer overflow in Linux kernel powerpc BPF JIT for large programs
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Partial Red Hat: 5 without a fix
No CVSS vector from any source. Fix status from CNA and Red Hat.
Summary
The Linux kernel from 5.18 has a buffer overflow in the powerpc BPF JIT compiler when it compiles large BPF programs. The size calculation leaves out part of the inline exit epilogue, so later code generation writes past the end of the allocated buffer and corrupts adjacent memory.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
Description from the CNA
In the Linux kernel, the following vulnerability has been resolved: powerpc/bpf: fix buffer overflow in JIT for large BPF programs During size calculation in pass-0, exit_addr is 0 since addrs[fp->len] is not yet populated. bpf_jit_emit_exit_insn() treats a zero exit_addr as in-range and skips bpf_jit_build_epilogue(), so the alternate inline epilogue instructions are not counted in alloclen. In later passes, if the real exit_addr falls outside the 32MB branch range, the full inline epilogue is emitted into the already-allocated buffer, writing past its end and corrupting adjacent memory. Fix by ensuring exit_addr is non-zero before treating it as in-range, so pass-0 always falls through to bpf_jit_build_epilogue() and conservatively accounts for all epilogue instructions in alloclen. Also range check alt_exit_addr directly in the else-if condition. Since exit_addr handling now falls through to the epilogue, two related issues in bpf_int_jit_compile() must also be addressed: 1. Reset cgctx.alt_exit_addr before the second size-calculation pass. Without this, a stale alt_exit_addr from the first pass causes the second pass to emit a single jump instead of the full epilogue, undercounting alloclen and reintroducing the overflow. 2. Recompute addrs[fp->len] at the end of each code-generation pass. The larger pass-0 body can shrink in later passes as out-of-range exits settle into in-range jumps; a stale addrs[fp->len] would leave exit branches targeting past the real (shrunken) epilogue. Because shrinkage in a later pass can move the epilogue offset, the fixed two-pass loop is no longer sufficient: an exit that was out of range in an earlier pass may fall in range once the epilogue offset shrinks, shrinking the body further and overwriting the start of the epilogue. Convert the code-generation loop to iterate until the program size converges, bounded by CODEGEN_MAX_PASSES, and fail the JIT if it does not converge.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update the Linux kernel to 6.1.193, 6.6.163, 6.12.118, 6.18.64, 7.3.4 or 7.4-rc1, matching your release branch. Red Hat lists Red Hat Enterprise Linux 8, 9 and 10 and Red Hat OpenShift Container Platform 4 and 5 as affected, with plan none available.
Written with Claude Haiku 5.5 from the sources below · 2026-12-01
- Fix · CNA Linux (Linux) Fixed in 6.1.193, 6.6.163, 6.12.118, 6.18.64, 7.3.4, 7.4-rc1
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 4 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 5 | Affected | No fix yet: Fix deferred |
Not affected: 3 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat OpenShift Container Platform 4
Timeline
- 2026-11-30 Threatist record created from CVE-2026-138941
- 2026-11-30 Alias added: GHSA-8fqm-85x3-hvrr
- 2026-12-01 Affected versions changed · Red Hat
- 2026-12-01 CVSS score added · Red Hat
References
Other 6
- https://git.kernel.org/stable/c/b17348a6187b348bc30b74dbc207b98c72dd7b26
- https://git.kernel.org/stable/c/033a1e4f56c29b4244d4f504f4b7704dfefa7afd
- https://git.kernel.org/stable/c/5d79818c18172beedb9e1121496ee15bd195ff93
- https://git.kernel.org/stable/c/3b9710e1d312bf0c3b48e1e1f121255ff3346e25
- https://git.kernel.org/stable/c/0e7ec5fe2fc914e611cd0f9cfeb76a17ffbf5d6f
- https://git.kernel.org/stable/c/78ce55b7913a78e1687306668e078b86bc6508ee
More Linux vulnerabilities
- TI-2025-26358 Zero-length TLS records mishandled on rx_list in Linux kernel KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 Out-of-bounds write in Linux kernel ebtables SNAT ARP rewrite KEVCVSS 3.1HIGH 8.8
- TI-2021-02452 Overlayfs flaw in Linux kernel lets attackers gain elevated privileges KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 Missing address checks in Linux kernel get_user and put_user on ARM KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Heap overflow in Linux kernel lets local users escalate privileges KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 Wrong integer type in Linux kernel perf_swevent_init KEVCVSS 3.1HIGH 8.4
Sources
- CVE-2026-138941 · CVE Program
- CVE-2026-138941 · NVD
- GHSA-8fqm-85x3-hvrr · GitHub Advisory Database · CC BY 4.0
- CVE-2026-138941 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences