🇰🇷 한글 설명
Linux 커널의 netlink 서브시스템에서 netlink_set_err() 함수가 IRQ 안전하지 않게 nl_table_lock을 획득하여 잠재적 교착상태(deadlock)가 발생할 수 있는 문제입니다. 이전 패치에서 netlink_lock_table()은 수정되었으나 netlink_set_err()와 __netlink_diag_dump()는 누락되어 이번 패치로 IRQ 안전성을 추가했습니다.
💡 쉬운 설명
Linux 커널 내부에서 두 작업이 서로의 잠금을 기다리며 멈춰버릴 수 있는 버그입니다. 인터럽트가 발생하는 타이밍에 따라 시스템이 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netlink: fix potential deadlock in netlink_set_err()
syzbot reported a possible deadlock in netlink_set_err() [1]
A similar issue was fixed in commit 1d482e666b8e ("netlink: disable IRQs
for netlink_lock_table()") in netlink_lock_table()
This patch adds IRQ safety to netlink_set_err() and __netlink_diag_dump()
which were not covered by cited commit.
[1]
WARNING: possible irq lock inversion dependency detected
6.4.0-rc6-syzkaller-00240-g4e9f0ec38852 #0 Not tainted
syz-executor.2/23011 just changed the state of lock:
ffffffff8e1a7a58 (nl_table_lock){.+.?}-{2:2}, at: netlink_set_err+0x2e/0x3a0 net/netlink/af_netlink.c:1612
but this lock was taken by another, SOFTIRQ-safe lock in the past:
(&local->queue_stop_reason_lock){..-.}-{2:2}
and interrupts could create inverse lock ordering between them.
other info that might help us debug this:
Possible interrupt unsafe locking scenario:
CPU0 CPU1
---- ----
lock(nl_table_lock);
local_irq_disable();
lock(&local->queue_stop_reason_lock);
lock(nl_table_lock);
<Interrupt>
lock(&local->queue_stop_reason_lock);
*** DEADLOCK ***
📍 영향받는 시스템
패치 이전의 Linux 커널 (6.4-rc6 등 netlink 서브시스템을 사용하는 버전)
⚔️ 공격 벡터
로컬 사용자가 netlink 소켓을 통해 특정 타이밍의 요청을 반복 발생시켜 교착상태를 유도할 수 있음 (서비스 거부 가능성)
🛡️ 대응 방법
커널을 해당 CVE 패치가 포함된 최신 안정 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 패치가 적용된 버전 이상인지 배포판 보안 공지나 kernel.org의 stable 변경 로그에서 확인하며, 배포판 패키지라면 apt changelog linux-image-$(uname -r) 또는 rpm -q --changelog kernel 로 CVE-2023-53731 항목 존재 여부를 확인합니다.