🇰🇷 한글 설명
Linux 커널의 net 서브시스템에서 sock_recv_cmsgs() 함수가 sk->sk_stamp 값을 읽을 때 READ_ONCE()를 사용하지 않아 발생하는 데이터 레이스(load-tearing) 문제가 수정되었습니다. KCSAN이 packet_recvmsg 경로에서 동시 접근으로 인한 데이터 레이스를 탐지했습니다. 이는 타임스탬프 값이 손상되어 읽힐 가능성이 있는 동시성 결함입니다.
💡 쉬운 설명
여러 프로그램이 동시에 같은 네트워크 소켓의 시간 정보를 읽고 쓰면서 값이 잘못 읽힐 수 있는 문제입니다. 주로 시간 정보가 깨지는 수준의 결함이며 직접적인 권한 상승 가능성은 명시되어 있지 않습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
KCSAN found a data race in sock_recv_cmsgs() where the read access
to sk->sk_stamp needs READ_ONCE().
BUG: KCSAN: data-race in packet_recvmsg / packet_recvmsg
write (marked) to 0xffff88803c81f258 of 8 bytes by task 19171 on cpu 0:
sock_write_timestamp include/net/sock.h:2670 [inline]
sock_recv_cmsgs include/net/sock.h:2722 [inline]
packet_recvmsg+0xb97/0xd00 net/packet/af_packet.c:3489
sock_recvmsg_nosec net/socket.c:1019 [inline]
sock_recvmsg+0x11a/0x130 net/socket.c:1040
sock_read_iter+0x176/0x220 net/socket.c:1118
call_read_iter include/linux/fs.h:1845 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x5e0/0x630 fs/read_write.c:470
ksys_read+0x163/0x1a0 fs/read_write.c:613
__do_sys_read fs/read_write.c:623 [inline]
__se_sys_read fs/read_write.c:621 [inline]
__x64_sys_read+0x41/0x50 fs/read_write.c:621
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x72/0xdc
read to 0xffff88803c81f258 of 8 bytes by task 19183 on cpu 1:
sock_recv_cmsgs include/net/sock.h:2721 [inline]
packet_recvmsg+0xb64/0xd00 net/packet/af_packet.c:3489
sock_recvmsg_nosec net/socket.c:1019 [inline]
sock_recvmsg+0x11a/0x130 net/socket.c:1040
sock_read_iter+0x176/0x220 net/socket.c:1118
call_read_iter include/linux/fs.h:1845 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x5e0/0x630 fs/read_write.c:470
ksys_read+0x163/0x1a0 fs/read_write.c:613
__do_sys_read fs/read_write.c:623 [inline]
__se_sys_read fs/read_write.c:621 [inline]
__x64_sys_read+0x41/0x50 fs/read_write.c:621
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x72/0xdc
value changed: 0xffffffffc4653600 -> 0x0000000000000000
Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19183 Comm: syz-executor.5 Not tainted 6.3.0-rc7-02330-gca6270c12e20 #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
📍 영향받는 시스템
패치 이전의 Linux 커널 (net/core 및 sock_recv_cmsgs 사용 버전, 6.3-rc7 기준으로 확인됨)
⚔️ 공격 벡터
로컬 사용자가 동일 소켓에 대해 동시에 recvmsg 계열 호출을 반복하여 데이터 레이스 상태를 유발할 수 있음
🛡️ 대응 방법
커널을 해당 커밋이 포함된 최신 안정 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 배포판 보안 공지 또는 upstream 패치 적용 버전과 비교하여 패치 포함 여부를 확인합니다. 최신 보안 업데이트가 적용된 배포판 커널이면 패치된 것입니다.