loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in diFree+0x19c6/0x2660 fs/jfs/jfs_imap.c:871 Read of size 4 at addr ffff888025170004 by task syz-executor100/3652 CPU: 1 PID: 3652 Comm: syz-executor100 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 diFree+0x19c6/0x2660 fs/jfs/jfs_imap.c:871 jfs_evict_inode+0x3c1/0x4a0 fs/jfs/inode.c:156 evict+0x2ed/0x6b0 fs/inode.c:664 iput_final fs/inode.c:1747 [inline] iput.part.0+0x55d/0x810 fs/inode.c:1773 iput+0x58/0x70 fs/inode.c:1763 diFreeSpecial+0x73/0x100 fs/jfs/jfs_imap.c:548 jfs_umount+0x130/0x3f0 fs/jfs/jfs_umount.c:65 jfs_fill_super+0xa47/0xc70 fs/jfs/super.c:600 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd612e050ea Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd56ffa298 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fd612e050ea RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffd56ffa2b0 RBP: 00007ffd56ffa2b0 R08: 00007ffd56ffa2f0 R09: 0000000000000002 R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000004 R13: 00007ffd56ffa2f0 R14: 0000000000000357 R15: 0000000020005228 The buggy address belongs to the physical page: page:ffffea0000945c00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25170 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000930a08 ffff8880b9b40820 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x40cc0(GFP_KERNEL|__GFP_COMP), pid 3652, tgid 3652 (syz-executor100), ts 51369622625, free_ts 51370801556 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 kmalloc_order+0x34/0xf0 mm/slab_common.c:933 kmalloc_order_trace+0x13/0x120 mm/slab_common.c:949 kmalloc_large include/linux/slab.h:529 [inline] kmalloc include/linux/slab.h:593 [inline] diMount+0x2a/0x830 fs/jfs/jfs_imap.c:105 jfs_mount+0x393/0x7b0 fs/jfs/jfs_mount.c:179 jfs_fill_super+0x5a4/0xc70 fs/jfs/super.c:556 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 diUnmount+0xed/0x120 fs/jfs/jfs_imap.c:195 jfs_umount+0x128/0x3f0 fs/jfs/jfs_umount.c:63 jfs_fill_super+0xa47/0xc70 fs/jfs/super.c:600 mount_bdev+0x34d/0x410 fs/super.c:1400 legacy_get_tree+0x105/0x220 fs/fs_context.c:610 vfs_get_tree+0x89/0x2f0 fs/super.c:1530 do_new_mount fs/namespace.c:3040 [inline] path_mount+0x1326/0x1e20 fs/namespace.c:3370 do_mount fs/namespace.c:3383 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88802516ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802516ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888025170000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888025170080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888025170100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================