5.5
MEDIUM CVSS 3.1
CVE-2026-31526
bpf: Fix exception exit lock checking for subprogs
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

INFO

Published Date :

April 22, 2026, 2:16 p.m.

Last Modified :

Nov. 11, 2026, 11:10 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-31526 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 MEDIUM [email protected]
Solution
Update the Linux kernel to fix BPF exception handling and lock validation issues.
  • Apply the kernel patch for the bpf: Fix exception exit lock checking.
  • Update related tests and error messages.
  • Ensure RCU and spin lock checks are validated.
References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-31526 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-31526 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-31526 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-31526 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Nov. 11, 2026

    Action Type Old Value New Value
    Added Translation Title: Linux Kernel, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: bpf: Corrección de la comprobación de bloqueo en salida por excepción para subprogs process_bpf_exit_full() pasa check_lock = !curframe a check_resource_leak(), lo cual es falso en casos cuando se llama a bpf_throw() desde un subprog estático. Esto hace que check_resource_leak() omita la validación de active_rcu_locks, active_preempt_locks y active_irq_id en salidas por excepción desde subprogs. En tiempo de ejecución, bpf_throw() desenrolla la pila a través de ORC sin liberar ningún bloqueo adquirido por el usuario, lo cual puede causar varios problemas como resultado. Solución estableciendo check_lock = true para salidas por excepción independientemente de curframe, ya que las excepciones omiten toda la limpieza de marcos intermedios. Actualizar el prefijo del mensaje de error a ’bpf_throw’ para salidas por excepción para distinguirlas de un BPF_EXIT normal. Corrección de la prueba reject_subprog_with_rcu_read_lock que anteriormente pasaba por la razón equivocada. El programa de prueba regresó directamente de la llamada al subprog sin cerrar la sección RCU, por lo que el error fue activado por el bloqueo RCU no cerrado en una salida normal, no por bpf_throw. Actualizar las anotaciones __msg para las pruebas afectadas para que coincidan con el nuevo prefijo de error ’bpf_throw’. El caso spin_lock no se ve afectado porque ya se comprueban [1] en el sitio de llamada en do_check_insn() antes de que bpf_throw pueda ejecutarse. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/bpf/verifier.c?h=v7.0-rc4#n21098
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Nov. 05, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-31526', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-05T21:37:35.566566Z'}
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Oct. 21, 2026

    Action Type Old Value New Value
    Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/31xxx/CVE-2026-31526.json">CVE-2026-31526</a>
    Added Reference https://git.kernel.org/stable/c/4eca06a55417c3b2e538656d12c89e224343653e
    Added Reference https://git.kernel.org/stable/c/5a399f3117642494e35545f6ca397d3e177c1f9b
    Added Reference https://git.kernel.org/stable/c/6c2128505f61b504c79a20b89596feba61388112
    Added Reference https://git.kernel.org/stable/c/c0281da1f2aa5c2fca3a05f79b86bea96591c358
    Removed Reference https://git.kernel.org/stable/c/5a399f3117642494e35545f6ca397d3e177c1f9b
    Removed Reference https://git.kernel.org/stable/c/6c2128505f61b504c79a20b89596feba61388112
    Removed Reference https://git.kernel.org/stable/c/c0281da1f2aa5c2fca3a05f79b86bea96591c358
    Removed Reference Type https://git.kernel.org/stable/c/5a399f3117642494e35545f6ca397d3e177c1f9b Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/6c2128505f61b504c79a20b89596feba61388112 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/c0281da1f2aa5c2fca3a05f79b86bea96591c358 Types: Patch
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 17, 2026

    Action Type Old Value New Value
    Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'f18b03fabaa9b7c80e80b72a621f481f0d706ae0', 'lessThan': 'c0281da1f2aa5c2fca3a05f79b86bea96591c358', 'versionType': 'git'}, {'status': 'affected', 'version': 'f18b03fabaa9b7c80e80b72a621f481f0d706ae0', 'lessThan': '5a399f3117642494e35545f6ca397d3e177c1f9b', 'versionType': 'git'}, {'status': 'affected', 'version': 'f18b03fabaa9b7c80e80b72a621f481f0d706ae0', 'lessThan': '6c2128505f61b504c79a20b89596feba61388112', 'versionType': 'git'}], 'programFiles': ['kernel/bpf/verifier.c', 'tools/testing/selftests/bpf/progs/exceptions_fail.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '6.7'}, {'status': 'unaffected', 'version': '0', 'lessThan': '6.7', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.18.21', 'versionType': 'semver', 'lessThanOrEqual': '6.18.*'}, {'status': 'unaffected', 'version': '6.19.11', 'versionType': 'semver', 'lessThanOrEqual': '6.19.*'}, {'status': 'unaffected', 'version': '7.0', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['kernel/bpf/verifier.c', 'tools/testing/selftests/bpf/progs/exceptions_fail.c'], 'defaultStatus': 'affected'}]
  • Initial Analysis by [email protected]

    Apr. 28, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
    Added CWE CWE-667
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.19 up to (excluding) 6.19.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.18.21
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/5a399f3117642494e35545f6ca397d3e177c1f9b Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/6c2128505f61b504c79a20b89596feba61388112 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/c0281da1f2aa5c2fca3a05f79b86bea96591c358 Types: Patch
  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Apr. 22, 2026

    Action Type Old Value New Value
    Added 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
    Added Reference https://git.kernel.org/stable/c/5a399f3117642494e35545f6ca397d3e177c1f9b
    Added Reference https://git.kernel.org/stable/c/6c2128505f61b504c79a20b89596feba61388112
    Added Reference https://git.kernel.org/stable/c/c0281da1f2aa5c2fca3a05f79b86bea96591c358
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.