# CVE-2026-139628: bpf: Adjust bpf\_func to account for CFI offset in bpf\_jit\_free on riscv

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:36:30.474Z
- **Modified:** 2026-11-30T14:19:45.847Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker could trigger an invalid memory free in the Linux kernel's BPF JIT on RISC-V when CFI is enabled, because bpf\_jit\_free fetches the wrong header pointer.

## Who should check

- Anyone running Linux \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< bc6c4dc3d16d64bd51fa9e8629e0db199bf857be; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 6d256cd19d8c9fe49ece8a398ff78e55719626ee; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< b31fef1d42ddcce4670e172eb9a381fcddbd051c; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c
- Anyone running Linux 6.9

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

## Affected and fixed versions

- Linux: \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< bc6c4dc3d16d64bd51fa9e8629e0db199bf857be; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 6d256cd19d8c9fe49ece8a398ff78e55719626ee; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< b31fef1d42ddcce4670e172eb9a381fcddbd051c; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c (cvelist)
- Linux: 6.9 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-139628. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139628.md
Affected: Linux >= e63985ecd22681c7f5975f2e8637187a326b6791, < bc6c4dc3d16d64bd51fa9e8629e0db199bf857be; >= e63985ecd22681c7f5975f2e8637187a326b6791, < 6d256cd19d8c9fe49ece8a398ff78e55719626ee; >= e63985ecd22681c7f5975f2e8637187a326b6791, < b31fef1d42ddcce4670e172eb9a381fcddbd051c; >= e63985ecd22681c7f5975f2…
Fixed in: Linux 6d256cd19d8c9fe49ece8a398ff78e55719626ee, Linux 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-139628 being exploited?

There is no confirmed exploitation: CVE-2026-139628 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139628?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139628?

Linux \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< bc6c4dc3d16d64bd51fa9e8629e0db199bf857be; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 6d256cd19d8c9fe49ece8a398ff78e55719626ee; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< b31fef1d42ddcce4670e172eb9a381fcddbd051c; \>= e63985ecd22681c7f5975f2e8637187a326b6791, \< 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c; Linux 6.9.

### Is there a fix for CVE-2026-139628?

Yes. Fixed in Linux 6d256cd19d8c9fe49ece8a398ff78e55719626ee, Linux 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c. Upgrade Linux to 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c or later.

### How do I check if I'm affected by CVE-2026-139628?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/bc6c4dc3d16d64bd51fa9e8629e0db199bf857be>
- other: <https://git.kernel.org/stable/c/6d256cd19d8c9fe49ece8a398ff78e55719626ee>
- other: <https://git.kernel.org/stable/c/b31fef1d42ddcce4670e172eb9a381fcddbd051c>
- other: <https://git.kernel.org/stable/c/93df8ae3267f19bf0c1135d26a0e21145dd0ea1c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-139628>

HTML: <https://flawdb.com/CVE-2026-139628> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-139628>
