loop0: detected capacity change from 0 to 32768 loop0: detected capacity change from 32768 to 64 syz.0.0: attempt to access beyond end of device loop0: rw=8390657, sector=30752, nr_sectors = 8 limit=64 lbmIODone: I/O error in JFS log syz.0.0: attempt to access beyond end of device loop0: rw=8390657, sector=30760, nr_sectors = 8 limit=64 lbmIODone: I/O error in JFS log ================================================================== BUG: KASAN: use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:3934 [inline] BUG: KASAN: use-after-free in dtSplitPage+0x1e37/0x3b20 fs/jfs/jfs_dtree.c:1561 Write of size 1 at addr ffff888040d81000 by task syz.0.0/5337 CPU: 0 UID: 0 PID: 5337 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~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 dtMoveEntry fs/jfs/jfs_dtree.c:3934 [inline] dtSplitPage+0x1e37/0x3b20 fs/jfs/jfs_dtree.c:1561 dtSplitUp fs/jfs/jfs_dtree.c:1092 [inline] dtInsert+0x109b/0x5f40 fs/jfs/jfs_dtree.c:871 jfs_create+0x6c8/0xa80 fs/jfs/namei.c:137 lookup_open fs/namei.c:4440 [inline] open_last_lookups fs/namei.c:4540 [inline] path_openat+0x18bb/0x3dd0 fs/namei.c:4784 do_filp_open+0x1fa/0x410 fs/namei.c:4814 do_sys_openat2+0x121/0x200 fs/open.c:1430 do_sys_open fs/open.c:1436 [inline] __do_sys_creat fs/open.c:1514 [inline] __se_sys_creat fs/open.c:1508 [inline] __x64_sys_creat+0x8f/0xc0 fs/open.c:1508 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fd17638f7c9 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:00007fd1771a1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fd1765e5fa0 RCX: 00007fd17638f7c9 RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000200000000100 RBP: 00007fd176413f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd1765e6038 R14: 00007fd1765e5fa0 R15: 00007ffe728234e8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888000000000 pfn:0x40d81 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0000dbee08 ffffea0001036088 0000000000000000 raw: ffff888000000000 ffff888042cd0480 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 5103, tgid 5103 (cmp), ts 47043516215, free_ts 47070475282 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0x24e0/0x2580 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_frozen_pages_noprof mm/mempolicy.c:2557 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2577 pagetable_alloc_noprof include/linux/mm.h:3190 [inline] pmd_alloc_one_noprof include/asm-generic/pgalloc.h:143 [inline] __pmd_alloc+0x3a/0x5d0 mm/memory.c:6666 pmd_alloc include/linux/mm.h:3106 [inline] __handle_mm_fault mm/memory.c:6363 [inline] handle_mm_fault+0xe51/0x32b0 mm/memory.c:6580 do_user_addr_fault+0xa7c/0x1380 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x71/0xd0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xc8e/0x1720 kernel/rcu/tree.c:2857 handle_softirqs+0x22b/0x7c0 kernel/softirq.c:622 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff888040d80f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888040d80f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888040d81000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888040d81080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888040d81100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================