🔍 CVE-2024-40910

8.8
CVSS Score
HIGH
2024-07-12
2026-08-04 11:19
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ax25 프로토콜 구현에서 인바운드 연결 시 참조 카운트(refcount) 불균형이 발생하는 취약점입니다. 연결 수락 과정에서 참조 카운트를 증가시키지 않아, 소켓 해제 시 카운트가 언더플로우되어 커널 충돌이나 메모리 누수를 유발할 수 있습니다.

💡 쉬운 설명

네트워크 연결을 처리할 때 사용 중인 자원의 개수를 제대로 세지 않아 발생하는 문제입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나(크래시), 시스템을 재부팅할 때 무한 루프에 빠질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ax25: Fix refcount imbalance on inbound connections When releasing a socket in ax25_release(), we call netdev_put() to decrease the refcount on the associated ax.25 device. However, the execution path for accepting an incoming connection never calls netdev_hold(). This imbalance leads to refcount errors, and ultimately to kernel crashes. A typical call trace for the above situation will start with one of the following errors: refcount_t: decrement hit 0; leaking memory. refcount_t: underflow; use-after-free. And will then have a trace like: Call Trace: <TASK> ? show_regs+0x64/0x70 ? __warn+0x83/0x120 ? refcount_warn_saturate+0xb2/0x100 ? report_bug+0x158/0x190 ? prb_read_valid+0x20/0x30 ? handle_bug+0x3e/0x70 ? exc_invalid_op+0x1c/0x70 ? asm_exc_invalid_op+0x1f/0x30 ? refcount_warn_saturate+0xb2/0x100 ? refcount_warn_saturate+0xb2/0x100 ax25_release+0x2ad/0x360 __sock_release+0x35/0xa0 sock_close+0x19/0x20 [...] On reboot (or any attempt to remove the interface), the kernel gets stuck in an infinite loop: unregister_netdevice: waiting for ax0 to become free. Usage count = 0 This patch corrects these issues by ensuring that we call netdev_hold() and ax25_dev_hold() for new connections in ax25_accept(). This makes the logic leading to ax25_accept() match the logic for ax25_bind(): in both cases we increment the refcount, which is ultimately decremented in ax25_release().

📍 영향받는 시스템

ax25 프로토콜을 사용하는 Linux 커널 버전

⚔️ 공격 벡터

취약한 커널이 실행 중인 시스템에 악의적인 ax25 인바운드 연결을 시도하여 발생

🛡️ 대응 방법

ax25_accept() 함수에서 netdev_hold() 및 ax25_dev_hold()를 호출하도록 수정된 최신 커널 패치 적용

🔧 검증 코드

현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel