ERROR: (device loop2): remounting filesystem as read-only xtLookup: xtSearch returned -5 read_mapping_page failed! jfs_mount: diMount failed w/rc = -5 ================================================================== BUG: KASAN: use-after-free in diFree+0x19eb/0x26b0 fs/jfs/jfs_imap.c:871 Read of size 4 at addr ffff888112400004 by task syz-executor.2/5947 CPU: 0 PID: 5947 Comm: syz-executor.2 Not tainted 6.4.0-rc5-syzkaller-00245-g64569520920a #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351 print_report mm/kasan/report.c:462 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:572 diFree+0x19eb/0x26b0 fs/jfs/jfs_imap.c:871 jfs_evict_inode+0x3de/0x4c0 fs/jfs/inode.c:156 evict+0x2ed/0x6b0 fs/inode.c:665 iput_final fs/inode.c:1747 [inline] iput.part.0+0x50a/0x740 fs/inode.c:1773 iput+0x5c/0x80 fs/inode.c:1763 diFreeSpecial+0x7b/0x110 fs/jfs/jfs_imap.c:548 jfs_mount+0x481/0x8b0 fs/jfs/jfs_mount.c:203 jfs_fill_super+0x5a8/0xd40 fs/jfs/super.c:556 mount_bdev+0x358/0x420 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f74f888d69a Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f74f969ff88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 0000000000002358 RCX: 00007f74f888d69a RDX: 0000000020005d00 RSI: 0000000020000000 RDI: 00007f74f969ffe0 RBP: 00007f74f96a0020 R08: 00007f74f96a0020 R09: 0000000000000004 R10: 0000000000000004 R11: 0000000000000202 R12: 0000000020005d00 R13: 0000000020000000 R14: 00007f74f969ffe0 R15: 0000000020000140 The buggy address belongs to the physical page: page:ffffea0004490000 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x112400 flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff) page_type: 0xffffff7f(buddy) raw: 057ff00000000000 ffffea000450bc08 ffffea0004508208 0000000000000000 raw: 0000000000000000 0000000000000003 00000000ffffff7f 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 0x140cc0(GFP_USER|__GFP_COMP), pid 5339, tgid 5338 (syz-executor.0), ts 1031577481146, free_ts 1031580054448 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502 __alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] __kmalloc_large_node+0x94/0x1d0 mm/slab_common.c:1107 kmalloc_large+0x1c/0xe0 mm/slab_common.c:1124 kmalloc include/linux/slab.h:556 [inline] diMount+0x29/0x830 fs/jfs/jfs_imap.c:105 jfs_mount+0x171/0x8b0 fs/jfs/jfs_mount.c:100 jfs_fill_super+0x5a8/0xd40 fs/jfs/super.c:556 mount_bdev+0x358/0x420 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/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:1302 [inline] free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564 free_unref_page+0x33/0x370 mm/page_alloc.c:2659 diUnmount+0xf1/0x130 fs/jfs/jfs_imap.c:195 jfs_mount+0x48e/0x8b0 fs/jfs/jfs_mount.c:205 jfs_fill_super+0x5a8/0xd40 fs/jfs/super.c:556 mount_bdev+0x358/0x420 fs/super.c:1380 legacy_get_tree+0x109/0x220 fs/fs_context.c:610 vfs_get_tree+0x8d/0x350 fs/super.c:1510 do_new_mount fs/namespace.c:3039 [inline] path_mount+0x134b/0x1e40 fs/namespace.c:3369 do_mount fs/namespace.c:3382 [inline] __do_sys_mount fs/namespace.c:3591 [inline] __se_sys_mount fs/namespace.c:3568 [inline] __x64_sys_mount+0x283/0x300 fs/namespace.c:3568 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff8881123fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881123fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888112400000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888112400080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888112400100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================