🔍 CVE-2022-49973

5.5
CVSS Score
MEDIUM
2025-06-18
2026-11-05 20:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 sk_msg_recvmsg() 함수에서 마지막 scatterlist 검사가 잘못 수정되어 NULL 포인터 역참조가 발생하는 문제입니다. 9974d37ea75f 커밋에서 sg_is_last()로 변경했으나, sockmap 리다이렉션 경로에서는 scatterlist 끝이 표시되지 않아 문제가 생겼습니다. 이에 따라 (i != msg_rx->sg.end) 검사를 다시 추가하여 수정합니다.

💡 쉬운 설명

리눅스 커널이 네트워크 데이터를 읽는 과정에서 잘못된 메모리 위치를 참조해 시스템이 비정상 종료될 수 있습니다. 수정 패치는 데이터 끝을 판단하는 조건을 바로잡아 이 문제를 해결합니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: skmsg: Fix wrong last sg check in sk_msg_recvmsg() Fix one kernel NULL pointer dereference as below: [ 224.462334] Call Trace: [ 224.462394] __tcp_bpf_recvmsg+0xd3/0x380 [ 224.462441] ? sock_has_perm+0x78/0xa0 [ 224.462463] tcp_bpf_recvmsg+0x12e/0x220 [ 224.462494] inet_recvmsg+0x5b/0xd0 [ 224.462534] __sys_recvfrom+0xc8/0x130 [ 224.462574] ? syscall_trace_enter+0x1df/0x2e0 [ 224.462606] ? __do_page_fault+0x2de/0x500 [ 224.462635] __x64_sys_recvfrom+0x24/0x30 [ 224.462660] do_syscall_64+0x5d/0x1d0 [ 224.462709] entry_SYSCALL_64_after_hwframe+0x65/0xca In commit 9974d37ea75f ("skmsg: Fix invalid last sg check in sk_msg_recvmsg()"), we change last sg check to sg_is_last(), but in sockmap redirection case (without stream_parser/stream_verdict/ skb_verdict), we did not mark the end of the scatterlist. Check the sk_msg_alloc, sk_msg_page_add, and bpf_msg_push_data functions, they all do not mark the end of sg. They are expected to use sg.end for end judgment. So the judgment of '(i != msg_rx->sg.end)' is added back here.

📍 영향받는 시스템

패치가 적용되지 않은 Linux 커널 버전(sockmap/BPF 기능을 사용하는 환경)

⚔️ 공격 벡터

로컬 또는 네트워크 트래픽을 통해 sockmap 리다이렉션 경로를 유발하여 커널 NULL 포인터 역참조로 인한 서비스 거부(커널 패닉)를 일으킬 수 있습니다.

🛡️ 대응 방법

배포판 제공 보안 업데이트를 적용하거나 해당 커널 패치가 포함된 최신 안정 버전으로 커널을 업그레이드합니다.

🔧 검증 코드

출력된 커널 버전을 배포판 보안 공지 및 해당 커널 패치 적용 여부와 대조하여 취약 여부를 판단합니다 (패치된 버전이면 해당 CVE 수정 포함).

Shell / Script
uname -r

📊 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