🇰🇷 한글 설명
Linux 커널의 netfilter nf_tables 구성 요소에서 루프 감지 로직의 결함으로 인해 무한 재귀가 발생하여 시스템이 충돌할 수 있는 취약점입니다. 기존의 루프 감지 방식이 스택 오버플로우를 유발할 수 있어, 이를 개선하기 위해 검증 로직을 최적화하고 관련 코드를 제거하여 문제를 해결했습니다.
💡 쉬운 설명
네트워크 규칙을 처리하는 과정에서 잘못된 규칙이 입력될 경우 컴퓨터의 메모리 공간이 넘쳐 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 규칙을 검사하는 방식을 더 효율적이고 안전한 방법으로 바꾸어 이 문제를 해결했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: prefer nft_chain_validate
nft_chain_validate already performs loop detection because a cycle will
result in a call stack overflow (ctx->level >= NFT_JUMP_STACK_SIZE).
It also follows maps via ->validate callback in nft_lookup, so there
appears no reason to iterate the maps again.
nf_tables_check_loops() and all its helper functions can be removed.
This improves ruleset load time significantly, from 23s down to 12s.
This also fixes a crash bug. Old loop detection code can result in
unbounded recursion:
BUG: TASK stack guard page was hit at ....
Oops: stack guard page: 0000 [#1] PREEMPT SMP KASAN
CPU: 4 PID: 1539 Comm: nft Not tainted 6.10.0-rc5+ #1
[..]
with a suitable ruleset during validation of register stores.
I can't see any actual reason to attempt to check for this from
nft_validate_register_store(), at this point the transaction is still in
progress, so we don't have a full picture of the rule graph.
For nf-next it might make sense to either remove it or make this depend
on table->validate_state in case we could catch an error earlier
(for improved error reporting to userspace).
📍 영향받는 시스템
Linux kernel (nf_tables 구성 요소가 포함된 버전)
⚔️ 공격 벡터
특수하게 조작된 nftables 규칙 세트를 로드하여 커널 스택 오버플로우 및 시스템 충돌 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 최신 패치 버전인지 확인