🔍 CVE-2022-49814

7.8
CVSS Score
HIGH
2025-05-01
2026-08-04 10:17
✅ 완료

🇰🇷 한글 설명

리눅스 커널의 KCM(Kernel Connection Multiplexor) 소켓 구현에서 sk_receive_queue에 대한 레이스 컨디션(경쟁 상태) 취약점이 발견되었습니다. kcm_recvmsg() 함수가 적절한 락(lock)을 획득하지 않아 데이터 처리 과정에서 동기화 문제가 발생할 수 있습니다.

💡 쉬운 설명

컴퓨터의 핵심 운영체제인 리눅스에서 데이터를 주고받는 통로에 순서가 엉키는 문제가 있습니다. 이로 인해 데이터가 깨지거나 시스템이 예상치 못한 동작을 할 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: kcm: close race conditions on sk_receive_queue sk->sk_receive_queue is protected by skb queue lock, but for KCM sockets its RX path takes mux->rx_lock to protect more than just skb queue. However, kcm_recvmsg() still only grabs the skb queue lock, so race conditions still exist. We can teach kcm_recvmsg() to grab mux->rx_lock too but this would introduce a potential performance regression as struct kcm_mux can be shared by multiple KCM sockets. So we have to enforce skb queue lock in requeue_rx_msgs() and handle skb peek case carefully in kcm_wait_data(). Fortunately, skb_recv_datagram() already handles it nicely and is widely used by other sockets, we can just switch to skb_recv_datagram() after getting rid of the unnecessary sock lock in kcm_recvmsg() and kcm_splice_read(). Side note: SOCK_DONE is not used by KCM sockets, so it is safe to get rid of this check too. I ran the original syzbot reproducer for 30 min without seeing any issue.

📍 영향받는 시스템

KCM 소켓을 사용하는 리눅스 커널 버전

⚔️ 공격 벡터

특수하게 조작된 네트워크 패킷을 통해 KCM 소켓의 수신 큐에 동시 접근하여 레이스 컨디션을 유발

🛡️ 대응 방법

KCM 관련 레이스 컨디션 패치가 적용된 최신 리눅스 커널로 업데이트

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel