ci2 starts bisection 2023-03-03 01:29:33.382455862 +0000 UTC m=+105588.321145203
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 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 34a648407eed27a7261e82c7ebf9d7b72ff1cc66ca6c1f5efe9be1a5cc070390
all runs: crashed: KASAN: use-after-free Read in fuse_copy_one
testing current HEAD 5448b2fda85f2d90de03f053226f721ba2f7e731
testing commit 5448b2fda85f2d90de03f053226f721ba2f7e731 gcc
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: d347abf874e85d49889d4710f38faef2c730c9193639fe2b8480b20e4429a23e
all runs: crashed: KASAN: use-after-free Read in fuse_copy_one
revisions tested: 2, total time: 1h17m50.601192948s (build: 1h7m55.591614415s, test: 6m37.189611221s)
the crash still happens on HEAD
commit msg: Merge 5.15.94 into android13-5.15-lts
crash: KASAN: use-after-free Read in fuse_copy_one
==================================================================
BUG: KASAN: use-after-free in fuse_copy_one+0x16f/0x350 fs/fuse/dev.c:1017
Read of size 256 at addr ffff888126e71810 by task syz-executor.4/1240
CPU: 0 PID: 1240 Comm: syz-executor.4 Not tainted 5.15.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/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/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:444
kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189
memcpy+0x2d/0x70 mm/kasan/shadow.c:65
fuse_copy_one+0x16f/0x350 fs/fuse/dev.c:1017
fuse_copy_args+0x2d0/0x390 fs/fuse/dev.c:1035
fuse_dev_do_read+0xa29/0xf20 fs/fuse/dev.c:1310
fuse_dev_read+0x15d/0x1f0 fs/fuse/dev.c:1377
call_read_iter include/linux/fs.h:2151 [inline]
new_sync_read fs/read_write.c:404 [inline]
vfs_read+0x8e3/0xba0 fs/read_write.c:485
ksys_read+0x15c/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+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f1e379dd639
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:00007f1e374ee168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f1e37afe1f0 RCX: 00007f1e379dd639
RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003
RBP: 00007f1e37a38ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff601ae45f R14: 00007f1e374ee300 R15: 0000000000022000
Allocated by task 1235:
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+0xdb/0x110 mm/kasan/common.c:512
__kasan_kmalloc+0x9/0x10 mm/kasan/common.c:521
kasan_kmalloc include/linux/kasan.h:227 [inline]
__kmalloc+0x13a/0x270 mm/slub.c:4425
kmalloc include/linux/slab.h:613 [inline]
__d_alloc+0x95/0x650 fs/dcache.c:1760
d_alloc fs/dcache.c:1823 [inline]
d_alloc_parallel+0xd1/0xed0 fs/dcache.c:2575
__lookup_slow+0x149/0x360 fs/namei.c:1644
lookup_slow+0x54/0x70 fs/namei.c:1676
walk_component+0x3d2/0x540 fs/namei.c:1972
lookup_last fs/namei.c:2427 [inline]
path_lookupat+0x95/0x340 fs/namei.c:2451
filename_lookup+0x22b/0x550 fs/namei.c:2480
user_path_at_empty+0x38/0x150 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+0x21f/0x2d0 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+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
Freed by task 341:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/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+0xbd/0x190 mm/slub.c:1749
slab_free mm/slub.c:3517 [inline]
kmem_cache_free_bulk+0x552/0x700 mm/slub.c:3658
kfree_bulk include/linux/slab.h:465 [inline]
kfree_rcu_work+0x2b2/0x6a0 kernel/rcu/tree.c:3281
process_one_work+0x635/0xa70 kernel/workqueue.c:2313
worker_thread+0x8bb/0xf40 kernel/workqueue.c:2460
kthread+0x3a1/0x480 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 :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/0x7d0 kernel/rcu/tree.c:3559
copy_name fs/dcache.c:2844 [inline]
__d_move+0x927/0x10e0 fs/dcache.c:2907
__d_unalias+0x194/0x1c0 fs/dcache.c:3021
d_splice_alias+0x19d/0x310 fs/dcache.c:3084
fuse_lookup+0x23d/0x500 fs/fuse/dir.c:481
__lookup_slow+0x26d/0x360 fs/namei.c:1659
lookup_slow+0x54/0x70 fs/namei.c:1676
walk_component+0x3d2/0x540 fs/namei.c:1972
link_path_walk+0x5b9/0xd10
path_parentat fs/namei.c:2498 [inline]
filename_parentat+0x228/0x5a0 fs/namei.c:2521
filename_create+0xe3/0x490 fs/namei.c:3689
do_mkdirat+0x112/0x390 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+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
The buggy address belongs to the object at ffff888126e71800
which belongs to the cache kmalloc-rcl-512 of size 512
The buggy address is located 16 bytes inside of
512-byte region [ffff888126e71800, ffff888126e71a00)
The buggy address belongs to the page:
page:ffffea00049b9c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x126e70
head:ffffea00049b9c00 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 1203, ts 71543968866, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2502
prep_new_page mm/page_alloc.c:2508 [inline]
get_page_from_freelist+0x2c14/0x2cf0 mm/page_alloc.c:4291
__alloc_pages+0x386/0x7b0 mm/page_alloc.c:5569
allocate_slab mm/slub.c:1930 [inline]
new_slab+0x92/0x490 mm/slub.c:1993
___slab_alloc+0x39e/0x830 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+0x16d/0x270 mm/slub.c:4421
kmalloc include/linux/slab.h:613 [inline]
__d_alloc+0x95/0x650 fs/dcache.c:1760
d_alloc fs/dcache.c:1823 [inline]
d_alloc_parallel+0xd1/0xed0 fs/dcache.c:2575
__lookup_slow+0x149/0x360 fs/namei.c:1644
lookup_slow+0x54/0x70 fs/namei.c:1676
walk_component+0x3d2/0x540 fs/namei.c:1972
lookup_last fs/namei.c:2427 [inline]
path_lookupat+0x95/0x340 fs/namei.c:2451
filename_lookup+0x22b/0x550 fs/namei.c:2480
user_path_at_empty+0x38/0x150 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+0x21f/0x2d0 fs/namespace.c:3522
page_owner free stack trace missing
Memory state around the buggy address:
ffff888126e71700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888126e71780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888126e71800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888126e71880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888126e71900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================