================================================================== BUG: KASAN: use-after-free in diRead+0x94f/0xb90 fs/jfs/jfs_imap.c:329 Read of size 4 at addr ffff888037270010 by task syz.0.0/5335 CPU: 0 UID: 0 PID: 5335 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 diRead+0x94f/0xb90 fs/jfs/jfs_imap.c:329 jfs_iget+0x89/0x470 fs/jfs/inode.c:35 jfs_lookup+0x220/0x420 fs/jfs/namei.c:1472 lookup_open fs/namei.c:4484 [inline] open_last_lookups fs/namei.c:4611 [inline] path_openat+0x11ac/0x3860 fs/namei.c:4855 do_file_open+0x23e/0x4a0 fs/namei.c:4887 do_sys_openat2+0x113/0x200 fs/open.c:1364 do_sys_open fs/open.c:1370 [inline] __do_sys_creat fs/open.c:1448 [inline] __se_sys_creat fs/open.c:1442 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1442 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f176f39ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f177028ffe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007f176f616180 RCX: 00007f176f39ce59 RDX: 0000000000000000 RSI: 000000000000000d RDI: 0000200000000240 RBP: 00007f176f432d6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f176f616218 R14: 00007f176f616180 R15: 00007ffef1547f38 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888037270000 pfn:0x37270 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: ffff888037270000 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 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5327, tgid 5326 (syz.0.0), ts 93019806430, free_ts 93067300880 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x22d/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_pages_mpol+0x235/0x490 mm/mempolicy.c:2490 ___kmalloc_large_node+0x4e/0x120 mm/slub.c:5236 __kmalloc_large_noprof+0x1a/0x90 mm/slub.c:5257 kmalloc_noprof include/linux/slab.h:947 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] diMount+0x29/0xd80 fs/jfs/jfs_imap.c:105 jfs_mount+0x426/0x870 fs/jfs/jfs_mount.c:176 jfs_fill_super+0x6bc/0xd80 fs/jfs/super.c:523 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694 vfs_get_tree+0x92/0x2a0 fs/super.c:1754 fc_mount fs/namespace.c:1193 [inline] do_new_mount_fc fs/namespace.c:3758 [inline] do_new_mount+0x341/0xd30 fs/namespace.c:3834 do_mount fs/namespace.c:4167 [inline] __do_sys_mount fs/namespace.c:4383 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4360 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5328 tgid 5326 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943 diUnmount+0xff/0x130 fs/jfs/jfs_imap.c:195 jfs_mount_rw+0x32b/0x670 fs/jfs/jfs_mount.c:239 jfs_reconfigure+0x5f9/0xa00 fs/jfs/super.c:409 reconfigure_super+0x227/0x8a0 fs/super.c:1080 do_remount fs/namespace.c:3400 [inline] path_mount+0xdc5/0x10e0 fs/namespace.c:4146 do_mount fs/namespace.c:4167 [inline] __do_sys_mount fs/namespace.c:4383 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4360 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88803726ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803726ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888037270000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888037270080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888037270100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================