CVE-2025-40169
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-11-12

Last updated on: 2025-11-12

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject negative offsets for ALU ops When verifying BPF programs, the check_alu_op() function validates instructions with ALU operations. The 'offset' field in these instructions is a signed 16-bit integer. The existing check 'insn->off > 1' was intended to ensure the offset is either 0, or 1 for BPF_MOD/BPF_DIV. However, because 'insn->off' is signed, this check incorrectly accepts all negative values (e.g., -1). This commit tightens the validation by changing the condition to '(insn->off != 0 && insn->off != 1)'. This ensures that any value other than the explicitly permitted 0 and 1 is rejected, hardening the verifier against malformed BPF programs.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-11-12
Last Modified
2025-11-12
Generated
2026-05-07
AI Q&A
2025-11-13
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is in the Linux kernel's BPF (Berkeley Packet Filter) verifier. The check_alu_op() function validates ALU operation instructions, specifically their 'offset' field, which is a signed 16-bit integer. The original check intended to allow only offsets of 0 or 1, but due to the signed nature of the offset, it incorrectly accepted negative values like -1. This flaw could allow malformed BPF programs with invalid negative offsets to pass verification. The fix changes the validation to explicitly reject any offset other than 0 or 1, improving security by preventing malformed instructions.


How can this vulnerability impact me? :

This vulnerability could allow malformed BPF programs with invalid negative offsets to be accepted by the verifier, potentially leading to unexpected behavior or exploitation within the Linux kernel. Such malformed programs might be used to bypass security checks or cause kernel instability, which could impact system security and reliability.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart