🇰🇷 한글 설명
Linux 커널의 netfilter 구성 요소 중 nft_set_pipapo_avx2 모듈에서 AVX2 가속 기능을 사용할 때 발생하는 취약점입니다. 만료된 항목을 처리하는 과정에서 마스킹 오류로 인해 잘못된 데이터를 반환하여 요소 충돌 오류를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 아주 빠르게 처리하기 위해 사용하는 특수 기능(AVX2)에서 계산 실수가 발생하여, 이미 삭제된 데이터를 아직 있는 것으로 착각하는 문제입니다. 이로 인해 네트워크 규칙을 설정할 때 충돌 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
AVX2 명령어를 사용하는 CPU 환경의 Linux 커널 (netfilter/nftables 사용 시스템)
⚔️ 공격 벡터
로컬 사용자가 특수하게 조작된 nftables 규칙을 로드하여 커널의 데이터 처리 오류를 유발할 수 있음
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 보안 업데이트 버전인지 배포판 보안 공지를 통해 확인하십시오.