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

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

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.

ProductVersions
Linux Linuxe63985ecd22681c7f5975f2e8637187a326b6791 to before bc6c4dc3d16d64bd51fa9e8629e0db199bf857be Affectede63985ecd22681c7f5975f2e8637187a326b6791 to before 6d256cd19d8c9fe49ece8a398ff78e55719626ee Affectede63985ecd22681c7f5975f2e8637187a326b6791 to before b31fef1d42ddcce4670e172eb9a381fcddbd051c Affectede63985ecd22681c7f5975f2e8637187a326b6791 to before 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c Affected
Linux Linux6.9 Affectedbefore 6.9 Not Affected6.12.119 through 6.12.* Not Affected6.18.65 through 6.18.* Not Affected7.3.6 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.