🇰🇷 한글 설명
Linux 커널의 RDMA/rxe 구성 요소에서 소켓 생성 실패 시 rxe_qp_do_cleanup() 함수가 NULL 포인터를 참조하여 발생하는 취약점입니다. mount.cifs를 통해 RDMA를 사용하는 과정에서 시스템 충돌이나 커널 패닉을 유발할 수 있습니다.
💡 쉬운 설명
네트워크 연결을 만드는 과정에서 오류가 발생했을 때, 컴퓨터가 잘못된 메모리 주소를 읽으려고 시도하여 시스템이 멈추거나 오류가 발생하는 문제입니다. RDMA라는 특수한 네트워크 기술을 사용할 때 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed
There is a null-ptr-deref when mount.cifs over rdma:
BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe]
Read of size 8 at addr 0000000000000018 by task mount.cifs/3046
CPU: 2 PID: 3046 Comm: mount.cifs Not tainted 6.1.0-rc5+ #62
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc3
Call Trace:
<TASK>
dump_stack_lvl+0x34/0x44
kasan_report+0xad/0x130
rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe]
execute_in_process_context+0x25/0x90
__rxe_cleanup+0x101/0x1d0 [rdma_rxe]
rxe_create_qp+0x16a/0x180 [rdma_rxe]
create_qp.part.0+0x27d/0x340
ib_create_qp_kernel+0x73/0x160
rdma_create_qp+0x100/0x230
_smbd_get_connection+0x752/0x20f0
smbd_get_connection+0x21/0x40
cifs_get_tcp_session+0x8ef/0xda0
mount_get_conns+0x60/0x750
cifs_mount+0x103/0xd00
cifs_smb3_do_mount+0x1dd/0xcb0
smb3_get_tree+0x1d5/0x300
vfs_get_tree+0x41/0xf0
path_mount+0x9b3/0xdd0
__x64_sys_mount+0x190/0x1d0
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
The root cause of the issue is the socket create failed in
rxe_qp_init_req().
So move the reset rxe_qp_do_cleanup() after the NULL ptr check.
📍 영향받는 시스템
Linux kernel (RDMA/rxe module 사용 환경)
⚔️ 공격 벡터
RDMA를 사용하는 환경에서 의도적으로 소켓 생성을 실패하게 유도하여 커널의 NULL 포인터 역참조를 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 rxe_qp_do_cleanup() 함수의 NULL 체크 로직을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인합니다.