CVE-2025-38162
netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
Reported by linux · Published July 3, 2025
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().
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-tools | Amazon Linux | 6.12.35-55.103.amzn2023 |
| kernel-modules-extra | Amazon Linux | 1:6.1.148-173.267.amzn2023 |
| kernel-libbpf-devel | Amazon Linux | 6.12.35-55.103.amzn2023 |
| perf6.12 | Amazon Linux | 6.12.35-55.103.amzn2023 |
| kernel-modules-extra-common | Amazon Linux | 6.12.35-55.103.amzn2023 |
| kernel-devel | Amazon Linux | 6.12.35-55.103.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 6.12.35-55.103.amzn2023 |
| bpftool | Amazon Linux | 6.12.35-55.103.amzn2023 |
| linux_kernel | linux | 6.15.3, 6.12.34 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3c4287f62044a90e73a561aa05fc46e62da173da, 3c4287f62044a90e73a561aa05fc46e62da173da, 3c4287f62044a90e73a561aa05fc46e62da173da |
| Linux | Linux | 5.6, 0, 6.1.167 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.7, 3.1.6, 3.1.5 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | 3.1.7, 3.1.5, 3.1.6 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | bpftool | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.6, 3.1.7, 3.1.5 |
| linux | linux_kernel | 5.6, 5.6, 5.6 |
| amazon:2023 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| Linux | Linux | 6.16, 3c4287f62044a90e73a561aa05fc46e62da173da, 3c4287f62044a90e73a561aa05fc46e62da173da |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) | 3.1.6, 3.1.7, 3.1.5 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel6.12 | 0 |
…and 12 more
Timeline
- Jul 2, 2025 CVE Published
- Jul 3, 2025 EPSS Score (30 in total, the first dated here)
- Oct 12, 2025 PoC Published (7 in total, the first dated here)
- Mar 25, 2026 CVE Updated
- Mar 29, 2026 Distribution Patch (224 in total, the first dated here)
- Mar 29, 2026 Security Advisory (238 in total, the first dated here)
- Jun 9, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-38162
vulnetix vdb fixes CVE-2025-38162
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-38162/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart