loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-out-of-bounds in diWrite+0xde3/0x19b0 fs/jfs/jfs_imap.c:753 Write of size 32 at addr ffff888027b010c0 by task syz.0.16/6533 CPU: 0 UID: 0 PID: 6533 Comm: syz.0.16 Not tainted 6.13.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 diWrite+0xde3/0x19b0 fs/jfs/jfs_imap.c:753 txCommit+0xa1a/0x6b90 fs/jfs/jfs_txnmgr.c:1255 add_missing_indices+0x8b3/0xbf0 fs/jfs/jfs_dtree.c:2663 jfs_readdir+0x1fc5/0x3c50 fs/jfs/jfs_dtree.c:3019 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x571/0x800 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1e2/0x4b0 fs/readdir.c:389 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x7f7cb2185d29 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:00007f7cb2f24038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f7cb2375fa0 RCX: 00007f7cb2185d29 RDX: 000000000000009e RSI: 0000000020000280 RDI: 0000000000000004 RBP: 00007f7cb2201b08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7cb2375fa0 R15: 00007ffca2d62838 Allocated by task 6533: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x4b/0x60 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4119 [inline] slab_alloc_node mm/slub.c:4168 [inline] kmem_cache_alloc_noprof+0x1d4/0x340 mm/slub.c:4175 ima_inode_get+0xf3/0x4e0 security/integrity/ima/ima_iint.c:99 process_measurement+0x449/0x1fa0 security/integrity/ima/ima_main.c:253 ima_file_check+0xd9/0x120 security/integrity/ima/ima_main.c:572 security_file_post_open+0xb9/0x280 security/security.c:3121 do_open fs/namei.c:3830 [inline] path_openat+0x2cc9/0x3590 fs/namei.c:3987 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 do_sys_open fs/open.c:1417 [inline] __do_sys_openat fs/open.c:1433 [inline] __se_sys_openat fs/open.c:1428 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1428 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x82/0x160 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff888027b01000 which belongs to the cache ima_iint_cache of size 208 The buggy address is located 192 bytes inside of allocated 208-byte region [ffff888027b01000, ffff888027b010d0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27b01 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff88801c27e500 dead000000000122 0000000000000000 raw: 0000000000000000 00000000800f000f 00000001f5000000 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 0x52c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6533, tgid 6531 (syz.0.16), ts 155811084014, free_ts 147600610159 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ee/0x220 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x3607/0x3750 mm/page_alloc.c:3476 __alloc_pages_noprof+0x256/0x690 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 alloc_slab_page+0x6a/0x110 mm/slub.c:2423 allocate_slab+0x5a/0x2b0 mm/slub.c:2589 new_slab mm/slub.c:2642 [inline] ___slab_alloc+0xc35/0x14a0 mm/slub.c:3830 __slab_alloc+0x58/0xa0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] kmem_cache_alloc_noprof+0x264/0x340 mm/slub.c:4175 ima_inode_get+0xf3/0x4e0 security/integrity/ima/ima_iint.c:99 process_measurement+0x449/0x1fa0 security/integrity/ima/ima_main.c:253 ima_file_check+0xd9/0x120 security/integrity/ima/ima_main.c:572 security_file_post_open+0xb9/0x280 security/security.c:3121 do_open fs/namei.c:3830 [inline] path_openat+0x2cc9/0x3590 fs/namei.c:3987 do_filp_open+0x27f/0x4e0 fs/namei.c:4014 do_sys_openat2+0x13e/0x1d0 fs/open.c:1402 page last free pid 6187 tgid 6187 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xd36/0xff0 mm/page_alloc.c:2659 vfree+0x1c3/0x350 mm/vmalloc.c:3383 kcov_put kernel/kcov.c:439 [inline] kcov_close+0x28/0x50 kernel/kcov.c:535 __fput+0x23c/0xa50 fs/file_table.c:450 task_work_run+0x24f/0x310 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa2a/0x28d0 kernel/exit.c:938 do_group_exit+0x207/0x2c0 kernel/exit.c:1087 get_signal+0x16a6/0x1740 kernel/signal.c:3017 arch_do_signal_or_restart+0x96/0x830 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xcd/0x330 kernel/entry/common.c:218 do_syscall_64+0x8e/0x160 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x76/0x7e Memory state around the buggy address: ffff888027b00f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888027b01000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888027b01080: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ^ ffff888027b01100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888027b01180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================