CVE-2026-139304

bpf: Check the maps that sleepable callbacks use

No CVSS score yet EPSS 0.19%

Published 30 Nov 2026 Updated 30 Nov 2026 CNA: Linux

Check your servers for CVE-2026-139304

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-139304 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: Check the maps that sleepable callbacks use

Sleepable programs can only use the kinds of map that do without an RCU read side critical section. check_map_prog_compatibility() sees to that when a map is bound to the program, and asks whether the program is sleepable. That misses the bpf_wq or bpf_task_work callback of a program that is not, which runs sleepable all the same, and it misses an inner map, which is not bound.

The bpf_wq callback of a tc program that looks a key up in a sockhash gets as far as

WARNING: net/core/sock_map.c:903 at __sock_hash_lookup_elem+0x18f/0x1e0

Ask the same question for the map that is handed to a helper in sleepable context, unless the RCU read lock is held: by bpf_rcu_read_lock(), or by the helper that runs the callback, as bpf_for_each_map_elem() does for a hash map. Programs that take the lock go on working. Disabled preemption or interrupts are not enough, since the maps ask for rcu_read_lock_held(). The other parts of the program may use such a map as before.

A global function that is called with preemption or interrupts disabled is verified for the non-sleepable context, in which nothing is known of all that. Verify it for a context of its own: not sleepable, and without the RCU read lock. It differs in what maps can be used, and in nothing else.

What is refused from now on runs into the warning above, or uses what the map frees behind a plain RCU grace period: an entry of a devmap, of a perf event array or of a cgroup array.

A bloom filter does without RCU. Add it to the list, so that callbacks which use one go on loading. As a side effect sleepable programs can use bloom filters as well.

A pointer to the value of a devmap which a program keeps beyond bpf_rcu_read_unlock() is not dealt with here.

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 9.06% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 638e4b825d523bed7a55e776c153049fb7716466, before 9f13a653c21d5efb99c44b7adc3fa9005b20c442
affected from 638e4b825d523bed7a55e776c153049fb7716466, before 3e6d7522af2cd1b8bf135ee7df6ca962986f44d6
Other versions: unaffected
Linux
affected 5.12
unaffected before 5.12
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-139304 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139304

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-139304
trivy image --scanners vuln IMAGE | grep CVE-2026-139304

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-139304 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.