netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.258, 5.15.209, 6.1.175, 6.6.136, 6.12.83, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry New test case fails unexpectedly when avx2 matching functions are used. The test first loads a ranomly generated pipapo set with 'ipv4 . port' key, i.e. nft -f foo. This works. Then, it reloads the set after a flush: (echo flush set t s; cat foo) | nft -f - This is expected to work, because its the same set after all and it was already loaded once. But with avx2, this fails: nft reports a clashing element. The reported clash is of following form: We successfully re-inserted a . b c . d Then we try to insert a . d avx2 finds the already existing a . d, which (due to 'flush set') is marked as invalid in the new generation. It skips the element and moves to next. Due to incorrect masking, the skip-step finds the next matching element only considering the first field, i.e. we return the already reinserted "a . b", even though the last field is different and the entry should not have been matched. No such error is reported for the generic c implementation (no avx2) or when the last field has to use the 'nft_pipapo_avx2_lookup_slow' fallback. Bisection points to 7711f4bb4b36 ("netfilter: nft_set_pipapo: fix range overlap detection") but that fix merely uncovers this bug. Before this commit, the wrong element is returned, but erronously reported as a full, identical duplicate. The root-cause is too early return in the avx2 match functions. When we process the last field, we should continue to process data until the entire input size has been consumed to make sure no stale bits remain in the map.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in f8c39983fc9c1a978c82e6f2df7bfba8a8561587; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in c7babe2f28b507e17f28e9f753b7caec72d4857f; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in 1c43f0dd8691ddf8884793b481ddc7511cf593c3; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in fa4f1f52528c73989d820f32bfca06bec5afeece; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in 3d53f9aafd469ae1ea27051e00f5b96ca1b55d52; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in 07de44424bb7f17ef9357e8535df96d9e97c40cb; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in 0abbc43f71d99baadeeba6fa3fe1c80b676f57ed; From 7400b063969bdca4a06cd97f1294d765c8eecbe1 · fixed in d3c0037ffe1273fa1961e779ff6906234d6cf53c
- Linux Linux
5.7
- KernelLinux
From 5.7.0 · fixed in 5.10.258; From 5.11.0 · fixed in 5.15.209; From 5.16.0 · fixed in 6.1.175; From 6.2.0 · fixed in 6.6.136; From 6.7.0 · fixed in 6.12.83; From 6.13.0 · fixed in 6.18.24; From 6.19.0 · fixed in 6.19.14
References 8
git.kernel.org
- stable/c/f8c39983fc9c1a978c82e6f2df7bfba8a8561587
- stable/c/c7babe2f28b507e17f28e9f753b7caec72d4857f
- stable/c/1c43f0dd8691ddf8884793b481ddc7511cf593c3
- stable/c/fa4f1f52528c73989d820f32bfca06bec5afeece
- stable/c/3d53f9aafd469ae1ea27051e00f5b96ca1b55d52
- stable/c/07de44424bb7f17ef9357e8535df96d9e97c40cb
- stable/c/0abbc43f71d99baadeeba6fa3fe1c80b676f57ed
- stable/c/d3c0037ffe1273fa1961e779ff6906234d6cf53c