🇰🇷 한글 설명
Linux 커널의 ntfs3 파일 시스템 드라이버에서 PAGE_SIZE가 64K로 설정된 경우, r_page 함수 호출 시 slab-out-of-bounds(경계 외 메모리 접근) 오류가 발생합니다. 이는 로그 페이지를 읽는 과정에서 할당된 버퍼 크기보다 더 큰 데이터를 memcpy로 복사할 때 발생하며, 시스템 불안정성을 초래할 수 있습니다.
💡 쉬운 설명
컴퓨터가 파일을 읽을 때 데이터를 담을 그릇(메모리)을 4KB 크기로 준비했는데, 실제 데이터는 64KB를 넣으려고 시도하면서 그릇 밖으로 데이터가 넘쳐흐르는 문제입니다. 이로 인해 시스템이 멈추거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: Fix slab-out-of-bounds in r_page
When PAGE_SIZE is 64K, if read_log_page is called by log_read_rst for
the first time, the size of *buffer would be equal to
DefaultLogPageSize(4K).But for *buffer operations like memcpy,
if the memory area size(n) which being assigned to buffer is larger
than 4K (log->page_size(64K) or bytes(64K-page_off)), it will cause
an out of boundary error.
Call trace:
[...]
kasan_report+0x44/0x130
check_memory_region+0xf8/0x1a0
memcpy+0xc8/0x100
ntfs_read_run_nb+0x20c/0x460
read_log_page+0xd0/0x1f4
log_read_rst+0x110/0x75c
log_replay+0x1e8/0x4aa0
ntfs_loadlog_and_replay+0x290/0x2d0
ntfs_fill_super+0x508/0xec0
get_tree_bdev+0x1fc/0x34c
[...]
Fix this by setting variable r_page to NULL in log_read_rst.
📍 영향받는 시스템
PAGE_SIZE가 64K로 설정된 Linux 커널 (ntfs3 드라이버 사용 시)
⚔️ 공격 벡터
조작된 NTFS 파일 시스템의 로그 페이지를 마운트하거나 읽으려고 시도할 때 발생
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하거나, log_read_rst에서 r_page를 NULL로 설정하는 패치를 적용해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.