🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 data=journal 옵션 사용 시, 인라인 데이터 상태를 제대로 확인하지 않아 발생하는 커널 버그입니다. 인라인 데이터 변환 실패 후 특정 플래그가 불일치할 경우, 잘못된 메모리 범위에 쓰기를 시도하여 커널 BUG_ON을 유발할 수 있습니다.
💡 쉬운 설명
파일을 저장하는 과정에서 시스템이 데이터의 위치를 잘못 계산하여 오류를 일으키는 문제입니다. 이로 인해 시스템이 갑자기 멈추거나 커널 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix kernel BUG in ext4_write_inline_data_end
When the data=journal mount option is used, the ext4_journalled_write_end()
function incorrectly calls ext4_write_inline_data_end() without checking
if the EXT4_STATE_MAY_INLINE_DATA flag is still set on the inode.
If a previous attempt to convert the inline data to an extent failed (e.g.
due to ENOSPC), the EXT4_STATE_MAY_INLINE_DATA flag is cleared, but
the EXT4_INODE_INLINE_DATA flag remains set. In this scenario, the next
call to ext4_write_begin() will not prepare the inline data xattr for
writing, but ext4_journalled_write_end() will incorrectly attempt to write
to it, triggering a BUG_ON(pos + len > EXT4_I(inode)->i_inline_size) in
ext4_write_inline_data() since i_inline_size was not expanded.
Fix this by ensuring that ext4_journalled_write_end() only calls
ext4_write_inline_data_end() if the EXT4_STATE_MAY_INLINE_DATA flag is
set, mirroring the behavior of ext4_write_end() and ext4_da_write_end().
📍 영향받는 시스템
Linux kernel (ext4 파일 시스템 사용 및 data=journal 마운트 옵션 활성화 환경)
⚔️ 공격 벡터
로컬 사용자가 특정 조건(인라인 데이터 변환 실패 후 재작성)을 유도하여 커널 패닉 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 최신 버전인지 확인하십시오.