loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: slab-use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:3931 [inline] BUG: KASAN: slab-use-after-free in dtSplitPage+0x1cc3/0x36a0 fs/jfs/jfs_dtree.c:1558 Write of size 1 at addr ffff888043628000 by task syz.0.0/5333 CPU: 0 UID: 0 PID: 5333 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 dtMoveEntry fs/jfs/jfs_dtree.c:3931 [inline] dtSplitPage+0x1cc3/0x36a0 fs/jfs/jfs_dtree.c:1558 dtSplitUp fs/jfs/jfs_dtree.c:1089 [inline] dtInsert+0x1081/0x5cd0 fs/jfs/jfs_dtree.c:868 jfs_create+0x75b/0xb10 fs/jfs/namei.c:138 lookup_open fs/namei.c:4511 [inline] open_last_lookups fs/namei.c:4611 [inline] path_openat+0x1395/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:0x7fa3f599c819 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:00007fa3f68effe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fa3f5c15fa0 RCX: 00007fa3f599c819 RDX: 0000000000000000 RSI: 0000000000000010 RDI: 0000200000000100 RBP: 00007fa3f5a32c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fa3f5c16038 R14: 00007fa3f5c15fa0 R15: 00007ffe1dd55938 Allocated by task 5252: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5415 kmalloc_noprof include/linux/slab.h:950 [inline] slab_free_hook mm/slub.c:2641 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x156/0x650 mm/slub.c:6373 tear_down_vmas+0x312/0x520 mm/mmap.c:1262 exit_mmap+0x4b6/0x9e0 mm/mmap.c:1320 __mmput+0x118/0x430 kernel/fork.c:1178 exit_mm+0x18e/0x250 kernel/exit.c:581 do_exit+0x6a2/0x22c0 kernel/exit.c:963 do_group_exit+0x21b/0x2d0 kernel/exit.c:1117 __do_sys_exit_group kernel/exit.c:1128 [inline] __se_sys_exit_group kernel/exit.c:1126 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1126 x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232 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 Freed by task 5250: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6246 [inline] kfree+0x1c5/0x640 mm/slub.c:6561 slab_free_after_rcu_debug+0x62/0x220 mm/slub.c:6295 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869 handle_softirqs+0x22a/0x840 kernel/softirq.c:622 do_softirq+0x76/0xd0 kernel/softirq.c:523 __local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450 handle_signal arch/x86/kernel/signal.c:310 [inline] arch_do_signal_or_restart+0x4a3/0x830 arch/x86/kernel/signal.c:339 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:238 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:328 [inline] do_syscall_64+0x33e/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 __call_rcu_common kernel/rcu/tree.c:3131 [inline] call_rcu+0xee/0x890 kernel/rcu/tree.c:3251 slab_free_hook mm/slub.c:2653 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x462/0x650 mm/slub.c:6373 tear_down_vmas+0x312/0x520 mm/mmap.c:1262 exit_mmap+0x4b6/0x9e0 mm/mmap.c:1320 __mmput+0x118/0x430 kernel/fork.c:1178 exit_mm+0x18e/0x250 kernel/exit.c:581 do_exit+0x6a2/0x22c0 kernel/exit.c:963 do_group_exit+0x21b/0x2d0 kernel/exit.c:1117 __do_sys_exit_group kernel/exit.c:1128 [inline] __se_sys_exit_group kernel/exit.c:1126 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1126 x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232 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 The buggy address belongs to the object at ffff888043628000 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of freed 32-byte region [ffff888043628000, ffff888043628020) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888043628480 pfn:0x43628 flags: 0x4fff00000000200(workingset|node=1|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 04fff00000000200 ffff88801ac41780 ffffea0000f7f850 ffffea0000e4bdd0 raw: ffff888043628480 000000080040003d 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5120, tgid 5120 (dhcpcd-run-hook), ts 54524764591, free_ts 54524613775 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3938 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5218 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x339/0x3d0 mm/slub.c:7251 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __kmalloc_cache_noprof+0x392/0x660 mm/slub.c:5410 kmalloc_noprof include/linux/slab.h:950 [inline] slab_free_hook mm/slub.c:2641 [inline] slab_free mm/slub.c:6246 [inline] kmem_cache_free+0x156/0x650 mm/slub.c:6373 tear_down_vmas+0x312/0x520 mm/mmap.c:1262 exit_mmap+0x4b6/0x9e0 mm/mmap.c:1320 __mmput+0x118/0x430 kernel/fork.c:1178 exec_mmap+0x3b4/0x440 fs/exec.c:893 begin_new_exec+0x134a/0x2480 fs/exec.c:1148 load_elf_binary+0xa47/0x2980 fs/binfmt_elf.c:1010 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x94a/0x1440 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 page last free pid 5120 tgid 5120 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2935 tlb_batch_list_free mm/mmu_gather.c:161 [inline] tlb_finish_mmu+0x144/0x230 mm/mmu_gather.c:552 exit_mmap+0x498/0x9e0 mm/mmap.c:1313 __mmput+0x118/0x430 kernel/fork.c:1178 exec_mmap+0x3b4/0x440 fs/exec.c:893 begin_new_exec+0x134a/0x2480 fs/exec.c:1148 load_elf_binary+0xa47/0x2980 fs/binfmt_elf.c:1010 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x94a/0x1440 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 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: ffff888043627f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888043627f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888043628000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff888043628080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ffff888043628100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================