syzbot


KFENCE: memory corruption in xfs_idata_realloc

Status: closed as dup on 2024/10/10 07:50
Subsystems: xfs
[Documentation on labels]
Reported-by: syzbot+8a8170685a482c92e86a@syzkaller.appspotmail.com
First crash: 77d, last: 74d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KFENCE: memory corruption in add_sysfs_param kernel 1113 74d 78d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [xfs?] KFENCE: memory corruption in xfs_idata_realloc 3 (4) 2024/10/10 08:01

Sample crash report:
XFS (loop2): Quotacheck: Done.
==================================================================
BUG: KFENCE: memory corruption in krealloc_noprof+0x160/0x2e0

Corrupted memory at 0xffff88823bedafeb [ 0x03 0x00 0xd8 0x62 0x75 0x73 0x01 0x00 0x00 0x11 0x4c 0x00 0x00 0x00 0x00 0x00 ] (in kfence-#108):
 krealloc_noprof+0x160/0x2e0
 xfs_idata_realloc+0x116/0x1b0 fs/xfs/libxfs/xfs_inode_fork.c:523
 xfs_dir2_sf_addname_easy fs/xfs/libxfs/xfs_dir2_sf.c:469 [inline]
 xfs_dir2_sf_addname+0x899/0x1b60 fs/xfs/libxfs/xfs_dir2_sf.c:432
 xfs_dir_createname_args+0x152/0x200 fs/xfs/libxfs/xfs_dir2.c:308
 xfs_dir_createname+0x4b3/0x640 fs/xfs/libxfs/xfs_dir2.c:361
 xfs_dir_create_child+0xe3/0x490 fs/xfs/libxfs/xfs_dir2.c:860
 xfs_create+0x8cc/0xf60 fs/xfs/xfs_inode.c:722
 xfs_generic_create+0x5d5/0xf50 fs/xfs/xfs_iops.c:213
 lookup_open fs/namei.c:3595 [inline]
 open_last_lookups fs/namei.c:3694 [inline]
 path_openat+0x1c03/0x3590 fs/namei.c:3930
 do_filp_open+0x235/0x490 fs/namei.c:3960
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1441
 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

kfence-#108: 0xffff88823bedafa0-0xffff88823bedafea, size=75, cache=kmalloc-96

allocated by task 7203 on cpu 1 at 147.184900s (0.409032s ago):
 kmalloc_noprof include/linux/slab.h:882 [inline]
 xfs_init_local_fork fs/xfs/libxfs/xfs_inode_fork.c:55 [inline]
 xfs_iformat_local+0x2db/0x620 fs/xfs/libxfs/xfs_inode_fork.c:97
 xfs_iformat_data_fork+0x38f/0x7b0 fs/xfs/libxfs/xfs_inode_fork.c:264
 xfs_inode_from_disk+0xaa9/0xf60 fs/xfs/libxfs/xfs_inode_buf.c:254
 xfs_iget_cache_miss fs/xfs/xfs_icache.c:683 [inline]
 xfs_iget+0xc5a/0x2f00 fs/xfs/xfs_icache.c:821
 xfs_mountfs+0x1040/0x2020 fs/xfs/xfs_mount.c:873
 xfs_fs_fill_super+0x11f0/0x1460 fs/xfs/xfs_super.c:1765
 get_tree_bdev+0x3f7/0x570 fs/super.c:1635
 vfs_get_tree+0x90/0x2b0 fs/super.c:1800
 do_new_mount+0x2be/0xb40 fs/namespace.c:3507
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032
 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

freed by task 7203 on cpu 0 at 147.535434s (0.189887s ago):
 krealloc_noprof+0x160/0x2e0
 xfs_idata_realloc+0x116/0x1b0 fs/xfs/libxfs/xfs_inode_fork.c:523
 xfs_dir2_sf_addname_easy fs/xfs/libxfs/xfs_dir2_sf.c:469 [inline]
 xfs_dir2_sf_addname+0x899/0x1b60 fs/xfs/libxfs/xfs_dir2_sf.c:432
 xfs_dir_createname_args+0x152/0x200 fs/xfs/libxfs/xfs_dir2.c:308
 xfs_dir_createname+0x4b3/0x640 fs/xfs/libxfs/xfs_dir2.c:361
 xfs_dir_create_child+0xe3/0x490 fs/xfs/libxfs/xfs_dir2.c:860
 xfs_create+0x8cc/0xf60 fs/xfs/xfs_inode.c:722
 xfs_generic_create+0x5d5/0xf50 fs/xfs/xfs_iops.c:213
 lookup_open fs/namei.c:3595 [inline]
 open_last_lookups fs/namei.c:3694 [inline]
 path_openat+0x1c03/0x3590 fs/namei.c:3930
 do_filp_open+0x235/0x490 fs/namei.c:3960
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0x247/0x2a0 fs/open.c:1441
 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

CPU: 0 UID: 0 PID: 7203 Comm: syz.2.194 Not tainted 6.12.0-rc1-next-20241003-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/07 15:01 linux-next c02d24a5af66 d7906eff .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/07 09:13 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/07 09:08 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/07 09:06 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/07 04:29 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/06 21:01 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
2024/10/04 23:37 linux-next c02d24a5af66 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KFENCE: memory corruption in xfs_idata_realloc
* Struck through repros no longer work on HEAD.