CVE-2026-31526

bpf: Fix exception exit lock checking for subprogs

No CVSS score yet EPSS 0.13%

Published 22 Apr 2026 Updated 5 Nov 2026 CNA: Linux

Check your servers for CVE-2026-31526

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-31526 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: Fix exception exit lock checking for subprogs

process_bpf_exit_full() passes check_lock = !curframe to check_resource_leak(), which is false in cases when bpf_throw() is called from a static subprog. This makes check_resource_leak() to skip validation of active_rcu_locks, active_preempt_locks, and active_irq_id on exception exits from subprogs.

At runtime bpf_throw() unwinds the stack via ORC without releasing any user-acquired locks, which may cause various issues as the result.

Fix by setting check_lock = true for exception exits regardless of curframe, since exceptions bypass all intermediate frame cleanup. Update the error message prefix to "bpf_throw" for exception exits to distinguish them from normal BPF_EXIT.

Fix reject_subprog_with_rcu_read_lock test which was previously passing for the wrong reason. Test program returned directly from the subprog call without closing the RCU section, so the error was triggered by the unclosed RCU lock on normal exit, not by bpf_throw. Update __msg annotations for affected tests to match the new "bpf_throw" error prefix.

The spin_lock case is not affected because they are already checked [1] at the call site in do_check_insn() before bpf_throw can run.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/bpf/verifier.c?h=v7.0-rc4#n21098

Exploitation

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

The assessment of CISA (SSVC, 5 Nov 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
partial: limited control or limited data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from f18b03fabaa9b7c80e80b72a621f481f0d706ae0, before 4eca06a55417c3b2e538656d12c89e224343653e
affected from f18b03fabaa9b7c80e80b72a621f481f0d706ae0, before c0281da1f2aa5c2fca3a05f79b86bea96591c358
affected from f18b03fabaa9b7c80e80b72a621f481f0d706ae0, before 5a399f3117642494e35545f6ca397d3e177c1f9b
affected from f18b03fabaa9b7c80e80b72a621f481f0d706ae0, before 6c2128505f61b504c79a20b89596feba61388112
Other versions: unaffected
Linux
affected 6.7
unaffected before 6.7
unaffected from 6.12.114 up to and including 6.12.*
unaffected from 6.18.21 up to and including 6.18.*
unaffected from 6.19.11 up to and including 6.19.*
unaffected 7.0 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-31526 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31526

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

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-31526 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.