CVE-2025-40159
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: xsk: Harden userspace-supplied xdp_desc validation Turned out certain clearly invalid values passed in xdp_desc from userspace can pass xp_{,un}aligned_validate_desc() and then lead to UBs or just invalid frames to be queued for xmit. desc->len close to ``U32_MAX`` with a non-zero pool->tx_metadata_len can cause positive integer overflow and wraparound, the same way low enough desc->addr with a non-zero pool->tx_metadata_len can cause negative integer overflow. Both scenarios can then pass the validation successfully. This doesn't happen with valid XSk applications, but can be used to perform attacks. Always promote desc->len to ``u64`` first to exclude positive overflows of it. Use explicit check_{add,sub}_overflow() when validating desc->addr (which is ``u64`` already). bloat-o-meter reports a little growth of the code size: add/remove: 0/0 grow/shrink: 2/1 up/down: 60/-16 (44) Function old new delta xskq_cons_peek_desc 299 330 +31 xsk_tx_peek_release_desc_batch 973 1002 +29 xsk_generic_xmit 3148 3132 -16 but hopefully this doesn't hurt the performance much.
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 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 in the Linux kernel involves improper validation of userspace-supplied xdp_desc structures. Specifically, certain invalid values in xdp_desc can bypass validation functions, leading to undefined behaviors or invalid frames being queued for transmission. The issue arises from integer overflow and wraparound when desc->len is close to U32_MAX or desc->addr is low, combined with a non-zero tx_metadata_len. This can allow attackers to exploit the kernel by passing malformed descriptors that should have been rejected.


How can this vulnerability impact me? :

This vulnerability can lead to undefined behavior in the Linux kernel, such as processing invalid network frames or triggering kernel memory issues. An attacker could exploit this to cause system instability, crashes, or potentially execute further attacks by injecting malformed data into the kernel's networking stack.


What immediate steps should I take to mitigate this vulnerability?

Apply the patch or update to the Linux kernel version that includes the fix for this vulnerability, which hardens userspace-supplied xdp_desc validation by promoting desc->len to u64 and using explicit overflow checks. Avoid running untrusted XSk applications that may supply invalid xdp_desc values.


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