CVE-2024-57947

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-57947
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-57947.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-57947
Downstream
Related
Published
2025-01-23T13:54:20.267Z
Modified
2025-11-28T02:34:56.528466Z
Summary
netfilter: nf_set_pipapo: fix initial map fill
Details

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

netfilter: nfsetpipapo: 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 nftconcatrange.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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57947.json"
}
References

Affected packages

Git / 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
957a4d1c4c5849e4515c9fb4db21bf85318103dc
Fixed
9625c46ce6fd4f922595a4b32b1de5066d70464f
Fixed
69b6a67f7052905e928d75a0c5871de50e686986
Fixed
8058c88ac0df21239daee54b5934d5c80ca9685f
Fixed
791a615b7ad2258c560f91852be54b0480837c93

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.6.0
Fixed
5.15.165
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.103
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.44
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.10.3