# CVE-2024-57947: netfilter: nf\_set\_pipapo: fix initial map fill

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.81% (percentile 54, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-01-23T13:54:20.267Z
- **Modified:** 2026-08-05T11:47:01.966Z

## Who should check

- Anyone running Linux \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 957a4d1c4c5849e4515c9fb4db21bf85318103dc; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 9625c46ce6fd4f922595a4b32b1de5066d70464f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 69b6a67f7052905e928d75a0c5871de50e686986; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 8058c88ac0df21239daee54b5934d5c80ca9685f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 791a615b7ad2258c560f91852be54b0480837c93
- Anyone running Linux 5.6

## 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.

## Affected and fixed versions

- Linux: \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 957a4d1c4c5849e4515c9fb4db21bf85318103dc; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 9625c46ce6fd4f922595a4b32b1de5066d70464f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 69b6a67f7052905e928d75a0c5871de50e686986; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 8058c88ac0df21239daee54b5934d5c80ca9685f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 791a615b7ad2258c560f91852be54b0480837c93 (cvelist)
- Linux: 5.6 (cvelist)

## Mitigation

- Upgrade Linux to 791a615b7ad2258c560f91852be54b0480837c93 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-57947. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-57947.md
Affected: Linux >= 3c4287f62044a90e73a561aa05fc46e62da173da, < 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9; >= 3c4287f62044a90e73a561aa05fc46e62da173da, < 957a4d1c4c5849e4515c9fb4db21bf85318103dc; >= 3c4287f62044a90e73a561aa05fc46e62da173da, < 9625c46ce6fd4f922595a4b32b1de5066d70464f; >= 3c4287f62044a90e73a561a…
Fixed in: Linux 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9, Linux 957a4d1c4c5849e4515c9fb4db21bf85318103dc, Linux 9625c46ce6fd4f922595a4b32b1de5066d70464f, Linux 69b6a67f7052905e928d75a0c5871de50e686986, Linux 8058c88ac0df21239daee54b5934d5c80ca9685f, Linux 791a615b7ad2258c560f91852be54b0480837c93

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-57947 being exploited?

There is no confirmed exploitation: CVE-2024-57947 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.81% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-57947?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-57947?

Linux \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 957a4d1c4c5849e4515c9fb4db21bf85318103dc; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 9625c46ce6fd4f922595a4b32b1de5066d70464f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 69b6a67f7052905e928d75a0c5871de50e686986; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 8058c88ac0df21239daee54b5934d5c80ca9685f; \>= 3c4287f62044a90e73a561aa05fc46e62da173da, \< 791a615b7ad2258c560f91852be54b0480837c93; Linux 5.6.

### Is there a fix for CVE-2024-57947?

Yes. Fixed in Linux 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9, Linux 957a4d1c4c5849e4515c9fb4db21bf85318103dc, Linux 9625c46ce6fd4f922595a4b32b1de5066d70464f, Linux 69b6a67f7052905e928d75a0c5871de50e686986, Linux 8058c88ac0df21239daee54b5934d5c80ca9685f, Linux 791a615b7ad2258c560f91852be54b0480837c93. Upgrade Linux to 791a615b7ad2258c560f91852be54b0480837c93 or later.

### How do I check if I'm affected by CVE-2024-57947?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>
- other: <https://git.kernel.org/stable/c/77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-57947>

HTML: <https://flawdb.com/CVE-2024-57947> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-57947>
