🇰🇷 한글 설명
Linux 커널 SCSI target 코어의 target_alloc_device() 함수에서 메모리 할당 실패 시 초기화되지 않은 dev->transport를 통해 메모리 해제를 시도하는 널 포인터 역참조 취약점입니다. 커널 모듈 초기화 단계에서 트리거되어 시스템 충돌을 초래할 수 있습니다.
💡 쉬운 설명
Linux 시스템의 저장장치 제어 코드에서 존재하지 않는 메모리 위치에 접근하려는 버그입니다. 이 결함으로 인해 시스템이 갑자기 멈추거나 재부팅될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: core: Fix null-ptr-deref in target_alloc_device()
There is a null-ptr-deref issue reported by KASAN:
BUG: KASAN: null-ptr-deref in target_alloc_device+0xbc4/0xbe0 [target_core_mod]
...
kasan_report+0xb9/0xf0
target_alloc_device+0xbc4/0xbe0 [target_core_mod]
core_dev_setup_virtual_lun0+0xef/0x1f0 [target_core_mod]
target_core_init_configfs+0x205/0x420 [target_core_mod]
do_one_initcall+0xdd/0x4e0
...
entry_SYSCALL_64_after_hwframe+0x76/0x7e
In target_alloc_device(), if allocing memory for dev queues fails, then
dev will be freed by dev->transport->free_device(), but dev->transport
is not initialized at that time, which will lead to a null pointer
reference problem.
Fixing this bug by freeing dev with hba->backend->ops->free_device().
📍 영향받는 시스템
Linux kernel target_core_mod 모듈 (특정 커널 버전까지의 SCSI target core 구현)
⚔️ 공격 벡터
커널 모듈 초기화 중 메모리 할당 실패 조건 트리거 (로컬 권한 필요)
🛡️ 대응 방법
target_core_mod 패치가 포함된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전을 Linux 커널 릴리스 노트에서 CVE-2024-50153 패치 적용 버전과 비교하여 취약성 여부 확인
dpkg -l 2>/dev/null | grep -i linux-image | awk '{print $2, $3}'