🇰🇷 한글 설명
Linux 커널의 scsi: target: tcm_loop 구성 요소에서 tcm_loop_tpg_address_show() 함수 호출 시 세그멘테이션 결함(segfault)이 발생할 수 있는 취약점입니다. tcm_loop_driver_probe() 과정에서 scsi_host 구조체 할당에 실패할 경우, NULL 포인터를 참조하게 되어 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제인 리눅스에서 특정 장치를 설정할 때 메모리 할당에 실패하면 시스템이 갑자기 멈추거나 오류가 발생할 수 있는 문제입니다. 이는 잘못된 메모리 주소를 참조하려고 시도할 때 발생하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show()
If the allocation of tl_hba->sh fails in tcm_loop_driver_probe() and we
attempt to dereference it in tcm_loop_tpg_address_show() we will get a
segfault, see below for an example. So, check tl_hba->sh before
dereferencing it.
Unable to allocate struct scsi_host
BUG: kernel NULL pointer dereference, address: 0000000000000194
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 1 PID: 8356 Comm: tokio-runtime-w Not tainted 6.6.104.2-4.azl3 #1
Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 09/28/2024
RIP: 0010:tcm_loop_tpg_address_show+0x2e/0x50 [tcm_loop]
...
Call Trace:
<TASK>
configfs_read_iter+0x12d/0x1d0 [configfs]
vfs_read+0x1b5/0x300
ksys_read+0x6f/0xf0
...
📍 영향받는 시스템
tcm_loop 드라이버를 사용하는 Linux 커널 (예: 6.6.104.2-4.azl3 및 관련 버전)
⚔️ 공격 벡터
로컬 공격자가 시스템 자원 부족을 유도하여 메모리 할당 실패를 일으킨 후, 특정 configfs 경로를 읽어 커널 오류를 유발할 수 있음
🛡️ 대응 방법
tcm_loop_tpg_address_show() 함수 내에서 tl_hba->sh의 NULL 여부를 확인하도록 커널을 최신 패치 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.