🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 ntfs_fill_super() 함수 호출 시 메모리 누수 취약점이 발견되었습니다. fc->fs_private 포인터가 메모리 해제 전에 NULL로 설정되어 ntfs_mount_options 구조체가 적절히 해제되지 않는 문제입니다.
💡 쉬운 설명
파일을 마운트할 때 컴퓨터의 메모리를 사용한 후 제대로 돌려주지 않고 잃어버리는 버그가 있습니다. 이 문제가 반복되면 시스템의 메모리가 점점 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: fix ntfs_mount_options leak in ntfs_fill_super()
In ntfs_fill_super(), the fc->fs_private pointer is set to NULL without
first freeing the memory it points to. This causes the subsequent call to
ntfs_fs_free() to skip freeing the ntfs_mount_options structure.
This results in a kmemleak report:
unreferenced object 0xff1100015378b800 (size 32):
comm "mount", pid 582, jiffies 4294890685
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 ed ff ed ff 00 04 00 00 ................
backtrace (crc ed541d8c):
__kmalloc_cache_noprof+0x424/0x5a0
__ntfs_init_fs_context+0x47/0x590
alloc_fs_context+0x5d8/0x960
__x64_sys_fsopen+0xb1/0x190
do_syscall_64+0x50/0x1f0
entry_SYSCALL_64_after_hwframe+0x76/0x7e
This issue can be reproduced using the following commands:
fallocate -l 100M test.file
mount test.file /tmp/test
Since sbi->options is duplicated from fc->fs_private and does not
directly use the memory allocated for fs_private, it is unnecessary to
set fc->fs_private to NULL.
Additionally, this patch simplifies the code by utilizing the helper
function put_mount_options() instead of open-coding the cleanup logic.
📍 영향받는 시스템
Linux kernel (ntfs3 driver 사용 환경)
⚔️ 공격 벡터
로컬 사용자가 특정 파일을 마운트하는 동작을 반복하여 메모리 자원을 고갈시킴
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인