CVE-2024-57947

netfilter: nf_set_pipapo: fix initial map fill

9.8 critical EPSS 0.45%

Published 23 Jan 2025 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-57947

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-57947 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

9.8 critical CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
low: an attack works without special conditions
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.45%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 40.5% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 77bf0c4ab928ca4c9a99311f4f70ba0c17fecba9
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 957a4d1c4c5849e4515c9fb4db21bf85318103dc
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 9625c46ce6fd4f922595a4b32b1de5066d70464f
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 69b6a67f7052905e928d75a0c5871de50e686986
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 8058c88ac0df21239daee54b5934d5c80ca9685f
affected from 3c4287f62044a90e73a561aa05fc46e62da173da, before 791a615b7ad2258c560f91852be54b0480837c93
Other versions: unaffected
Linux
affected 5.6
unaffected before 5.6
unaffected from 5.10.247 up to and including 5.10.*
unaffected from 5.15.165 up to and including 5.15.*
unaffected from 6.1.103 up to and including 6.1.*
unaffected from 6.6.44 up to and including 6.6.*
unaffected from 6.10.3 up to and including 6.10.*
unaffected 6.11 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-57947 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-57947

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-57947
trivy image --scanners vuln IMAGE | grep CVE-2024-57947

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-57947 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.