🇰🇷 한글 설명
Linux 커널의 NTFS 드라이버에서 마운트 실패 시 할당된 리소스를 제대로 해제하지 못하는 메모리 누수 취약점이 발견되었습니다. nls_map, volume_label 등 볼륨 관련 자원이 해제되지 않고 남아 있어, 반복적인 마운트 실패 시 시스템 메모리가 점진적으로 고갈될 수 있습니다.
💡 쉬운 설명
NTFS 형식의 저장 장치를 연결하려다 실패할 때, 컴퓨터가 사용했던 메모리를 다시 돌려주지 않고 계속 붙잡고 있는 문제입니다. 이런 일이 반복되면 컴퓨터의 메모리가 부족해져 시스템 성능이 떨어지거나 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ntfs: free volume-wide resources on fill_super failure
ntfs_fill_super()'s err_out_now path frees only the volume struct via
kfree(vol), leaving several vol-owned allocations behind on every mount
failure:
- vol->nls_map, loaded by ntfs_init_fs_context() via
load_nls_default() (or replaced by an explicit nls= option in
ntfs_parse_param()), is never unload_nls()'d.
- vol->volume_label, allocated by load_system_files() through
ntfs_ucstonls() once the $Volume name attribute has been parsed, is
not released by load_system_files()'s own error labels nor by the
fill_super() inline cleanup that only runs on d_make_root()
failure. Any later failure inside load_system_files() leaks it.
- vol->lcn_empty_bits_per_page was kvfree()'d in
unl_upcase_iput_tmp_ino_err_out_now without clearing the pointer,
so it could not be folded into a single common cleanup.
Because the failure paths never call ntfs_volume_free() and never reach
the d_make_root() inline cleanup block (it sits above the label and is
jumped over by the load_system_files() / kvmalloc failure gotos), these
resources accumulate per failed mount attempt with no chance of
recovery short of unloading the module. This is a silent leak: the
inodes loaded prior to failure remain hashed but generic_shutdown_super()
skips evict_inodes() when sb->s_root is unset, so no CHECK_DATA_CORRUPTION
warning is emitted either.
Move the per-volume frees down to err_out_now and drop the
lcn_empty_bits_per_page kvfree() from the upper label so the cleanup is
performed exactly once on every failure path. Using unconditional
kvfree() / kfree() / unload_nls() is safe because they all accept NULL
and the upper labels that previously freed nls_map (the d_make_root()
inline cleanup) already clear the pointer.
📍 영향받는 시스템
Linux kernel (NTFS driver module)
⚔️ 공격 벡터
로컬 공격자가 의도적으로 손상된 NTFS 파일 시스템을 반복적으로 마운트 시도하여 메모리 고갈 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 NTFS 리소스 해제 로직 수정 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인