🔍 CVE-2024-26704

7.8
CVSS Score
HIGH
2024-04-03
2026-08-04 11:16
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ext4 파일 시스템에서 extents 이동 중 moved_len 변수가 적절히 업데이트되지 않아 블록이 중복 해제되는 취약점입니다. 이로 인해 블록이 두 번 해제되면서 데이터 무결성이 손상되거나, TRIM 실행 시 0으로 나누기 오류(zero-division bug)가 발생할 수 있습니다.

💡 쉬운 설명

파일을 옮기는 과정에서 컴퓨터가 이미 사용 중인 공간을 실수로 두 번 지워버리는 오류가 있습니다. 이 오류 때문에 시스템이 계산을 하다가 멈추거나 데이터가 꼬일 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ext4: fix double-free of blocks due to wrong extents moved_len In ext4_move_extents(), moved_len is only updated when all moves are successfully executed, and only discards orig_inode and donor_inode preallocations when moved_len is not zero. When the loop fails to exit after successfully moving some extents, moved_len is not updated and remains at 0, so it does not discard the preallocations. If the moved extents overlap with the preallocated extents, the overlapped extents are freed twice in ext4_mb_release_inode_pa() and ext4_process_freed_data() (as described in commit 94d7c16cbbbd ("ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT")), and bb_free is incremented twice. Hence when trim is executed, a zero-division bug is triggered in mb_update_avg_fragment_size() because bb_free is not zero and bb_fragments is zero. Therefore, update move_len after each extent move to avoid the issue.

📍 영향받는 시스템

Linux kernel (ext4 파일 시스템을 사용하는 버전)

⚔️ 공격 벡터

로컬 공격자가 특수하게 조작된 파일 시스템 작업(EXT4_IOC_MOVE_EXT 등)을 통해 트리거 가능

🛡️ 대응 방법

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

🔧 검증 코드

출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인

Shell / Script
uname -r

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Linux Kernel