# CVE-2024-57947: netfilter: nf_set_pipapo: fix initial map fill

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2025-01-23T13:54:20.267Z
- Modified: 2026-08-05T11:47:01.966Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

netfilter: nf_set_pipapo: fix initial map fill

The initial buffer has to be inited to all-ones, but it must restrict
it to the size of the first field, not the total field size.

After each round in the map search step, the result and the fill map
are swapped, so if we have a set where f->bsize of the first element
is smaller than m->bsize_max, those one-bits are leaked into future
rounds result map.

This makes pipapo find an incorrect matching results for sets where
first field size is not the largest.

Followup patch adds a test case to nft_concat_range.sh selftest script.

Thanks to Stefano Brivio for pointing out that we need to zero out
the remainder explicitly, only correcting memset() argument isn't enough.

(As written by CVE List.)

## Affected

- Linux Linux: from 3c4287f62044a90e73a561aa05fc46e62da173da before 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9; from 3c4287f62044a90e73a561aa05fc46e62da173da before 957a4d1c4c5849e4515c9fb4db21bf85318103dc; from 3c4287f62044a90e73a561aa05fc46e62da173da before 9625c46ce6fd4f922595a4b32b1de5066d70464f; from 3c4287f62044a90e73a561aa05fc46e62da173da before 69b6a67f7052905e928d75a0c5871de50e686986; from 3c4287f62044a90e73a561aa05fc46e62da173da before 8058c88ac0df21239daee54b5934d5c80ca9685f; from 3c4287f62044a90e73a561aa05fc46e62da173da before 791a615b7ad2258c560f91852be54b0480837c93; 5.6 (not affected: before 5.6; from 5.10.247 up to 5.10.*; from 5.15.165 up to 5.15.*; from 6.1.103 up to 6.1.*; from 6.6.44 up to 6.6.*; from 6.10.3 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: from 5.6 before 5.15.165; from 5.16 before 6.1.103; from 6.2 before 6.6.44; from 6.7 before 6.10.3

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9>
- <https://git.kernel.org/stable/c/957a4d1c4c5849e4515c9fb4db21bf85318103dc> (patch)
- <https://git.kernel.org/stable/c/9625c46ce6fd4f922595a4b32b1de5066d70464f> (patch)
- <https://git.kernel.org/stable/c/69b6a67f7052905e928d75a0c5871de50e686986> (patch)
- <https://git.kernel.org/stable/c/8058c88ac0df21239daee54b5934d5c80ca9685f> (patch)
- <https://git.kernel.org/stable/c/791a615b7ad2258c560f91852be54b0480837c93> (patch)

## Sources

- CVE List: [CVE-2024-57947](https://www.cve.org/CVERecord?id=CVE-2024-57947), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-57947](https://nvd.nist.gov/vuln/detail/CVE-2024-57947), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-57947 · Whole record: https://cve.day/CVE-2024-57947.json · Rebuilt by cve.day 2026-11-25T22:58:51.198Z
