🇰🇷 한글 설명
btrfs 파일 시스템의 btrfs_ioctl_space_info() 함수에서 시간경쟁(TOCTOU) 취약점이 발견되었습니다. 이 결함으로 인해 커널의 할당되지 않은 힙 메모리 데이터가 사용자 공간으로 누설될 수 있습니다.
💡 쉬운 설명
시스템이 메모리 정보를 처리하는 과정에서 경쟁 조건이 발생해, 원래 노출되지 않아야 할 내부 데이터가 외부로 새어 나갈 수 있습니다. 이는 시스템의 보안성을 저해하는 중대한 정보 누설 위험을 초래합니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
btrfs: fix btrfs_ioctl_space_info() slot_count TOCTOU which can lead to info-leak
btrfs_ioctl_space_info() has a TOCTOU race between two passes over the
block group RAID type lists. The first pass counts entries to determine
the allocation size, then the second pass fills the buffer. The
groups_sem rwlock is released between passes, allowing concurrent block
group removal to reduce the entry count.
When the second pass fills fewer entries than the first pass counted,
copy_to_user() copies the full alloc_size bytes including trailing
uninitialized kmalloc bytes to userspace.
Fix by copying only total_spaces entries (the actually-filled count from
the second pass) instead of alloc_size bytes, and switch to kzalloc so
any future copy size mismatch cannot leak heap data.
📍 영향받는 시스템
Linux kernel (btrfs 서브시스템이 활성화된 모든 버전)
⚔️ 공격 벡터
로컬 권한을 가진 공격자가 btrfs 파일 시스템 관련 ioctl 호출을 통해 메모리 누설을 유도
🛡️ 대응 방법
운영 중인 시스템의 Linux 커널을 최신 안정 버전으로 즉시 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 버전인지 확인하십시오.