🇰🇷 한글 설명
리눅스 커널의 nvmet-auth 구성 요소에서 nvmet_auth_challenge() 함수 호출 시 발생하는 경계 외 쓰기(out-of-bounds write) 취약점입니다. void 포인터 사용으로 인해 버퍼 크기가 잘못 계산되어, 고정된 챌린지 헤더 크기만큼 메모리 범위를 초과하여 데이터를 쓰는 문제가 발생합니다.
💡 쉬운 설명
데이터를 담는 그릇의 크기를 실제보다 작게 계산하여, 준비된 공간보다 더 많은 데이터를 억지로 밀어 넣는 오류입니다. 이로 인해 시스템의 중요한 메모리 영역이 망가져 컴퓨터가 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
nvmet-auth: fix out-of-bounds write in nvmet_auth_challenge()
nvmet_auth_challenge() receives its output buffer as a void pointer.
sizeof(*d) therefore evaluates to one with GCC and undercounts the fixed
challenge header by 15 bytes. A short AUTH_RECEIVE buffer can pass the
check before the challenge is copied past the end of its allocation.
Use the typed challenge pointer when calculating the response size.
BUG: KASAN: slab-out-of-bounds in nvmet_execute_auth_receive (drivers/nvme/target/fabrics-cmd-auth.c:442 drivers/nvme/target/fabrics-cmd-auth.c:569)
Write of size 32 by task kworker/1:1H/64
Workqueue: nvmet_tcp_wq nvmet_tcp_io_work
Call Trace:
nvmet_execute_auth_receive (drivers/nvme/target/fabrics-cmd-auth.c:442 drivers/nvme/target/fabrics-cmd-auth.c:569)
nvmet_tcp_try_recv_pdu (drivers/nvme/target/tcp.c:1119 drivers/nvme/target/tcp.c:1243)
nvmet_tcp_io_work (drivers/nvme/target/tcp.c:1350 drivers/nvme/target/tcp.c:1382 drivers/nvme/target/tcp.c:1445)
process_one_work (kernel/workqueue.c:3322)
worker_thread (kernel/workqueue.c:3405 kernel/workqueue.c:3486)
kthread (kernel/kthread.c:436)
ret_from_fork (arch/x86/kernel/process.c:158)
ret_from_fork_asm (arch/x86/entry/entry_64.S:245)
The buggy address is located 16 bytes inside of
allocated 33-byte region [ffff888000554e80, ffff888000554ea1)
Kernel panic - not syncing: KASAN: panic_on_warn set ...
📍 영향받는 시스템
Linux Kernel (nvmet-auth 모듈을 사용하는 NVMe-over-Fabrics 환경)
⚔️ 공격 벡터
조작된 인증 응답(AUTH_RECEIVE) 패킷을 전송하여 커널 메모리 오버플로우 유발
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 nvmet_auth_challenge() 함수의 포인터 타입을 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이상인지 확인합니다.