🇰🇷 한글 설명
리눅스 커널의 dm-btree 구성 요소에서 데이터 삭제 작업 중 I/O 오류가 발생할 경우, 초기화되지 않은 값이 루트 노드에 할당되는 취약점이 발견되었습니다. 이로 인해 dm-thin 사용 시 초기화되지 않은 메모리 영역을 참조하게 되어 시스템 오류나 일반 보호 결함(General Protection Fault)이 발생할 수 있습니다.
💡 쉬운 설명
데이터를 지우는 과정에서 오류가 났는데도 잘못된 정보를 시스템에 저장하여 컴퓨터가 혼란에 빠지는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 예상치 못한 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
dm btree remove: assign new_root only when removal succeeds
remove_raw() in dm_btree_remove() may fail due to IO read error
(e.g. read the content of origin block fails during shadowing),
and the value of shadow_spine::root is uninitialized, but
the uninitialized value is still assign to new_root in the
end of dm_btree_remove().
For dm-thin, the value of pmd->details_root or pmd->root will become
an uninitialized value, so if trying to read details_info tree again
out-of-bound memory may occur as showed below:
general protection fault, probably for non-canonical address 0x3fdcb14c8d7520
CPU: 4 PID: 515 Comm: dmsetup Not tainted 5.13.0-rc6
Hardware name: QEMU Standard PC
RIP: 0010:metadata_ll_load_ie+0x14/0x30
Call Trace:
sm_metadata_count_is_more_than_one+0xb9/0xe0
dm_tm_shadow_block+0x52/0x1c0
shadow_step+0x59/0xf0
remove_raw+0xb2/0x170
dm_btree_remove+0xf4/0x1c0
dm_pool_delete_thin_device+0xc3/0x140
pool_message+0x218/0x2b0
target_message+0x251/0x290
ctl_ioctl+0x1c4/0x4d0
dm_ctl_ioctl+0xe/0x20
__x64_sys_ioctl+0x7b/0xb0
do_syscall_64+0x40/0xb0
entry_SYSCALL_64_after_hwframe+0x44/0xae
Fixing it by only assign new_root when removal succeeds
📍 영향받는 시스템
Linux kernel (dm-thin/dm-btree 사용 환경, 특히 5.13.0-rc6 이전 버전)
⚔️ 공격 벡터
I/O 오류를 유도하여 초기화되지 않은 메모리 주소를 참조하게 만드는 방식
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전 이후인지 확인하십시오.