🇰🇷 한글 설명
Linux 커널의 Btrfs 파일 시스템에서 NOCOW 직접 I/O 쓰기 작업 중 extent map 참조가 해제되지 않는 메모리 누수 취약점이 발견되었습니다. btrfs_create_dio_extent() 호출이 실패할 경우 기존의 extent map을 해제하지 않고 함수를 종료하여 리소스 누수가 발생합니다.
💡 쉬운 설명
파일을 저장하는 과정에서 컴퓨터의 메모리를 사용한 뒤 이를 제대로 돌려주지 않는 버그가 있습니다. 이 문제가 반복되면 시스템의 메모리가 점차 부족해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix extent map leak in NOCOW direct I/O write
btrfs_dio_iomap_begin() calls btrfs_get_extent(), which returns an
extent map reference that must be dropped on all exit paths.
For direct writes into a NOCOW range, btrfs_get_blocks_direct_write()
keeps using that extent map and asks btrfs_create_dio_extent() to
allocate the ordered extent. If that fails, for example because
btrfs_alloc_ordered_extent() fails, the function returns the error
without dropping the input extent map. The PREALLOC path avoided this by
dropping the input extent map before replacing it with the newly created
one.
Check the error from btrfs_create_dio_extent() before replacing the
map and drop the input extent map on failure.
📍 영향받는 시스템
Linux kernel (Btrfs 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
특정 조건(NOCOW 직접 I/O 쓰기 중 할당 실패)을 유도하여 메모리 누수 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인하십시오.