🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 unwritten extent를 분할하여 초기화할 때, 공간 부족으로 인해 분할이 실패할 경우 데이터가 올바르게 처리되지 않는 취약점입니다. 이 과정에서 일부 영역이 쓰기 상태로 잘못 표시되어 이전의 오래된 데이터(stale data)가 노출될 수 있는 문제가 발생합니다.
💡 쉬운 설명
파일을 저장하는 과정에서 공간을 나누는 작업이 실패하면, 원래 지워져야 할 옛날 데이터가 남아있을 수 있는 문제입니다. 이로 인해 보안상 민감한 정보가 의도치 않게 노출될 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: don't zero the entire extent if EXT4_EXT_DATA_PARTIAL_VALID1
When allocating initialized blocks from a large unwritten extent, or
when splitting an unwritten extent during end I/O and converting it to
initialized, there is currently a potential issue of stale data if the
extent needs to be split in the middle.
0 A B N
[UUUUUUUUUUUU] U: unwritten extent
[--DDDDDDDD--] D: valid data
|<- ->| ----> this range needs to be initialized
ext4_split_extent() first try to split this extent at B with
EXT4_EXT_DATA_ENTIRE_VALID1 and EXT4_EXT_MAY_ZEROOUT flag set, but
ext4_split_extent_at() failed to split this extent due to temporary lack
of space. It zeroout B to N and mark the entire extent from 0 to N
as written.
0 A B N
[WWWWWWWWWWWW] W: written extent
[SSDDDDDDDDZZ] Z: zeroed, S: stale data
ext4_split_extent() then try to split this extent at A with
EXT4_EXT_DATA_VALID2 flag set. This time, it split successfully and left
a stale written extent from 0 to A.
0 A B N
[WW|WWWWWWWWWW]
[SS|DDDDDDDDZZ]
Fix this by pass EXT4_EXT_DATA_PARTIAL_VALID1 to ext4_split_extent_at()
when splitting at B, don't convert the entire extent to written and left
it as unwritten after zeroing out B to N. The remaining work is just
like the standard two-part split. ext4_split_extent() will pass the
EXT4_EXT_DATA_VALID2 flag when it calls ext4_split_extent_at() for the
second time, allowing it to properly handle the split. If the split is
successful, it will keep extent from 0 to A as unwritten.
📍 영향받는 시스템
Linux kernel (ext4 파일 시스템을 사용하는 시스템)
⚔️ 공격 벡터
로컬 사용자가 파일 시스템의 extent 분할 과정을 유도하여 이전 데이터가 남아있는 블록에 접근
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인