🇰🇷 한글 설명
Linux 커널의 Btrfs 파일 시스템에서 block_group::bg_list를 처리할 때 발생하는 레이스 컨디션 취약점입니다. 특정 상황에서 list_del_init() 호출이 동시적으로 발생할 경우 참조 횟수(refcount)가 잘못 계산되어 시스템 경고가 발생하거나 불안정해질 수 있습니다.
💡 쉬운 설명
여러 작업이 동시에 파일 시스템의 데이터를 정리하려고 할 때, 데이터의 사용 횟수를 계산하는 과정에서 충돌이 발생하는 문제입니다. 이로 인해 시스템이 데이터가 아직 사용 중인지 아닌지 혼동하여 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: harden block_group::bg_list against list_del() races
As far as I can tell, these calls of list_del_init() on bg_list cannot
run concurrently with btrfs_mark_bg_unused() or btrfs_mark_bg_to_reclaim(),
as they are in transaction error paths and situations where the block
group is readonly.
However, if there is any chance at all of racing with mark_bg_unused(),
or a different future user of bg_list, better to be safe than sorry.
Otherwise we risk the following interleaving (bg_list refcount in parens)
T1 (some random op) T2 (btrfs_mark_bg_unused)
!list_empty(&bg->bg_list); (1)
list_del_init(&bg->bg_list); (1)
list_move_tail (1)
btrfs_put_block_group (0)
btrfs_delete_unused_bgs
bg = list_first_entry
list_del_init(&bg->bg_list);
btrfs_put_block_group(bg); (-1)
Ultimately, this results in a broken ref count that hits zero one deref
early and the real final deref underflows the refcount, resulting in a WARNING.
📍 영향받는 시스템
Linux Kernel (Btrfs 파일 시스템을 사용하는 버전)
⚔️ 공격 벡터
로컬 시스템에서 특정 파일 시스템 조작을 통한 레이스 컨디션 유도
🛡️ 대응 방법
Btrfs 관련 레이스 컨디션 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.