🔍 CVE-2024-50257

7.0
CVSS Score
HIGH
2024-11-09
2026-08-04 11:21
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 netfilter 구성 요소 중 ip6table_nat 모듈에서 발생하는 Use-After-Free(UAF) 취약점입니다. 모듈이 언로드되는 과정과 get_info() 함수가 동시에 실행될 때 참조 횟수(refcnt) 관리에 오류가 발생하여 메모리 오류를 유발할 수 있습니다.

💡 쉬운 설명

컴퓨터의 네트워크 기능을 담당하는 부품이 삭제되는 도중에 다른 프로그램이 해당 부품을 사용하려고 시도하면서 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 예기치 않게 종료될 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: netfilter: Fix use-after-free in get_info() ip6table_nat module unload has refcnt warning for UAF. call trace is: WARNING: CPU: 1 PID: 379 at kernel/module/main.c:853 module_put+0x6f/0x80 Modules linked in: ip6table_nat(-) CPU: 1 UID: 0 PID: 379 Comm: ip6tables Not tainted 6.12.0-rc4-00047-gc2ee9f594da8-dirty #205 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:module_put+0x6f/0x80 Call Trace: <TASK> get_info+0x128/0x180 do_ip6t_get_ctl+0x6a/0x430 nf_getsockopt+0x46/0x80 ipv6_getsockopt+0xb9/0x100 rawv6_getsockopt+0x42/0x190 do_sock_getsockopt+0xaa/0x180 __sys_getsockopt+0x70/0xc0 __x64_sys_getsockopt+0x20/0x30 do_syscall_64+0xa2/0x1a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Concurrent execution of module unload and get_info() trigered the warning. The root cause is as follows: cpu0 cpu1 module_exit //mod->state = MODULE_STATE_GOING ip6table_nat_exit xt_unregister_template kfree(t) //removed from templ_list getinfo() t = xt_find_table_lock list_for_each_entry(tmpl, &xt_templates[af]...) if (strcmp(tmpl->name, name)) continue; //table not found try_module_get list_for_each_entry(t, &xt_net->tables[af]...) return t; //not get refcnt module_put(t->me) //uaf unregister_pernet_subsys //remove table from xt_net list While xt_table module was going away and has been removed from xt_templates list, we couldnt get refcnt of xt_table->me. Check module in xt_net->tables list re-traversal to fix it.

📍 영향받는 시스템

Linux kernel (ip6table_nat 모듈을 사용하는 버전, 특히 6.12.0-rc4 근처 버전)

⚔️ 공격 벡터

로컬 공격자가 모듈 언로드와 특정 네트워크 옵션 요청(getsockopt)을 동시에 수행하여 트리거 가능

🛡️ 대응 방법

리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 xt_net->tables 리스트 재순회 로직을 적용해야 함

🔧 검증 코드

출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인하십시오.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel