ci2 starts bisection 2023-01-31 17:02:57.432888319 +0000 UTC m=+110281.485948163 bisecting fixing commit since 7f2e600bf63a9cda882a6c86de04183e5061e8ee building syzkaller on 97de9cfcb0b25b95878e2eaaf3652a2faa8dd8f4 ensuring issue is reproducible on original commit 7f2e600bf63a9cda882a6c86de04183e5061e8ee testing commit 7f2e600bf63a9cda882a6c86de04183e5061e8ee gcc compiler: Debian clang version 13.0.1-6~deb11u1, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6ab2392b7b79fb3fe6972921583a609ef9d1bd5d61ba6cbac809cee806a7f10f all runs: crashed: KASAN: use-after-free Read in fuse_copy_one testing current HEAD 50e12445ab3ceacd916ae9b6a504922017dd0219 testing commit 50e12445ab3ceacd916ae9b6a504922017dd0219 gcc compiler: Debian clang version 13.0.1-6~deb11u1, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8673d7ae2552ae62c6b4c602fb334be87aedee59a6a2603fa27f1cd9578b281b all runs: crashed: KASAN: use-after-free Read in fuse_copy_one revisions tested: 2, total time: 22m53.770764787s (build: 13m43.182081904s, test: 6m27.757771246s) the crash still happens on HEAD commit msg: Merge 5.15.85 into android13-5.15-lts crash: KASAN: use-after-free Read in fuse_copy_one ================================================================== BUG: KASAN: use-after-free in fuse_copy_one+0x182/0x370 fs/fuse/dev.c:1017 Read of size 256 at addr ffff8881261b5010 by task syz-executor.3/1143 CPU: 0 PID: 1143 Comm: syz-executor.3 Not tainted 5.15.85-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x105/0x148 lib/dump_stack.c:106 print_address_description+0x87/0x3d0 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x1a6/0x1f0 mm/kasan/report.c:452 kasan_check_range+0x2aa/0x2e0 mm/kasan/generic.c:189 memcpy+0x2d/0x70 mm/kasan/shadow.c:65 fuse_copy_one+0x182/0x370 fs/fuse/dev.c:1017 fuse_copy_args+0x2d8/0x3b0 fs/fuse/dev.c:1035 fuse_dev_do_read+0xaa6/0xfa0 fs/fuse/dev.c:1310 fuse_dev_read+0x15b/0x1f0 fs/fuse/dev.c:1377 call_read_iter include/linux/fs.h:2145 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x8c4/0xb80 fs/read_write.c:485 ksys_read+0x15b/0x240 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x76/0x80 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fb3f9347639 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb3f8e58168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fb3f94681f0 RCX: 00007fb3f9347639 RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003 RBP: 00007fb3f93a2ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcdfcb2bff R14: 00007fb3f8e58300 R15: 0000000000022000 Allocated by task 1135: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:512 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc+0x203/0x350 mm/slub.c:4425 kmalloc include/linux/slab.h:613 [inline] __d_alloc+0x93/0x640 fs/dcache.c:1760 d_alloc fs/dcache.c:1823 [inline] d_alloc_parallel+0xd0/0xf20 fs/dcache.c:2575 __lookup_slow+0x143/0x360 fs/namei.c:1644 lookup_slow+0x54/0x70 fs/namei.c:1676 walk_component+0x3d1/0x540 fs/namei.c:1972 lookup_last fs/namei.c:2427 [inline] path_lookupat+0x94/0x340 fs/namei.c:2451 filename_lookup+0x27b/0x630 fs/namei.c:2480 user_path_at_empty+0x39/0x160 fs/namei.c:2853 user_path_at include/linux/namei.h:57 [inline] do_mount fs/namespace.c:3334 [inline] __do_sys_mount fs/namespace.c:3545 [inline] __se_sys_mount+0x22b/0x2e0 fs/namespace.c:3522 __x64_sys_mount+0xba/0xd0 fs/namespace.c:3522 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 26: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x126/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc9/0x1a0 mm/slub.c:1749 slab_free mm/slub.c:3517 [inline] kmem_cache_free_bulk+0x3dc/0x720 mm/slub.c:3658 kfree_bulk include/linux/slab.h:465 [inline] kfree_rcu_work+0x2cb/0x6c0 kernel/rcu/tree.c:3281 process_one_work+0x6bc/0xb40 kernel/workqueue.c:2313 worker_thread+0x90b/0xfe0 kernel/workqueue.c:2460 kthread+0x39c/0x480 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Last potentially related work creation: kasan_save_stack+0x3b/0x60 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd3/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 kvfree_call_rcu+0xb2/0x7f0 kernel/rcu/tree.c:3559 copy_name fs/dcache.c:2844 [inline] __d_move+0xbaf/0x1470 fs/dcache.c:2907 __d_unalias+0x194/0x1c0 fs/dcache.c:3021 d_splice_alias+0x1ba/0x330 fs/dcache.c:3084 fuse_lookup+0x23d/0x4f0 fs/fuse/dir.c:481 __lookup_slow+0x264/0x360 fs/namei.c:1659 lookup_slow+0x54/0x70 fs/namei.c:1676 walk_component+0x3d1/0x540 fs/namei.c:1972 link_path_walk+0x5aa/0xc30 path_parentat fs/namei.c:2498 [inline] filename_parentat+0x262/0x600 fs/namei.c:2521 filename_create+0xe2/0x480 fs/namei.c:3689 do_mkdirat+0xc1/0x400 fs/namei.c:3952 __do_sys_mkdir fs/namei.c:3983 [inline] __se_sys_mkdir fs/namei.c:3981 [inline] __x64_sys_mkdir+0x69/0x80 fs/namei.c:3981 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff8881261b5000 which belongs to the cache kmalloc-rcl-512 of size 512 The buggy address is located 16 bytes inside of 512-byte region [ffff8881261b5000, ffff8881261b5200) The buggy address belongs to the page: page:ffffea0004986d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1261b4 head:ffffea0004986d00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000122 ffff88810004c300 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 1073, ts 67291218223, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1ab/0x1b0 mm/page_alloc.c:2502 prep_new_page mm/page_alloc.c:2508 [inline] get_page_from_freelist+0x3e5/0x460 mm/page_alloc.c:4291 __alloc_pages+0x3a8/0x7c0 mm/page_alloc.c:5569 allocate_slab+0x62/0x580 mm/slub.c:1930 new_slab mm/slub.c:1993 [inline] ___slab_alloc+0x2e2/0x6f0 mm/slub.c:3026 __slab_alloc+0x4a/0x90 mm/slub.c:3113 slab_alloc_node mm/slub.c:3204 [inline] slab_alloc mm/slub.c:3246 [inline] __kmalloc+0x25b/0x350 mm/slub.c:4421 kmalloc include/linux/slab.h:613 [inline] __d_alloc+0x93/0x640 fs/dcache.c:1760 d_alloc fs/dcache.c:1823 [inline] d_alloc_parallel+0xd0/0xf20 fs/dcache.c:2575 __lookup_slow+0x143/0x360 fs/namei.c:1644 lookup_slow+0x54/0x70 fs/namei.c:1676 walk_component+0x3d1/0x540 fs/namei.c:1972 lookup_last fs/namei.c:2427 [inline] path_lookupat+0x94/0x340 fs/namei.c:2451 filename_lookup+0x27b/0x630 fs/namei.c:2480 user_path_at_empty+0x39/0x160 fs/namei.c:2853 user_path_at include/linux/namei.h:57 [inline] do_mount fs/namespace.c:3334 [inline] __do_sys_mount fs/namespace.c:3545 [inline] __se_sys_mount+0x22b/0x2e0 fs/namespace.c:3522 page_owner free stack trace missing Memory state around the buggy address: ffff8881261b4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881261b4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881261b5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881261b5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881261b5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================