CVE-2025-38162: netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftsetpipapo: prevent overflow in lookup table allocation
When calculating the lookup table size, ensure the following multiplication does not overflow:
- desc->fieldlen[] maximum value is U8MAX multiplied by NFTPIPAPOGROUPSPERBYTE(f) that can be 2, worst case. - NFTPIPAPOBUCKETS(f->bb) is 2^8, worst case. - sizeof(unsigned long), from sizeof(f->lt), lt in struct nftpipapofield.
Then, use checkmuloverflow() to multiply by bucket size and then use checkaddoverflow() to the alignment for avx2 (if needed). Finally, add ltsizecheckoverflow() helper and use it to consolidate this.
While at it, replace leftover allocation using the GFPKERNEL to GFPKERNELACCOUNT for consistency, in pipaporesize().
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38162?
The severity of CVE-2025-38162 is classified as medium due to the potential for memory overflow issues.
How do I fix CVE-2025-38162?
To fix CVE-2025-38162, update your Linux kernel to the latest version where this vulnerability has been patched.
What systems are affected by CVE-2025-38162?
CVE-2025-38162 affects the Linux kernel, particularly systems that rely on the netfilter subsystem.
What is the impact of CVE-2025-38162?
The impact of CVE-2025-38162 includes the risk of denial of service or potential remote code execution due to memory allocation overflow.
When was CVE-2025-38162 reported?
CVE-2025-38162 was reported in 2025 and is related to vulnerabilities discovered in the Linux kernel.