🇰🇷 한글 설명
Linux 커널의 Btrfs 파일 시스템에서 LZO 압축 해제 시 세그먼트 길이를 압축된 입력 크기와 대조하지 않아 발생하는 취약점입니다. 조작된 익스텐트를 통해 압축 데이터 범위를 벗어나는 세그먼트를 전달하면 NULL 포인터 역참조가 발생하여 시스템이 충돌할 수 있습니다.
💡 쉬운 설명
압축된 파일을 읽을 때 데이터의 실제 크기를 제대로 확인하지 않아 발생하는 오류입니다. 나쁜 의도로 조작된 파일을 읽으면 컴퓨터 시스템이 갑자기 멈추거나 꺼질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: lzo: reject compressed segment that overflows the compressed input
lzo_decompress_bio() validates each on-disk segment length seg_len only
against the workspace cbuf size, not against the compressed input size
(compressed_len, the total folio bytes of the bio). A crafted extent can
carry a segment whose seg_len passes the cbuf check but runs past the end
of the bio, so copy_compressed_segment() walks off the last folio:
get_current_folio() then returns the NULL folio from bio_next_folio(), and
with CONFIG_BTRFS_ASSERT disabled (default) folio_size(NULL) faults.
BUG: KASAN: null-ptr-deref in lzo_decompress_bio (fs/btrfs/lzo.c:383)
Read of size 8 at addr 0000000000000000 by task kworker/u8:1/29
Workqueue: btrfs-endio simple_end_io_work
kasan_report (mm/kasan/report.c:590)
lzo_decompress_bio (fs/btrfs/lzo.c:383)
end_bbio_compressed_read (fs/btrfs/compression.c:1065)
btrfs_bio_end_io (fs/btrfs/bio.c:135)
btrfs_check_read_bio (fs/btrfs/bio.c:180 fs/btrfs/bio.c:285)
simple_end_io_work
process_one_work
worker_thread
Reject any segment whose payload would extend beyond compressed_len before
copying it, treating it as corruption like the other on-disk validation
failures in this function.
📍 영향받는 시스템
LZO 압축을 사용하는 Linux 커널 기반의 Btrfs 파일 시스템 사용 시스템
⚔️ 공격 벡터
조작된 압축 익스텐트(crafted extent)를 포함한 Btrfs 파일 시스템 데이터 로드
🛡️ 대응 방법
LZO 압축 해제 로직이 포함된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 패치된 최신 버전인지 확인합니다.