loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0x1160/0x1e70 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff8880302f80c0 by task syz.0.15/6127 CPU: 1 UID: 0 PID: 6127 Comm: syz.0.15 Not tainted 6.15.0-rc1-syzkaller-00139-gab59a8605604 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x28f/0x2a0 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0x1160/0x1e70 fs/jfs/jfs_imap.c:753 txCommit+0xa22/0x6c40 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8f3/0xc50 fs/jfs/jfs_dtree.c:2664 jfs_readdir+0x2155/0x4010 fs/jfs/jfs_dtree.c:3020 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x5a9/0x760 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e4/0x4c0 fs/readdir.c:389 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f707fb7e819 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:00007f7080941038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f707fd35fa0 RCX: 00007f707fb7e819 RDX: 0000000000001000 RSI: 00000000200038c0 RDI: 0000000000000005 RBP: 00007f707fbf175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f707fd35fa0 R15: 00007ffd05d65708 Allocated by task 5987: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x9d/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4331 [inline] __kmalloc_noprof+0x28e/0x4d0 mm/slub.c:4343 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] tomoyo_encode2 security/tomoyo/realpath.c:45 [inline] tomoyo_encode+0x26f/0x540 security/tomoyo/realpath.c:80 tomoyo_realpath_from_path+0x59e/0x5e0 security/tomoyo/realpath.c:283 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x25a/0x4f0 security/tomoyo/file.c:771 security_file_open+0xac/0x250 security/security.c:3114 do_dentry_open+0x320/0x1960 fs/open.c:933 vfs_open+0x3b/0x370 fs/open.c:1086 do_open fs/namei.c:3845 [inline] path_openat+0x2caf/0x35d0 fs/namei.c:4004 do_filp_open+0x284/0x4e0 fs/namei.c:4031 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x249/0x2a0 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5987: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2389 [inline] slab_free mm/slub.c:4646 [inline] kfree+0x198/0x430 mm/slub.c:4845 tomoyo_check_open_permission+0x361/0x4f0 security/tomoyo/file.c:786 security_file_open+0xac/0x250 security/security.c:3114 do_dentry_open+0x320/0x1960 fs/open.c:933 vfs_open+0x3b/0x370 fs/open.c:1086 do_open fs/namei.c:3845 [inline] path_openat+0x2caf/0x35d0 fs/namei.c:4004 do_filp_open+0x284/0x4e0 fs/namei.c:4031 do_sys_openat2+0x12b/0x1d0 fs/open.c:1429 do_sys_open fs/open.c:1444 [inline] __do_sys_openat fs/open.c:1460 [inline] __se_sys_openat fs/open.c:1455 [inline] __x64_sys_openat+0x249/0x2a0 fs/open.c:1455 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880302f8080 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes to the right of allocated 64-byte region [ffff8880302f8080, ffff8880302f80c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x302f8 ksm flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801b0418c0 ffffea0000a3da40 dead000000000007 raw: 0000000000000000 0000000000200020 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 68, tgid 68 (kworker/u8:4), ts 19087651871, free_ts 19086684305 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x351d/0x36b0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4934 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab+0x8f/0x3a0 mm/slub.c:2623 new_slab mm/slub.c:2676 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3862 __slab_alloc+0x58/0xa0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] __kmalloc_cache_node_noprof+0x29f/0x3c0 mm/slub.c:4370 kmalloc_node_noprof include/linux/slab.h:928 [inline] __get_vm_area_node+0x132/0x2d0 mm/vmalloc.c:3127 __vmalloc_node_range_noprof+0x349/0x1390 mm/vmalloc.c:3804 __vmalloc_node_noprof+0x80/0xa0 mm/vmalloc.c:3907 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x3f7/0x870 kernel/fork.c:1136 copy_process+0x5dc/0x3d10 kernel/fork.c:2259 kernel_clone+0x227/0x880 kernel/fork.c:2844 user_mode_thread+0x148/0x1c0 kernel/fork.c:2922 call_usermodehelper_exec_work+0x5c/0x230 kernel/umh.c:171 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:1262 [inline] __free_frozen_pages+0xddf/0x10a0 mm/page_alloc.c:2680 vfree+0x1c3/0x360 mm/vmalloc.c:3383 delayed_vfree_work+0x56/0x80 mm/vmalloc.c:3303 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xac3/0x18e0 kernel/workqueue.c:3319 worker_thread+0x870/0xd50 kernel/workqueue.c:3400 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880302f7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880302f8000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8880302f8080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880302f8100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880302f8180: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ==================================================================