🔍 CVE-2024-47736

5.5
CVSS Score
MEDIUM
2024-10-21
2026-10-15 01:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 EROFS 파일 시스템에서 조작된 이미지 내 중첩된 pcluster를 처리할 때 데드락이 발생하여 작업이 중단되는 취약점입니다. 압축된 I/O 처리 과정에서 BIO 제출 순서가 잘못 정렬되어 캐시된 folio의 잠금 대기 상태가 지속되는 것이 원인입니다.

💡 쉬운 설명

특수하게 만들어진 가짜 파일 시스템 이미지를 사용하면 컴퓨터의 작업이 멈춰버리는 현상이 발생할 수 있습니다. 이는 파일 시스템이 데이터를 읽는 과정에서 서로를 기다리며 무한 루프에 빠지기 때문입니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: erofs: handle overlapped pclusters out of crafted images properly syzbot reported a task hang issue due to a deadlock case where it is waiting for the folio lock of a cached folio that will be used for cache I/Os. After looking into the crafted fuzzed image, I found it's formed with several overlapped big pclusters as below: Ext: logical offset | length : physical offset | length 0: 0.. 16384 | 16384 : 151552.. 167936 | 16384 1: 16384.. 32768 | 16384 : 155648.. 172032 | 16384 2: 32768.. 49152 | 16384 : 537223168.. 537239552 | 16384 ... Here, extent 0/1 are physically overlapped although it's entirely _impossible_ for normal filesystem images generated by mkfs. First, managed folios containing compressed data will be marked as up-to-date and then unlocked immediately (unlike in-place folios) when compressed I/Os are complete. If physical blocks are not submitted in the incremental order, there should be separate BIOs to avoid dependency issues. However, the current code mis-arranges z_erofs_fill_bio_vec() and BIO submission which causes unexpected BIO waits. Second, managed folios will be connected to their own pclusters for efficient inter-queries. However, this is somewhat hard to implement easily if overlapped big pclusters exist. Again, these only appear in fuzzed images so let's simply fall back to temporary short-lived pages for correctness. Additionally, it justifies that referenced managed folios cannot be truncated for now and reverts part of commit 2080ca1ed3e4 ("erofs: tidy up `struct z_erofs_bvec`") for simplicity although it shouldn't be any difference.

📍 영향받는 시스템

Linux Kernel (EROFS 파일 시스템을 사용하는 시스템)

⚔️ 공격 벡터

조작된(crafted) EROFS 파일 시스템 이미지를 마운트하여 시스템 데드락 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트

🔧 검증 코드

출력된 커널 버전이 EROFS 관련 패치가 적용된 최신 버전인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Linux Kernel