CVE-2025-38162 netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
An integer overflow in the Linux kernel's netfilter pipapo lookup table allocation can lead to memory corruption or denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38162?
CVE-2025-38162 is a high-severity vulnerability in Linux kernel, published on 3 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
When calculating the lookup table size, ensure the following multiplication does not overflow:
- desc->field_len[] maximum value is U8_MAX multiplied by NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case. - NFT_PIPAPO_BUCKETS(f->bb) is 2^8, worst case. - sizeof(unsigned long), from sizeof(*f->lt), lt in struct nft_pipapo_field.
Then, use check_mul_overflow() to multiply by bucket size and then use check_add_overflow() to the alignment for avx2 (if needed). Finally, add lt_size_check_overflow() helper and use it to consolidate this.
While at it, replace leftover allocation using the GFP_KERNEL to GFP_KERNEL_ACCOUNT for consistency, in pipapo_resize().
Which versions are affected by CVE-2025-38162?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38162?
Apply the vendor's patch.
Is CVE-2025-38162 being exploited?
There is no known exploitation of CVE-2025-38162 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-64583, AZL-70645, BELL-CVE-2025-38162, DEBIAN-CVE-2025-38162, GHSA-r97f-5wrg-fmv7, ROOT-OS-DEBIAN-11-CVE-2025-38162 and 4 more.