================================================================== BUG: KASAN: use-after-free in diRead+0x975/0xbc0 fs/jfs/jfs_imap.c:329 Read of size 4 at addr ffff888013e08010 by task syz.0.0/5327 CPU: 0 UID: 0 PID: 5327 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+0x975/0xbc0 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+0x9e1/0x1a40 fs/namei.c:4557 open_last_lookups fs/namei.c:4796 [inline] path_openat+0x677/0x1d60 fs/namei.c:5026 do_file_open+0x23e/0x4a0 fs/namei.c:5058 do_sys_openat2+0x115/0x200 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f90e459e559 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:00007f90e09f4fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f90e4826180 RCX: 00007f90e459e559 RDX: 0000000000101042 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007f90e46358b0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000015 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f90e4826218 R14: 00007f90e4826180 R15: 00007ffe7e31f4c8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888013e08000 pfn:0x13e08 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffff88801fa417b0 ffff88801fa417b0 0000000000000000 raw: ffff888013e08000 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 5323, tgid 5322 (syz.0.0), ts 103356088443 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_pages_mpol+0x21e/0x390 mm/mempolicy.c:2486 ___kmalloc_large_node+0x4f/0x120 mm/slub.c:5353 __kmalloc_large_noprof+0x1a/0x90 mm/slub.c:5375 _kmalloc_noprof include/linux/slab.h:988 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] diMount+0x29/0xd80 fs/jfs/jfs_imap.c:105 jfs_mount+0x426/0x870 fs/jfs/jfs_mount.c:176 jfs_fill_super+0x69f/0xda0 fs/jfs/super.c:524 get_tree_bdev_flags+0x430/0x4f0 fs/super.c:1872 vfs_get_tree+0x92/0x2a0 fs/super.c:1932 fc_mount fs/namespace.c:1278 [inline] do_new_mount_fc fs/namespace.c:3885 [inline] do_new_mount+0x325/0xb00 fs/namespace.c:3961 do_mount fs/namespace.c:4325 [inline] __do_sys_mount fs/namespace.c:4543 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4520 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5324 tgid 5322 ts 103398738418 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962 diUnmount+0xff/0x130 fs/jfs/jfs_imap.c:195 jfs_mount_rw+0x2dc/0x670 fs/jfs/jfs_mount.c:239 jfs_reconfigure+0x5da/0x990 fs/jfs/super.c:409 reconfigure_super+0x232/0x8f0 fs/super.c:1128 do_remount fs/namespace.c:3523 [inline] path_mount+0xd4e/0x1050 fs/namespace.c:4304 do_mount fs/namespace.c:4325 [inline] __do_sys_mount fs/namespace.c:4543 [inline] __se_sys_mount+0x31d/0x420 fs/namespace.c:4520 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888013e07f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888013e07f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888013e08000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888013e08080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888013e08100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================