🇰🇷 한글 설명
Linux 커널의 erofs 파일시스템에서 손상된 subpage compact 인덱스로 인한 무한 루프 취약점입니다. clusterofs가 lclustersize보다 커지는 경우 발생하며, z_erofs_load_lcluster_from_disk() 함수에 검증 로직을 추가하여 해결됩니다.
💡 쉬운 설명
특수하게 조작된 파일시스템 이미지를 통해 Linux 커널이 무한 루프에 빠져 시스템이 멈출 수 있는 문제입니다. 이는 손상된 파일시스템 데이터 구조 검증 부족으로 인한 것입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
erofs: avoid infinite loops due to corrupted subpage compact indexes
Robert reported an infinite loop observed by two crafted images.
The root cause is that `clusterofs` can be larger than `lclustersize`
for !NONHEAD `lclusters` in corrupted subpage compact indexes, e.g.:
blocksize = lclustersize = 512 lcn = 6 clusterofs = 515
Move the corresponding check for full compress indexes to
`z_erofs_load_lcluster_from_disk()` to also cover subpage compact
compress indexes.
It also fixes the position of `m->type >= Z_EROFS_LCLUSTER_TYPE_MAX`
check, since it should be placed right after
`z_erofs_load_{compact,full}_lcluster()`.
📍 영향받는 시스템
Linux kernel with erofs filesystem support (모든 버전)
⚔️ 공격 벡터
Crafted/malicious erofs filesystem image를 마운트하여 kernel에서 infinite loop 유발
🛡️ 대응 방법
Linux kernel 업데이트 (erofs subpage compact index validation 패치 포함)
🔧 검증 코드
함수가 존재하고 clusterofs 검증 로직이 있으면 패치가 적용된 것입니다.
grep -r 'z_erofs_load_lcluster_from_disk' /usr/src/linux*/fs/erofs/ 2>/dev/null | head -1