CVE-2026-139320

bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit

7.8 high EPSS 0.19%

Published 30 Nov 2026 Updated 1 Dec 2026 CNA: Linux

Check your servers for CVE-2026-139320

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139320 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.19%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.63% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 960ea056561a08e2b837b2f02d22c53226414a84, before 5a9a6eb7bad37d72867734dc69f1b99a423cd50a
affected from 960ea056561a08e2b837b2f02d22c53226414a84, before 5cea952976eb9b0b2dcc630dc87e207359b1292f
affected from 960ea056561a08e2b837b2f02d22c53226414a84, before a2c98b2a86b0f7011c9debf249208074bfb9c7f8
affected from 960ea056561a08e2b837b2f02d22c53226414a84, before ee4f44e0e3c8125eebe9ac967b6984bc9253d489
Other versions: unaffected
Linux
affected 5.0
unaffected before 5.0
unaffected from 6.12.119 up to and including 6.12.*
unaffected from 6.18.65 up to and including 6.18.*
unaffected from 7.3.6 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139320 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139320

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-139320
trivy image --scanners vuln IMAGE | grep CVE-2026-139320

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-139320 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.