ci2 starts bisection 2023-06-02 01:42:25.656641429 +0000 UTC m=+17569.303549091 bisecting fixing commit since 7f2e600bf63a9cda882a6c86de04183e5061e8ee building syzkaller on 97de9cfcb0b25b95878e2eaaf3652a2faa8dd8f4 ensuring issue is reproducible on original commit 7f2e600bf63a9cda882a6c86de04183e5061e8ee testing commit 7f2e600bf63a9cda882a6c86de04183e5061e8ee gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: af0389271150ef873343ae409c0f5f5f870bd313b6aa73ca4adf7de9507037f1 all runs: crashed: KASAN: use-after-free Read in fuse_copy_one testing current HEAD 19c0ed55a470d1cd766484abab04871b648560fb testing commit 19c0ed55a470d1cd766484abab04871b648560fb gcc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 831a8c510d47419a77b9a679f8354b7348f40e2aa1de40348c4e149017338e9c all runs: crashed: KASAN: use-after-free Read in fuse_copy_one crash still not fixed/happens on the oldest tested release revisions tested: 2, total time: 17m36.050987368s (build: 10m17.939866696s, test: 6m45.172538037s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Merge 5.15.106 into android13-5.15-lts crash: KASAN: use-after-free Read in fuse_copy_one ================================================================== BUG: KASAN: use-after-free in fuse_copy_do fs/fuse/dev.c:773 [inline] BUG: KASAN: use-after-free in fuse_copy_one+0x84/0x310 fs/fuse/dev.c:1023 Read of size 256 at addr ffff88811bd21010 by task syz-executor.4/2305 CPU: 0 PID: 2305 Comm: syz-executor.4 Not tainted 5.15.106-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x38/0x49 lib/dump_stack.c:106 print_address_description.constprop.0+0x24/0x160 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report.cold+0x82/0xdb mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x148/0x190 mm/kasan/generic.c:189 memcpy+0x24/0x60 mm/kasan/shadow.c:65 fuse_copy_do fs/fuse/dev.c:773 [inline] fuse_copy_one+0x84/0x310 fs/fuse/dev.c:1023 fuse_copy_args+0x84/0x360 fs/fuse/dev.c:1041 fuse_dev_do_read.constprop.0+0x144b/0x1c30 fs/fuse/dev.c:1316 fuse_dev_read+0x13d/0x1e0 fs/fuse/dev.c:1383 call_read_iter include/linux/fs.h:2153 [inline] new_sync_read+0x353/0x6d0 fs/read_write.c:404 vfs_read+0x20f/0x4a0 fs/read_write.c:485 ksys_read+0x111/0x210 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+0x6e/0xb0 fs/read_write.c:631 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7f332fed9639 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:00007f332f9ea168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f332fffa1f0 RCX: 00007f332fed9639 RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003 RBP: 00007f332ff34ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff946cb85f R14: 00007f332f9ea300 R15: 0000000000022000 Allocated by task 2287: kasan_save_stack+0x26/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] ____kasan_kmalloc mm/kasan/common.c:512 [inline] ____kasan_kmalloc mm/kasan/common.c:471 [inline] __kasan_kmalloc+0xae/0xe0 mm/kasan/common.c:521 kasan_kmalloc include/linux/kasan.h:227 [inline] __kmalloc+0x1aa/0x380 mm/slub.c:4425 kmalloc include/linux/slab.h:613 [inline] __d_alloc+0x5ae/0x8c0 fs/dcache.c:1760 d_alloc+0x3c/0x210 fs/dcache.c:1823 d_alloc_parallel+0xdc/0x1090 fs/dcache.c:2575 __lookup_slow+0x106/0x3d0 fs/namei.c:1644 lookup_slow fs/namei.c:1676 [inline] walk_component+0x3a1/0x690 fs/namei.c:1972 lookup_last fs/namei.c:2427 [inline] path_lookupat+0x11f/0x6b0 fs/namei.c:2451 filename_lookup+0x192/0x510 fs/namei.c:2480 user_path_at_empty+0x3a/0x60 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 fs/namespace.c:3522 [inline] __x64_sys_mount+0x1a0/0x280 fs/namespace.c:3522 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 304: kasan_save_stack+0x26/0x50 mm/kasan/common.c:38 kasan_set_track+0x25/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x24/0x40 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:365 [inline] ____kasan_slab_free mm/kasan/common.c:327 [inline] __kasan_slab_free+0x111/0x150 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+0x94/0x1a0 mm/slub.c:1749 slab_free mm/slub.c:3517 [inline] kmem_cache_free_bulk mm/slub.c:3658 [inline] kmem_cache_free_bulk+0x1ed/0x850 mm/slub.c:3645 kfree_bulk include/linux/slab.h:465 [inline] kfree_rcu_work+0x4a7/0x9b0 kernel/rcu/tree.c:3281 process_one_work+0x66c/0xff0 kernel/workqueue.c:2313 worker_thread+0x55b/0xf30 kernel/workqueue.c:2460 kthread+0x35d/0x430 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Last potentially related work creation: kasan_save_stack+0x26/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xd8/0xf0 mm/kasan/generic.c:348 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358 kvfree_call_rcu+0x98/0xa60 kernel/rcu/tree.c:3559 copy_name fs/dcache.c:2844 [inline] __d_move+0x472/0x16a0 fs/dcache.c:2907 __d_unalias fs/dcache.c:3021 [inline] d_splice_alias+0x8a7/0xb40 fs/dcache.c:3084 fuse_lookup.part.0+0x174/0x320 fs/fuse/dir.c:613 fuse_lookup+0x5a/0x70 fs/fuse/dir.c:595 __lookup_slow+0x19b/0x3d0 fs/namei.c:1659 lookup_slow fs/namei.c:1676 [inline] walk_component+0x3a1/0x690 fs/namei.c:1972 link_path_walk.part.0+0x57b/0xb30 fs/namei.c:2299 link_path_walk fs/namei.c:2224 [inline] path_parentat+0x8f/0x160 fs/namei.c:2498 filename_parentat+0x192/0x550 fs/namei.c:2521 filename_create+0x93/0x3e0 fs/namei.c:3746 do_mkdirat+0x9c/0x2c0 fs/namei.c:4009 __do_sys_mkdir fs/namei.c:4039 [inline] __se_sys_mkdir fs/namei.c:4037 [inline] __x64_sys_mkdir+0xd5/0x120 fs/namei.c:4037 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88811bd21000 which belongs to the cache kmalloc-rcl-512 of size 512 The buggy address is located 16 bytes inside of 512-byte region [ffff88811bd21000, ffff88811bd21200) The buggy address belongs to the page: page:ffffea00046f4800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11bd20 head:ffffea00046f4800 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 ffffea0004953200 0000000300000003 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 1104, ts 68940110458, free_ts 68103793617 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x13a/0x160 mm/page_alloc.c:2502 prep_new_page mm/page_alloc.c:2508 [inline] get_page_from_freelist+0x1773/0x2890 mm/page_alloc.c:4291 __alloc_pages+0x272/0x580 mm/page_alloc.c:5569 __alloc_pages_node include/linux/gfp.h:591 [inline] alloc_pages_node include/linux/gfp.h:605 [inline] alloc_pages include/linux/gfp.h:618 [inline] alloc_slab_page mm/slub.c:1793 [inline] allocate_slab+0x320/0x460 mm/slub.c:1930 new_slab mm/slub.c:1993 [inline] ___slab_alloc.constprop.0+0x427/0xa80 mm/slub.c:3026 __slab_alloc.constprop.0+0x4a/0xa0 mm/slub.c:3113 slab_alloc_node mm/slub.c:3204 [inline] slab_alloc mm/slub.c:3246 [inline] __kmalloc+0x325/0x380 mm/slub.c:4421 kmalloc include/linux/slab.h:613 [inline] __d_alloc+0x5ae/0x8c0 fs/dcache.c:1760 d_alloc+0x3c/0x210 fs/dcache.c:1823 d_alloc_parallel+0xdc/0x1090 fs/dcache.c:2575 __lookup_slow+0x106/0x3d0 fs/namei.c:1644 lookup_slow fs/namei.c:1676 [inline] walk_component+0x3a1/0x690 fs/namei.c:1972 lookup_last fs/namei.c:2427 [inline] path_lookupat+0x11f/0x6b0 fs/namei.c:2451 filename_lookup+0x192/0x510 fs/namei.c:2480 user_path_at_empty+0x3a/0x60 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 fs/namespace.c:3522 [inline] __x64_sys_mount+0x1a0/0x280 fs/namespace.c:3522 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1370 [inline] free_pcp_prepare+0x1e3/0x4d0 mm/page_alloc.c:1442 free_unref_page_prepare mm/page_alloc.c:3441 [inline] free_unref_page+0x70/0x4a0 mm/page_alloc.c:3521 free_the_page mm/page_alloc.c:711 [inline] __free_pages+0xe7/0x100 mm/page_alloc.c:5645 __free_slab+0xee/0x1e0 mm/slub.c:2018 free_slab mm/slub.c:2033 [inline] discard_slab+0x2b/0x40 mm/slub.c:2039 __unfreeze_partials+0x1e2/0x230 mm/slub.c:2525 put_cpu_partial+0xa6/0xe0 mm/slub.c:2605 __slab_free+0x21e/0x4d0 mm/slub.c:3386 do_slab_free mm/slub.c:3505 [inline] ___cache_free+0x209/0x260 mm/slub.c:3524 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x6e/0x150 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15f/0x1d0 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0xaa/0xc0 mm/kasan/common.c:443 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook mm/slab.h:550 [inline] slab_alloc_node mm/slub.c:3238 [inline] slab_alloc mm/slub.c:3246 [inline] kmem_cache_alloc+0x197/0x4a0 mm/slub.c:3251 getname_flags.part.0+0x4d/0x480 fs/namei.c:138 getname_flags include/linux/audit.h:319 [inline] getname+0x75/0xa0 fs/namei.c:217 do_sys_openat2+0xd4/0x4a0 fs/open.c:1228 Memory state around the buggy address: ffff88811bd20f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811bd20f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811bd21000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811bd21080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811bd21100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================