# CVE-2026-139628: bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2026-11-30T13:36:30.474Z
- Modified: 2026-11-30T14:19:45.847Z
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from e63985ecd22681c7f5975f2e8637187a326b6791 before bc6c4dc3d16d64bd51fa9e8629e0db199bf857be; from e63985ecd22681c7f5975f2e8637187a326b6791 before 6d256cd19d8c9fe49ece8a398ff78e55719626ee; from e63985ecd22681c7f5975f2e8637187a326b6791 before b31fef1d42ddcce4670e172eb9a381fcddbd051c; from e63985ecd22681c7f5975f2e8637187a326b6791 before 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c; 6.9 (not affected: before 6.9; from 6.12.119 up to 6.12.*; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

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

## Sources

- CVE List: [CVE-2026-139628](https://www.cve.org/CVERecord?id=CVE-2026-139628), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139628](https://nvd.nist.gov/vuln/detail/CVE-2026-139628), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139628 · Whole record: https://cve.day/CVE-2026-139628.json · Rebuilt by cve.day 2026-11-30T14:33:12.229Z
