🇰🇷 한글 설명
Linux 커널의 JFS 파일 시스템에서 dbMount() 함수가 AG(Allocation Group) 매개변수를 적절히 검증하지 않아 발생하는 취약점입니다. 손상된 메타데이터를 처리할 때 잘못된 비트 시프트 연산이 발생하여 시스템 충돌이나 정의되지 않은 동작을 유발할 수 있습니다.
💡 쉬운 설명
파일 시스템의 정보가 잘못되었을 때 이를 제대로 확인하지 못해 컴퓨터가 갑자기 멈추거나 오류가 발생하는 문제입니다. 나쁜 의도를 가진 데이터가 입력되면 시스템이 계산 오류를 일으켜 작동을 멈출 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
jfs: validate AG parameters in dbMount() to prevent crashes
Validate db_agheight, db_agwidth, and db_agstart in dbMount to catch
corrupted metadata early and avoid undefined behavior in dbAllocAG.
Limits are derived from L2LPERCTL, LPERCTL/MAXAG, and CTLTREESIZE:
- agheight: 0 to L2LPERCTL/2 (0 to 5) ensures shift
(L2LPERCTL - 2*agheight) >= 0.
- agwidth: 1 to min(LPERCTL/MAXAG, 2^(L2LPERCTL - 2*agheight))
ensures agperlev >= 1.
- Ranges: 1-8 (agheight 0-3), 1-4 (agheight 4), 1 (agheight 5).
- LPERCTL/MAXAG = 1024/128 = 8 limits leaves per AG;
2^(10 - 2*agheight) prevents division to 0.
- agstart: 0 to CTLTREESIZE-1 - agwidth*(MAXAG-1) keeps ti within
stree (size 1365).
- Ranges: 0-1237 (agwidth 1), 0-348 (agwidth 8).
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:1400:9
shift exponent -335544310 is negative
CPU: 0 UID: 0 PID: 5822 Comm: syz-executor130 Not tainted 6.14.0-rc5-syzkaller #0
Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_shift_out_of_bounds+0x3c8/0x420 lib/ubsan.c:468
dbAllocAG+0x1087/0x10b0 fs/jfs/jfs_dmap.c:1400
dbDiscardAG+0x352/0xa20 fs/jfs/jfs_dmap.c:1613
jfs_ioc_trim+0x45a/0x6b0 fs/jfs/jfs_discard.c:105
jfs_ioctl+0x2cd/0x3e0 fs/jfs/ioctl.c:131
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:906 [inline]
__se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
📍 영향받는 시스템
JFS 파일 시스템을 사용하는 Linux 커널 (특히 6.14.0-rc5 이전 버전)
⚔️ 공격 벡터
손상된 메타데이터를 포함한 JFS 파일 시스템 마운트 또는 관련 ioctl 호출을 통한 로컬 공격
🛡️ 대응 방법
JFS의 AG 매개변수 검증 로직이 포함된 최신 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 버전(패치 적용 버전)인지 확인하십시오.