CVE-2026-139628

bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv

Published Nov 30, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv

When CFI is enabled, the actual BPF program entry point is shifted
forward by a CFI preamble. During bpf_jit_free(), this shifted pointer
causes the wrong ro_header to be fetched, leading to a potential invalid
memory free.

Fix this by subtracting cfi_get_offset() from prog->bpf_func to
correctly restore the original JITed allocation address before freeing.

Analysis

AI-generated

Technical impact

In the Linux kernel, CFI preambles shift BPF program entry points on RISC‑V. The bpf_jit_free routine incorrectly calculates the program address and frees the wrong block, which can corrupt memory or crash the kernel. The vulnerability is a memory management flaw that allows an attacker to trigger a kernel panic or achieve denial of service, and may support privilege escalation if the crash is exploitable. The flaw is associated with CWE-763.

Affected Systems

All Linux kernel distributions running on RISC‑V hardware are affected. The issue is present in any kernel version before the upstream patch that adjusts the BPF function pointer offset when CFI is enabled.

Risk and Exploitability

No EPSS score or KEV listing is available, and the CVSS score is 4.4; therefore the exact exploitation likelihood is unknown. The flaw likely requires local access to load a malicious BPF program, but the resulting kernel crash or memory corruption offers a high impact to confidentiality, integrity, and availability of the host. The lack of public exploit evidence suggests moderate to low exploitation risk under generic conditions, but the severity of a kernel crash warrants close attention.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the kernel to a release that includes the bpf_cfi_offset patch, which corrects the free address calculation.
  • If the system cannot be updated immediately, disable BPF JIT compilation or CFI for BPF programs to avoid invoking the vulnerable routine.
  • Consider storing a local backup of critical services and monitoring for crash events to mitigate potential denial of service while remediation is pending.

Generated by OpenCVE AI on December 1, 2026 at 13:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-763
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv When CFI is enabled, the actual BPF program entry point is shifted forward by a CFI preamble. During bpf_jit_free(), this shifted pointer causes the wrong ro_header to be fetched, leading to a potential invalid memory free. Fix this by subtracting cfi_get_offset() from prog->bpf_func to correctly restore the original JITed allocation address before freeing.
Title bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-763

    Release of Invalid Pointer or Reference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM