Linux カーネルの32ビット環境でBPFの検証が誤り権限を越えて読み書きされる脆弱性
Summary
32ビット版のLinuxカーネルで、BPFの検証器がJSET命令のマスク値を下位32ビットだけで判定するため、実行時と異なる値を前提にして不正な領域へアクセスされるおそれがあります。影響するのは5.0.0以降6.12.119未満、6.13.0以降6.18.65未満、6.19.0以降7.3.6未満のKernelです。修正版は6.12.119、6.18.65、7.3.6で、該当するカーネルは修正版への更新をおすすめします。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
32ビット版のLinuxカーネルで、BPFの検証器がJSET命令のマスク値を下位32ビットだけで判定するため、実行時と異なる値を前提にして不正な領域へアクセスされるおそれがあります。影響するのは5.0.0以降6.12.119未満、6.13.0以降6.18.65未満、6.19.0以降7.3.6未満のKernelです。修正版は6.12.119、6.18.65、7.3.6で、該当するカーネルは修正版への更新をおすすめします。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| LinuxLinux | — | Not listed |
| LinuxKernel |
≥ 5.0.0, < 6.12.119→ 6.12.119 ≥ 6.13.0, < 6.18.65→ 6.18.65 ≥ 6.19.0, < 7.3.6→ 7.3.6 |
6.12.119 6.18.65 7.3.6 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-139320 linux-lts Fix available
- Debian DEBIAN-CVE-2026-139320 linux Fix available
- Ubuntu UBUNTU-CVE-2026-139320 linux-xilinx-zynqmp, linux-xilinx, linux-vmware +166 more No fixed version in this record
Original description The description as published by the source.
In the Linux kernel, the following vulnerability has been resolved:
bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit
In the branch of a BPF_JSET which is taken, the verifier can learn
something about the register only if the mask has a single bit: then this
bit is set. regs_refine_cond_op() tests this with is_power_of_2(val) and
then ORs val into var_off.
val is a u64, but is_power_of_2() takes an unsigned long. On a 32-bit
kernel it only sees the lower half of the mask. For
if r1 & 0xffffffff80000000 goto l
which is a BPF_JSET | BPF_K with an immediate of 0x80000000, the lower
half is a power of two. So the verifier takes all 33 bits for set at l,
while the branch is taken if any of them is. A mask of 0x100000001 from a
register does the same for bit 0.
The log of an i386 kernel, for r6 = bpf_get_prandom_u32() << 31:
3: (45) if r6 & 0x80000000 goto pc+2
from 3 to 6: R6=0xffffffff80000000 R10=fp0
6: (77) r6 >>= 63 ; R6=1
When the program runs, r6 >> 63 is 0.
From then on the verifier works with known bits which the register does
not have at run time. It accepts, for example, an offset into a map value
which it derives from these bits and believes to be constant, and the
program can access memory outside of the map value.
Count the bits of the whole value.
Only 32-bit kernels are affected. On a 64-bit kernel unsigned long holds
the whole mask, and this patch changes nothing.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package git.kernel.org
- REDHAT Red Hat
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web github.com