🇰🇷 한글 설명
리눅스 커널의 netfilter nf_conntrack_helper 모듈에서 unregister 과정 중 helper 포인터를 NULL로 전달하여 기대값(expectation)이 제대로 삭제되지 않는 취약점이 발견되었습니다. 이로 인해 helper 객체가 해제된 후에도 참조가 남아 있어, 이후 접근 시 Use-After-Free(UAF) 오류가 발생합니다.
💡 쉬운 설명
프로그램이 사용 중인 데이터를 삭제할 때, 연결된 정보들을 먼저 정리해야 하는데 이 과정을 건너뛰고 데이터만 먼저 지워버리는 문제입니다. 이로 인해 시스템이 이미 사라진 데이터를 다시 읽으려다 오류가 발생하거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_helper: pass helper to expect cleanup
nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy()
to remove expectations belonging to the helper being unregistered.
However, it passes NULL instead of the helper pointer as the data
argument, so expect_iter_me() never matches any expectation and all
of them survive the cleanup.
After unregister returns, nfnl_cthelper_del() frees the helper
object immediately. Subsequent expectation dumps or packet-driven
init_conntrack() calls then dereference the freed exp->helper,
causing a use-after-free.
Pass the actual helper pointer so expectations referencing it are
properly destroyed before the helper object is freed.
BUG: KASAN: slab-use-after-free in string+0x38f/0x430
Read of size 1 at addr ffff888003b14d20 by task poc/103
Call Trace:
string+0x38f/0x430
vsnprintf+0x3cc/0x1170
seq_printf+0x17a/0x240
exp_seq_show+0x2e5/0x560
seq_read_iter+0x419/0x1280
proc_reg_read+0x1ac/0x270
vfs_read+0x179/0x930
ksys_read+0xef/0x1c0
Freed by task 103:
The buggy address is located 32 bytes inside of
freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)
📍 영향받는 시스템
Linux kernel (netfilter/nf_conntrack_helper 관련 모듈 사용 시스템)
⚔️ 공격 벡터
helper unregister를 유도하는 네트워크 설정 변경 또는 특정 패킷 전송을 통한 Use-After-Free 유발
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 nf_conntrack_helper의 cleanup 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인합니다.