CVE 记录列出的受影响产品:Linux · Linuxnday 产品登记表中 Linux kernel 的产品类型
当前阶段
DIS
披露
CVSS
7.8 HIGH v3.1
# 生命周期
横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
尚无记录
ITW在野
尚无记录
KEVKEV
尚无记录
# 摘要
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline
Syzbot found the following issue:
loop0: detected capacity change from 0 to 2048
EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 without journal. Quota mode: none.
==================================================================BUG: KASAN: use-after-free in ext4_ext_binsearch_idx fs/ext4/extents.c:768[inline]BUG: KASAN: use-after-free in ext4_find_extent+0x76e/0xd90fs/ext4/extents.c:931Read of size 4 at addr ffff888073644750 by task syz-executor420/5067
CPU: 0 PID: 5067 Comm: syz-executor420 Not tainted 6.2.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:<TASK>__dump_stacklib/dump_stack.c:88[inline]dump_stack_lvl+0x1b1/0x290lib/dump_stack.c:106print_address_description+0x74/0x340mm/kasan/report.c:306print_report+0x107/0x1f0mm/kasan/report.c:417kasan_report+0xcd/0x100mm/kasan/report.c:517ext4_ext_binsearch_idxfs/ext4/extents.c:768[inline]ext4_find_extent+0x76e/0xd90fs/ext4/extents.c:931ext4_clu_mapped+0x117/0x970fs/ext4/extents.c:5809ext4_insert_delayed_blockfs/ext4/inode.c:1696[inline]ext4_da_map_blocksfs/ext4/inode.c:1806[inline]ext4_da_get_block_prep+0x9e8/0x13c0fs/ext4/inode.c:1870ext4_block_write_begin+0x6a8/0x2290fs/ext4/inode.c:1098ext4_da_write_begin+0x539/0x760fs/ext4/inode.c:3082generic_perform_write+0x2e4/0x5e0mm/filemap.c:3772ext4_buffered_write_iter+0x122/0x3a0fs/ext4/file.c:285ext4_file_write_iter+0x1d0/0x18f0call_write_iterinclude/linux/fs.h:2186[inline]new_sync_writefs/read_write.c:491[inline]vfs_write+0x7dc/0xc50fs/read_write.c:584ksys_write+0x177/0x2a0fs/read_write.c:637do_syscall_x64arch/x86/entry/common.c:50[inline]do_syscall_64+0x3d/0xb0arch/x86/entry/common.c:80entry_SYSCALL_64_after_hwframe+0x63/0xcdRIP: 0033:0x7f4b7a9737b9RSP: 002b:00007ffc5cac3668 EFLAGS: 00000246 ORIG_RAX: 0000000000000001RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4b7a9737b9RDX: 00000000175d9003 RSI: 0000000020000200 RDI: 0000000000000004RBP: 00007f4b7a933050 R08: 0000000000000000 R09: 0000000000000000R10: 000000000000079f R11: 0000000000000246 R12: 00007f4b7a9330e0R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000</TASK>
Above issue is happens when enable bigalloc and inline data feature. As
commit 131294c35ed6 fixed delayed allocation bug in ext4_clu_mapped for
bigalloc + inline. But it only resolved issue when has inline data, if
inline data has been converted to extent(ext4_da_convert_inline_data_to_extent)
before writepages, there is no EXT4_STATE_MAY_INLINE_DATA flag. However
i_data is still store inline data in this scene. Then will trigger UAF
when find extent.
To resolve above issue, there is need to add judge "ext4_has_inline_data(inode)"
in ext4_clu_mapped().