🇰🇷 한글 설명
Linux 커널의 ext4 파일 시스템에서 xattr 캐시 항목의 참조 횟수가 최대치에 도달했을 때 재시도 로직이 무한 루프에 빠지는 취약점입니다. 손상된 파일 시스템을 사용할 경우 특정 작업이 i_rwsem 잠금을 유지한 채 무한 루프를 돌게 되어, rmdir와 같은 동시 작업이 차단되고 시스템이 멈출 수 있습니다.
💡 쉬운 설명
파일 시스템의 오류로 인해 컴퓨터가 특정 작업을 처리하다가 무한 반복 상태에 빠져 멈추는 현상입니다. 이로 인해 폴더 삭제와 같은 일반적인 작업이 수행되지 않고 시스템이 응답하지 않을 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ext4: stop retrying saturated xattr cache entries
ext4_xattr_block_set() retries when a cache entry selected for reuse
has a saturated reference count after taking the buffer lock. The retry
returns to the mbcache lookup without making that entry ineligible, so
it can select the same unusable entry indefinitely. A task spinning
there can hold the parent directory's i_rwsem and leave concurrent
rmdir callers blocked.
Normally a reusable entry has a reference count below
EXT4_XATTR_REFCOUNT_MAX because the count and MBE_REUSABLE_B are
updated under the same buffer lock. A corrupted filesystem can violate
that invariant. The syzbot reproducer reports allocator and xattr
corruption before triggering this retry loop.
Check the untrusted on-disk count before incrementing it, avoiding
overflow, and clear MBE_REUSABLE_B when it is already saturated. The
next lookup then skips the entry that was just proven unusable. This
mirrors the normal transition at EXT4_XATTR_REFCOUNT_MAX; the release
path marks the entry reusable again on the exact 1024-to-1023
transition.
Using the same QEMU harness and guest parameters, current unpatched
Linux hung in 6 of 8 420-second trials with the do_rmdir signature;
representative NMI backtraces caught the owner spinning in
ext4_xattr_block_set(). The patched kernel completed 28 of 28 trials
without a hung-task report; the final twelve trials exercised the
reviewed overflow-safe form of the change. syzbot's patch testing also
completed without reproducing the hang.
📍 영향받는 시스템
ext4 파일 시스템을 사용하는 Linux 커널 (패치 전 버전)
⚔️ 공격 벡터
손상된(Corrupted) 파일 시스템을 마운트하거나 조작하여 무한 루프 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 최신 패치 버전인지 확인