🔍 CVE-2024-40995

5.5
CVSS Score
MEDIUM
2024-07-12
2026-10-15 01:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 net/sched 모듈에서 같은 index로 여러 개의 동작(action)을 추가할 때 tcf_idr_check_alloc() 함수가 무한 루프에 빠져 rtnl_lock을 영원히 점유하는 문제입니다. 이로 인해 다른 작업들이 영구적으로 대기 상태에 빠집니다.

💡 쉬운 설명

Linux 커널의 네트워크 스케줄러에서 특정 설정을 두 번 연속 변경하려 할 때 시스템이 멈춰버리는 버그입니다. 로컬 공격자가 이를 악용하여 시스템을 응답 불능 상태로 만들 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: net/sched: act_api: fix possible infinite loop in tcf_idr_check_alloc() syzbot found hanging tasks waiting on rtnl_lock [1] A reproducer is available in the syzbot bug. When a request to add multiple actions with the same index is sent, the second request will block forever on the first request. This holds rtnl_lock, and causes tasks to hang. Return -EAGAIN to prevent infinite looping, while keeping documented behavior. [1] INFO: task kworker/1:0:5088 blocked for more than 143 seconds. Not tainted 6.9.0-rc4-syzkaller-00173-g3cdb45594619 #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/1:0 state:D stack:23744 pid:5088 tgid:5088 ppid:2 flags:0x00004000 Workqueue: events_power_efficient reg_check_chans_work Call Trace: <TASK> context_switch kernel/sched/core.c:5409 [inline] __schedule+0xf15/0x5d00 kernel/sched/core.c:6746 __schedule_loop kernel/sched/core.c:6823 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6838 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6895 __mutex_lock_common kernel/locking/mutex.c:684 [inline] __mutex_lock+0x5b8/0x9c0 kernel/locking/mutex.c:752 wiphy_lock include/net/cfg80211.h:5953 [inline] reg_leave_invalid_chans net/wireless/reg.c:2466 [inline] reg_check_chans_work+0x10a/0x10e0 net/wireless/reg.c:2481

📍 영향받는 시스템

Linux kernel 버전 6.9.0-rc4 이하 (net/sched 패킷 스케줄링 기능 사용 환경)

⚔️ 공격 벡터

로컬 공격자가 netlink를 통해 중복된 index의 qdisc action 추가 요청을 반복 전송하여 커널 스레드를 교착 상태로 만들 수 있습니다.

🛡️ 대응 방법

Linux 커널을 3cdb45594619 커밋 이후의 버전으로 업데이트하거나 공식 보안 패치를 적용하세요.

🔧 검증 코드

커널 버전이 6.0~6.8이면 취약할 가능성 높음, 6.9 이상이면 git log에서 'tcf_idr_check_alloc' 또는 커밋 3cdb45594619 존재 여부로 패치 적용 확인

Shell / Script
uname -r | awk -F. '{if ($1<6 || ($1==6 && $2<9)) print "Potentially Vulnerable"; else print "Check patch status"}' || cat /proc/version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel