🔍 CVE-2026-31452

7.8
CVSS Score
HIGH
2026-04-22
2026-11-05 22:18
✅ 완료

🇰🇷 한글 설명

Linux 커널의 ext4 파일 시스템에서 truncate() 함수를 통해 파일 크기를 인라인 데이터 용량 이상으로 늘릴 때, 인라인 데이터 플래그가 유지되어 파일 시스템 불일치가 발생하는 취약점입니다. 이로 인해 ext4_write_inline_data() 함수에서 BUG_ON()이 호출되어 커널 패닉이 발생할 수 있습니다. 수정된 버전에서는 setattr() 시 인라인 용량을 초과하면 자동으로 익스텐트 기반 저장 방식으로 전환합니다.

💡 쉬운 설명

파일의 크기를 갑자기 크게 늘릴 때, 파일 시스템이 데이터를 저장하는 방식이 제대로 바뀌지 않아 컴퓨터 시스템이 멈추는 문제입니다. 이 문제를 해결하면 파일 크기가 커지더라도 데이터 저장 방식이 자동으로 안전하게 변경됩니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: ext4: convert inline data to extents when truncate exceeds inline size Add a check in ext4_setattr() to convert files from inline data storage to extent-based storage when truncate() grows the file size beyond the inline capacity. This prevents the filesystem from entering an inconsistent state where the inline data flag is set but the file size exceeds what can be stored inline. Without this fix, the following sequence causes a kernel BUG_ON(): 1. Mount filesystem with inode that has inline flag set and small size 2. truncate(file, 50MB) - grows size but inline flag remains set 3. sendfile() attempts to write data 4. ext4_write_inline_data() hits BUG_ON(write_size > inline_capacity) The crash occurs because ext4_write_inline_data() expects inline storage to accommodate the write, but the actual inline capacity (~60 bytes for i_block + ~96 bytes for xattrs) is far smaller than the file size and write request. The fix checks if the new size from setattr exceeds the inode's actual inline capacity (EXT4_I(inode)->i_inline_size) and converts the file to extent-based storage before proceeding with the size change. This addresses the root cause by ensuring the inline data flag and file size remain consistent during truncate operations.

📍 영향받는 시스템

Linux kernel (ext4 filesystem 사용 환경)

⚔️ 공격 벡터

로컬 사용자가 truncate() 시스템 호출을 사용하여 인라인 데이터 용량을 초과하는 크기로 파일을 확장함으로써 커널 패닉 유도

🛡️ 대응 방법

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