🇰🇷 한글 설명
Linux 커널의 netfilter nf_tables 구성 요소에서 발생하는 Use-After-Free(UAF) 취약점입니다. 테이블 삭제 시 테이블을 먼저 연결 해제하지 않아, 병렬로 진행되는 읽기 작업이 이미 해제된 메모리 영역에 접근할 수 있는 문제가 있습니다.
💡 쉬운 설명
컴퓨터가 데이터를 지우는 도중에 다른 프로그램이 그 데이터를 읽으려고 시도하여 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_tables: unlink table before deleting it
syzbot reports following UAF:
BUG: KASAN: use-after-free in memcmp+0x18f/0x1c0 lib/string.c:955
nla_strcmp+0xf2/0x130 lib/nlattr.c:836
nft_table_lookup.part.0+0x1a2/0x460 net/netfilter/nf_tables_api.c:570
nft_table_lookup net/netfilter/nf_tables_api.c:4064 [inline]
nf_tables_getset+0x1b3/0x860 net/netfilter/nf_tables_api.c:4064
nfnetlink_rcv_msg+0x659/0x13f0 net/netfilter/nfnetlink.c:285
netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2504
Problem is that all get operations are lockless, so the commit_mutex
held by nft_rcv_nl_event() isn't enough to stop a parallel GET request
from doing read-accesses to the table object even after synchronize_rcu().
To avoid this, unlink the table first and store the table objects in
on-stack scratch space.
📍 영향받는 시스템
Linux kernel (netfilter nf_tables 구성 요소가 포함된 버전)
⚔️ 공격 벡터
로컬 공격자가 특수하게 조작된 Netlink 메시지를 전송하여 커널 메모리 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 보안 공지(CVE-2021-47394)와 대조하여 확인합니다.