🇰🇷 한글 설명
Linux 커널의 Btrfs 파일 시스템에서 재배치 복구(relocation recovery) 실패 시, 특정 파일 시스템 루트의 참조를 제대로 해제하지 못하는 취약점이 발견되었습니다. 이로 인해 메모리 누수가 발생하거나 파일 시스템 상태가 불완전하게 남을 수 있습니다.
💡 쉬운 설명
파일 시스템을 복구하는 과정에서 오류가 발생했을 때, 사용하던 임시 메모리 자원을 제대로 정리하지 못하는 문제입니다. 이로 인해 시스템 자원이 낭비되거나 파일 시스템 관리에 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: drop recovered reloc root refs on recovery failure
During relocation recovery, each fs root gets a reference to its relocation
root. If loading or adding a later root fails, or if the first transaction
commit fails, btrfs_recover_relocation() jumps to out_unset before
merge_reloc_roots() and clean_dirty_subvols().
put_reloc_control() drops the list-owned relocation root references, but it
does not clear fs_root->reloc_root or drop the references owned by those
pointers. Mount cleanup only drops them when BTRFS_FS_ERROR is set, so an
error such as -ENOMEM while processing a later root can leave references
behind.
Keep temporary references to the fs roots associated during recovery. On
failure, clear their reloc_root pointers and drop the corresponding
references. Once the first transaction commit succeeds, drop only the
temporary fs root references and let the normal merge and cleanup paths
handle the relocation roots.
Fault injection on a pending-relocation image confirmed the cleanup gap.
With an injected first-commit failure, 25 fs roots had reloc_root set with
fs_error=0. With this fix, the same failure path drops that count to 0
before mount fails.
📍 영향받는 시스템
Linux Kernel (Btrfs 파일 시스템을 사용하는 모든 시스템)
⚔️ 공격 벡터
직접적인 공격보다는 시스템 오류(메모리 부족 등) 상황에서 자원 누수를 유발하는 방식
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인하십시오.