loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff88803f7200c0 by task syz.0.16/5892 CPU: 0 UID: 0 PID: 5892 Comm: syz.0.16 Not tainted 6.16.0-rc7-syzkaller-gec2df4364666 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x2b0/0x2c0 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0x1209/0x1f40 fs/jfs/jfs_imap.c:753 txCommit+0x852/0x5430 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8ce/0xce0 fs/jfs/jfs_dtree.c:2674 jfs_readdir+0x1d8f/0x3ae0 fs/jfs/jfs_dtree.c:3031 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x5af/0x770 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xe4/0x260 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2c1af8e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2c1a1fe038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f2c1b1b5fa0 RCX: 00007f2c1af8e969 RDX: 0000000000001000 RSI: 00002000000038c0 RDI: 0000000000000005 RBP: 00007f2c1b010ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2c1b1b5fa0 R15: 00007ffcbd4bc478 Allocated by task 5349: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4340 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tomoyo_get_name+0x20c/0x590 security/tomoyo/memory.c:173 tomoyo_assign_domain+0x272/0x700 security/tomoyo/domain.c:569 tomoyo_find_next_domain+0xda5/0x1aa0 security/tomoyo/domain.c:856 tomoyo_bprm_check_security+0x11c/0x180 security/tomoyo/tomoyo.c:102 security_bprm_check+0x89/0x270 security/security.c:1302 search_binary_handler fs/exec.c:1660 [inline] exec_binprm fs/exec.c:1702 [inline] bprm_execve+0x8ee/0x1450 fs/exec.c:1754 do_execveat_common+0x510/0x6a0 fs/exec.c:1860 do_execve fs/exec.c:1934 [inline] __do_sys_execve fs/exec.c:2010 [inline] __se_sys_execve fs/exec.c:2005 [inline] __x64_sys_execve+0x94/0xb0 fs/exec.c:2005 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803f720000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 192 bytes inside of allocated 211-byte region [ffff88803f720000, ffff88803f7200d3) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3f720 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000000 ffff88801a441b40 ffffea00013930c0 dead000000000002 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 28211790496, free_ts 28189745428 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_track_caller_noprof+0x2f8/0x4e0 mm/slub.c:4347 __do_krealloc mm/slub.c:4905 [inline] krealloc_noprof+0x124/0x340 mm/slub.c:4958 add_sysfs_param+0xc9/0xa20 kernel/params.c:654 kernel_add_sysfs_param+0xb4/0x130 kernel/params.c:811 param_sysfs_builtin+0x1de/0x290 kernel/params.c:850 param_sysfs_builtin_init+0x32/0x40 kernel/params.c:986 do_one_initcall+0x233/0x820 init/main.c:1274 do_initcall_level+0x137/0x1f0 init/main.c:1336 do_initcalls+0x69/0xd0 init/main.c:1352 kernel_init_freeable+0x3d9/0x570 init/main.c:1584 page last free pid 10 tgid 10 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 vfree+0x25a/0x400 mm/vmalloc.c:3434 delayed_vfree_work+0x55/0x80 mm/vmalloc.c:3353 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88803f71ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803f720000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803f720080: 00 00 00 00 00 00 00 00 00 00 03 fc fc fc fc fc ^ ffff88803f720100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803f720180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================