🇰🇷 한글 설명
Linux 커널의 OCFS2 파일 시스템에서 extents 이동 시 점유된 클러스터를 피하지 못하는 취약점이 발견되었습니다. 이로 인해 파일 데이터가 다른 inode가 소유한 클러스터로 잘못 복사될 수 있는 위험이 있습니다.
💡 쉬운 설명
파일을 저장할 때 비어 있는 공간을 찾아야 하는데, 실수로 이미 다른 파일이 사용 중인 공간을 선택할 수 있는 오류입니다. 이로 인해 데이터가 덮어씌워지거나 손상될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: avoid moving extents to occupied clusters
For non-auto OCFS2_IOC_MOVE_EXT operations, userspace supplies a physical
me_goal. ocfs2_move_extent() initializes new_phys_cpos from that goal and
expects ocfs2_probe_alloc_group() to replace it with a free run in the
target block group.
The probe currently leaves *phys_cpos unchanged if the scan reaches the
end of the group without finding a free run. An occupied goal at the last
bit can therefore survive the probe and be passed to
__ocfs2_move_extent(), which copies file data into a cluster still owned
by another inode before the bitmap is updated.
When the probe does find a free run, it also subtracts move_len from the
ending bit. The start of an N-bit run ending at i is i - N + 1, so the
current calculation can report the bit immediately before the free run.
Clear *phys_cpos before scanning and use the correct free-run start.
Callers already treat a zero result as -ENOSPC, so failed probes no longer
continue with an occupied caller-controlled goal.
📍 영향받는 시스템
OCFS2 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
사용자 공간에서 OCFS2_IOC_MOVE_EXT 작업을 수행할 때 조작된 물리적 목표 위치를 제공하여 발생
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 해결된 패치 버전인지 배포판 보안 공지를 통해 확인