🇰🇷 한글 설명
Linux 커널의 hfsplus 파일 시스템에서 copy_name 함수 호출 시 초기화되지 않은 값이 사용되는 취약점이 발견되었습니다. 이 문제는 xattr(확장 속성) 목록을 처리하는 과정에서 메모리 할당 시 초기화가 누락되어 발생합니다.
💡 쉬운 설명
컴퓨터가 데이터를 저장할 때 사용하지 않는 빈 공간을 깨끗이 지우지 않고 그대로 사용하여, 이전에 남아있던 민감한 정보가 유출될 수 있는 문제입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
hfsplus: fix uninit-value in copy_name
[syzbot reported]
BUG: KMSAN: uninit-value in sized_strscpy+0xc4/0x160
sized_strscpy+0xc4/0x160
copy_name+0x2af/0x320 fs/hfsplus/xattr.c:411
hfsplus_listxattr+0x11e9/0x1a50 fs/hfsplus/xattr.c:750
vfs_listxattr fs/xattr.c:493 [inline]
listxattr+0x1f3/0x6b0 fs/xattr.c:840
path_listxattr fs/xattr.c:864 [inline]
__do_sys_listxattr fs/xattr.c:876 [inline]
__se_sys_listxattr fs/xattr.c:873 [inline]
__x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873
x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
slab_post_alloc_hook mm/slub.c:3877 [inline]
slab_alloc_node mm/slub.c:3918 [inline]
kmalloc_trace+0x57b/0xbe0 mm/slub.c:4065
kmalloc include/linux/slab.h:628 [inline]
hfsplus_listxattr+0x4cc/0x1a50 fs/hfsplus/xattr.c:699
vfs_listxattr fs/xattr.c:493 [inline]
listxattr+0x1f3/0x6b0 fs/xattr.c:840
path_listxattr fs/xattr.c:864 [inline]
__do_sys_listxattr fs/xattr.c:876 [inline]
__se_sys_listxattr fs/xattr.c:873 [inline]
__x64_sys_listxattr+0x16b/0x2f0 fs/xattr.c:873
x64_sys_call+0x2ba0/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:195
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
[Fix]
When allocating memory to strbuf, initialize memory to 0.
📍 영향받는 시스템
hfsplus 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
특수하게 조작된 확장 속성(xattr)을 가진 파일 시스템을 마운트하거나 관련 시스템 콜을 호출하여 발생
🛡️ 대응 방법
hfsplus 관련 메모리 할당 시 0으로 초기화하도록 커널 패치를 적용하거나 최신 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 보안 패치 버전인지 확인