🇰🇷 한글 설명
Linux 커널의 Btrfs 파일 시스템에서 rescue 모드로 마운트할 때 발생하는 NULL 포인터 역참조 취약점입니다. 블록 그룹 트리나 RAID 스트라이프 트리 루트가 손상된 상태에서 rescue=ibadroots 옵션으로 마운트하면 커널 패닉이 발생할 수 있습니다.
💡 쉬운 설명
파일 시스템이 고장 났을 때 복구 모드로 연결하려고 하면, 컴퓨터의 핵심 시스템(커널)이 예상치 못한 오류를 만나 멈춰버리는 문제입니다. 손상된 데이터를 읽으려다 잘못된 주소를 참조하여 시스템이 충돌하는 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: skip global block reserve accounting for rescue mounts
[BUG]
Mounting with rescue=ibadroots after corrupting the block group tree
root triggers a NULL pointer dereference:
BUG: kernel NULL pointer dereference, address: 0000000000000100
RIP: 0010:btrfs_update_global_block_rsv+0x9d/0x1c0 [btrfs]
Call Trace:
fill_dummy_bgs+0xd4/0x120 [btrfs]
open_ctree+0xc6e/0x1ca0 [btrfs]
btrfs_get_tree+0x50d/0xa40 [btrfs]
The same crash occurs with a corrupted raid stripe tree root, via
btrfs_read_block_groups() instead of fill_dummy_bgs().
[CAUSE]
With rescue=ibadroots, btrfs_read_roots() allows the mount to continue
when either root cannot be read, leaving the corresponding root pointer
NULL while its on-disk feature bit remains set.
btrfs_update_global_block_rsv() then dereferences the missing root based
on the feature bit alone.
[FIX]
Rescue mounts are fully read-only and cannot start transactions, so the
global reserve is never consumed. Under btrfs_is_full_ro(), mark the
reserve as full and return before performing the accounting.
And since we need to check if the fs is mount fully RO, export
fs_is_full_ro() as btrfs_is_full_ro(), and move it to fs.h.
[ Squash the fs_is_full_ro() export commit into this one. ]
📍 영향받는 시스템
Btrfs 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
손상된 Btrfs 파일 시스템을 rescue 옵션을 사용하여 마운트 시도
🛡️ 대응 방법
Btrfs 관련 보안 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인
💻 영향받는 소프트웨어
NVIDIA Cloud Gaming Guest Driver for Linux