🇰🇷 한글 설명
Linux 커널의 nexthop 구성 요소에서 nh_res_bucket_migrate() 함수가 초기화되지 않은 netlink_ext_ack 구조체를 전달하는 취약점이 발견되었습니다. 메모리 할당 실패 시 초기화되지 않은 스택 메모리를 참조하여 커널 패닉이나 일반 보호 오류(GPF)를 유발할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 메모리를 정리하는 과정 중, 준비되지 않은 데이터를 잘못 읽어 시스템이 갑자기 멈추거나 꺼질 수 있는 문제입니다. 이는 주로 시스템 자원이 부족할 때 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nexthop: initialize extack in nh_res_bucket_migrate()
nh_res_bucket_migrate() passes an uninitialized netlink_ext_ack to
call_nexthop_res_bucket_notifiers(). When
nh_notifier_res_bucket_info_init() fails (e.g. the kzalloc returns
-ENOMEM), the error is propagated back before any notifier sets
extack._msg, and the error path formats the stale pointer with
pr_err_ratelimited("%s\n", extack._msg). With CONFIG_INIT_STACK_NONE
this dereferences uninitialized stack memory:
Oops: general protection fault, probably for non-canonical address ...
KASAN: maybe wild-memory-access in range [...]
RIP: 0010:string (lib/vsprintf.c:730)
vsnprintf (lib/vsprintf.c:2945)
_printk (kernel/printk/printk.c:2504)
nh_res_bucket_migrate (net/ipv4/nexthop.c:1816)
nh_res_table_upkeep (net/ipv4/nexthop.c:1866)
rtm_new_nexthop (net/ipv4/nexthop.c:3323)
rtnetlink_rcv_msg (net/core/rtnetlink.c:7076)
netlink_sendmsg (net/netlink/af_netlink.c:1900)
Kernel panic - not syncing: Fatal exception
Zero-initialize extack so _msg is NULL on error paths that never set it.
📍 영향받는 시스템
Linux kernel (nexthop 관련 모듈 사용 시스템)
⚔️ 공격 벡터
로컬 공격자가 Netlink 메시지를 통해 메모리 할당 실패를 유도하여 커널 패닉을 일으키는 방식
🛡️ 대응 방법
커널 패치를 적용하여 nh_res_bucket_migrate() 함수 내 extack 구조체를 0으로 초기화해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인합니다.