{"id":"CVE-2025-38162","summary":"netfilter: nft_set_pipapo: prevent overflow in lookup table allocation","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnetfilter: nft_set_pipapo: prevent overflow in lookup table allocation\n\nWhen calculating the lookup table size, ensure the following\nmultiplication does not overflow:\n\n- desc-\u003efield_len[] maximum value is U8_MAX multiplied by\n  NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case.\n- NFT_PIPAPO_BUCKETS(f-\u003ebb) is 2^8, worst case.\n- sizeof(unsigned long), from sizeof(*f-\u003elt), lt in\n  struct nft_pipapo_field.\n\nThen, use check_mul_overflow() to multiply by bucket size and then use\ncheck_add_overflow() to the alignment for avx2 (if needed). Finally, add\nlt_size_check_overflow() helper and use it to consolidate this.\n\nWhile at it, replace leftover allocation using the GFP_KERNEL to\nGFP_KERNEL_ACCOUNT for consistency, in pipapo_resize().","modified":"2026-04-24T06:42:50.481257353Z","published":"2025-07-03T08:36:03.731Z","related":["SUSE-SU-2025:02853-1","SUSE-SU-2025:02923-1","SUSE-SU-2025:02969-1","SUSE-SU-2025:02996-1","SUSE-SU-2025:02997-1","SUSE-SU-2025:03011-1","SUSE-SU-2025:03023-1","SUSE-SU-2025:20577-1","SUSE-SU-2025:20586-1","SUSE-SU-2025:20601-1","SUSE-SU-2025:20602-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38162.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/43fe1181f738295624696ae9ff611790edb65b5e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4c5c6aa9967dbe55bd017bb509885928d0f31206"},{"type":"WEB","url":"https://git.kernel.org/stable/c/91edc076439c9e2f34b176149f1c84a47a8ec32f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a9e757473561da93c6a4136f0e59aba91ec777fc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c1360ac8156c0a3f2385baef91d8d26fd9d39701"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38162.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38162"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3c4287f62044a90e73a561aa05fc46e62da173da"},{"fixed":"91edc076439c9e2f34b176149f1c84a47a8ec32f"},{"fixed":"a9e757473561da93c6a4136f0e59aba91ec777fc"},{"fixed":"c1360ac8156c0a3f2385baef91d8d26fd9d39701"},{"fixed":"43fe1181f738295624696ae9ff611790edb65b5e"},{"fixed":"4c5c6aa9967dbe55bd017bb509885928d0f31206"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38162.json"}}],"schema_version":"1.7.5"}