CVE-2025-38162 (GCVE-0-2025-38162)
Vulnerability from cvelistv5
Published
2025-07-03 08:36
Modified
2025-07-28 04:13
Severity ?
VLAI Severity ?
EPSS score ?
Summary
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().
References
Impacted products
{ "containers": { "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Linux", "programFiles": [ "net/netfilter/nft_set_pipapo.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "lessThan": "c1360ac8156c0a3f2385baef91d8d26fd9d39701", "status": "affected", "version": "3c4287f62044a90e73a561aa05fc46e62da173da", "versionType": "git" }, { "lessThan": "43fe1181f738295624696ae9ff611790edb65b5e", "status": "affected", "version": "3c4287f62044a90e73a561aa05fc46e62da173da", "versionType": "git" }, { "lessThan": "4c5c6aa9967dbe55bd017bb509885928d0f31206", "status": "affected", "version": "3c4287f62044a90e73a561aa05fc46e62da173da", "versionType": "git" } ] }, { "defaultStatus": "affected", "product": "Linux", "programFiles": [ "net/netfilter/nft_set_pipapo.c" ], "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "vendor": "Linux", "versions": [ { "status": "affected", "version": "5.6" }, { "lessThan": "5.6", "status": "unaffected", "version": "0", "versionType": "semver" }, { "lessThanOrEqual": "6.12.*", "status": "unaffected", "version": "6.12.34", "versionType": "semver" }, { "lessThanOrEqual": "6.15.*", "status": "unaffected", "version": "6.15.3", "versionType": "semver" }, { "lessThanOrEqual": "*", "status": "unaffected", "version": "6.16", "versionType": "original_commit_for_fix" } ] } ], "cpeApplicability": [ { "nodes": [ { "cpeMatch": [ { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.12.34", "versionStartIncluding": "5.6", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.15.3", "versionStartIncluding": "5.6", "vulnerable": true }, { "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionEndExcluding": "6.16", "versionStartIncluding": "5.6", "vulnerable": true } ], "negate": false, "operator": "OR" } ] } ], "descriptions": [ { "lang": "en", "value": "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()." } ], "providerMetadata": { "dateUpdated": "2025-07-28T04:13:55.195Z", "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux" }, "references": [ { "url": "https://git.kernel.org/stable/c/c1360ac8156c0a3f2385baef91d8d26fd9d39701" }, { "url": "https://git.kernel.org/stable/c/43fe1181f738295624696ae9ff611790edb65b5e" }, { "url": "https://git.kernel.org/stable/c/4c5c6aa9967dbe55bd017bb509885928d0f31206" } ], "title": "netfilter: nft_set_pipapo: prevent overflow in lookup table allocation", "x_generator": { "engine": "bippy-1.2.0" } } }, "cveMetadata": { "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "assignerShortName": "Linux", "cveId": "CVE-2025-38162", "datePublished": "2025-07-03T08:36:03.731Z", "dateReserved": "2025-04-16T04:51:23.990Z", "dateUpdated": "2025-07-28T04:13:55.195Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1", "vulnerability-lookup:meta": { "nvd": "{\"cve\":{\"id\":\"CVE-2025-38162\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-07-03T09:15:31.617\",\"lastModified\":\"2025-07-03T15:13:53.147\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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().\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: netfilter: nft_set_pipapo: evitar el desbordamiento en la asignaci\u00f3n de la tabla de b\u00fasqueda Al calcular el tama\u00f1o de la tabla de b\u00fasqueda, aseg\u00farese de que la siguiente multiplicaci\u00f3n no se desborde: - desc-\u0026gt;field_len[] el valor m\u00e1ximo es U8_MAX multiplicado por NFT_PIPAPO_GROUPS_PER_BYTE(f) que puede ser 2, en el peor de los casos. - NFT_PIPAPO_BUCKETS(f-\u0026gt;bb) es 2^8, en el peor de los casos. - sizeof(unsigned long), de sizeof(*f-\u0026gt;lt), lt en struct nft_pipapo_field. Luego, use check_mul_overflow() para multiplicar por el tama\u00f1o del dep\u00f3sito y luego use check_add_overflow() para la alineaci\u00f3n de avx2 (si es necesario). Finalmente, agregue el ayudante lt_size_check_overflow() y \u00faselo para consolidar esto. Mientras tanto, reemplace la asignaci\u00f3n restante usando GFP_KERNEL a GFP_KERNEL_ACCOUNT para mantener la consistencia, en pipapo_resize().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/43fe1181f738295624696ae9ff611790edb65b5e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4c5c6aa9967dbe55bd017bb509885928d0f31206\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c1360ac8156c0a3f2385baef91d8d26fd9d39701\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}" } }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…