🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 check_xattrs() 함수 내 경계 검사 오류로 인해 발생하는 취약점입니다. 잘못된 경계 검사로 인해 xattr 엔트리를 읽는 과정에서 유효한 영역을 벗어난 메모리에 접근하는 Out-of-bounds 접근이 발생할 수 있습니다.
💡 쉬운 설명
파일의 추가 정보를 읽는 과정에서 데이터의 끝부분을 제대로 확인하지 못해, 허용되지 않은 메모리 영역을 읽게 되는 문제입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix bounds check in check_xattrs() to prevent out-of-bounds access
The bounds check for the next xattr entry in check_xattrs() uses
(void *)next >= end, which allows next to point within sizeof(u32)
bytes of end. On the next loop iteration, IS_LAST_ENTRY() reads 4
bytes via *(__u32 *)(entry), which can overrun the valid xattr region.
For example, if next lands at end - 1, the check passes since
next < end, but IS_LAST_ENTRY() reads 4 bytes starting at end - 1,
accessing 3 bytes beyond the valid region.
Fix this by changing the check to (void *)next + sizeof(u32) > end,
ensuring there is always enough space for the IS_LAST_ENTRY() read
on the subsequent iteration.
📍 영향받는 시스템
ext4 파일 시스템을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
조작된 xattr(확장 속성) 데이터를 포함한 파일 시스템을 마운트하거나 접근하여 메모리 경계 초과 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 최신 패치 버전인지 확인