CVE-2025-22087: bpf: Fix array bounds error with may_goto
In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix array bounds error with maygoto
maygoto uses an additional 8 bytes on the stack, which causes the interpreters[] array to go out of bounds when calculating index by stacksize.
1. If a BPF program is rewritten, re-evaluate the stack size. For non-JIT cases, reject loading directly.
2. For non-JIT cases, calculating interpreters[idx] may still cause out-of-bounds array access, and just warn about it.
3. For jitrequested cases, the execution of bpffunc also needs to be warned. So move the definition of function bpfprogret0warn out of the macro definition CONFIGBPFJITALWAYSON.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-22087?
CVE-2025-22087 has been assessed as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-22087?
To fix CVE-2025-22087, update your Linux kernel to the latest version that includes the patch addressing this vulnerability.
What systems are affected by CVE-2025-22087?
CVE-2025-22087 affects various versions of the Linux kernel where BPF programs are utilized.
What type of vulnerability is CVE-2025-22087?
CVE-2025-22087 is an array bounds error vulnerability that affects the BPF implementation in the Linux kernel.
Is there a known exploit for CVE-2025-22087?
As of now, there are no public exploits available for CVE-2025-22087.