🇰🇷 한글 설명
Linux 커널 netfilter nf_tables의 set 테이블 만료 시 RCU 동기화 없이 요소를 제거하는 경합 조건 취약성으로, RCU 리더가 이미 해제된 메모리에 접근하여 커널 패닉 또는 정보 유출을 야기할 수 있습니다.
💡 쉬운 설명
리눅스 커널의 네트워크 필터 코드에서 동시에 메모리 정리 시 삭제된 데이터에 접근하는 버그입니다. 로컬 공격자가 대량의 필터 규칙 추가로 이를 악용해 시스템 충돌이나 정보 유출을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: unconditionally bump set->nelems before insertion
In case that the set is full, a new element gets published then removed
without waiting for the RCU grace period, while RCU reader can be
walking over it already.
To address this issue, add the element transaction even if set is full,
but toggle the set_full flag to report -ENFILE so the abort path safely
unwinds the set to its previous state.
As for element updates, decrement set->nelems to restore it.
A simpler fix is to call synchronize_rcu() in the error path.
However, with a large batch adding elements to already maxed-out set,
this could cause noticeable slowdown of such batches.
📍 영향받는 시스템
Linux kernel 5.10 이상 (CONFIG_NF_TABLES=y 활성화된 모든 배포판)
⚔️ 공격 벡터
로컬 권한 없음 - 네트워크 필터 규칙을 대량 추가하여 set 테이블 오버플로우 트리거
🛡️ 대응 방법
최신 커널 패치 업데이트 (set->nelems 무조건 증가 후 set_full 플래그로 안전하게 처리)
🔧 검증 코드
CONFIG_NF_TABLES=y이면 취약함 - 커널 업데이트 필요, n 또는 미설정이면 안전함
cat /boot/config-$(uname -r) 2>/dev/null | grep CONFIG_NF_TABLES= && uname -r