KASAN: use-after-free Read in fuse_copy_one

19 views
Skip to first unread message

syzbot

unread,
Nov 15, 2022, 2:36:47 AM11/15/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 5a34019eb955 UPSTREAM: irqchip/tegra: Fix overflow implici..
git tree: android12-5.4
console+strace: https://syzkaller.appspot.com/x/log.txt?x=12acada5880000
kernel config: https://syzkaller.appspot.com/x/.config?x=2a00f32de27588aa
dashboard link: https://syzkaller.appspot.com/bug?extid=a6da5581b45970c073a0
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=168b6095880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=128a0d35880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/403fc74bebf7/disk-5a34019e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c3a861d68b1c/vmlinux-5a34019e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/218549a7eb3e/bzImage-5a34019e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a6da55...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in fuse_copy_do fs/fuse/dev.c:753 [inline]
BUG: KASAN: use-after-free in fuse_copy_one+0x1e8/0x3e0 fs/fuse/dev.c:1005
Read of size 256 at addr ffff8881e6393010 by task syz-executor124/335

CPU: 0 PID: 335 Comm: syz-executor124 Not tainted 5.4.210-syzkaller-00003-g5a34019eb955 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x241 lib/dump_stack.c:118
print_address_description+0x8c/0x630 mm/kasan/report.c:384
__kasan_report+0xf6/0x130 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
check_memory_region_inline mm/kasan/generic.c:141 [inline]
check_memory_region+0x298/0x2d0 mm/kasan/generic.c:191
memcpy+0x25/0x50 mm/kasan/common.c:123
fuse_copy_do fs/fuse/dev.c:753 [inline]
fuse_copy_one+0x1e8/0x3e0 fs/fuse/dev.c:1005
fuse_copy_args+0x341/0x420 fs/fuse/dev.c:1023
fuse_dev_do_read+0xbdf/0x10d0 fs/fuse/dev.c:1298
fuse_dev_read+0x177/0x220 fs/fuse/dev.c:1365
call_read_iter include/linux/fs.h:1970 [inline]
new_sync_read fs/read_write.c:414 [inline]
__vfs_read+0x5e0/0x760 fs/read_write.c:427
vfs_read+0x166/0x370 fs/read_write.c:461
ksys_read+0x198/0x2c0 fs/read_write.c:587
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f533a437659
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 00 00 90 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:00007f533a3852f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f533a4c84f0 RCX: 00007f533a437659
RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003
RBP: 00007f533a495264 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f533a48f140
R13: 00007f533a491258 R14: 00007f533a493260 R15: 00007f533a4c84f8

Allocated by task 320:
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
__kasan_kmalloc+0x131/0x1e0 mm/kasan/common.c:529
kmalloc include/linux/slab.h:561 [inline]
__d_alloc+0xac/0x6a0 fs/dcache.c:1706
d_alloc fs/dcache.c:1769 [inline]
d_alloc_parallel+0xe6/0x1310 fs/dcache.c:2521
__lookup_slow+0x15a/0x450 fs/namei.c:1731
lookup_slow+0x53/0x70 fs/namei.c:1765
walk_component+0x62a/0xb30 fs/namei.c:1885
lookup_last fs/namei.c:2348 [inline]
path_lookupat+0x188/0x3f0 fs/namei.c:2393
filename_lookup+0x223/0x6a0 fs/namei.c:2423
user_path_at include/linux/namei.h:49 [inline]
do_mount+0x134/0xe10 fs/namespace.c:3101
ksys_mount+0xc2/0xf0 fs/namespace.c:3372
__do_sys_mount fs/namespace.c:3386 [inline]
__se_sys_mount fs/namespace.c:3383 [inline]
__x64_sys_mount+0xb1/0xc0 fs/namespace.c:3383
do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 10:
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
kasan_set_free_info mm/kasan/common.c:345 [inline]
__kasan_slab_free+0x178/0x240 mm/kasan/common.c:487
slab_free_hook mm/slub.c:1455 [inline]
slab_free_freelist_hook+0x80/0x150 mm/slub.c:1494
slab_free mm/slub.c:3080 [inline]
kfree+0xc6/0x260 mm/slub.c:4071
__rcu_reclaim kernel/rcu/rcu.h:215 [inline]
rcu_do_batch+0x455/0xa10 kernel/rcu/tree.c:2167
rcu_core+0x4ba/0xca0 kernel/rcu/tree.c:2387
__do_softirq+0x23e/0x643 kernel/softirq.c:292

The buggy address belongs to the object at ffff8881e6393000
which belongs to the cache kmalloc-rcl-512 of size 512
The buggy address is located 16 bytes inside of
512-byte region [ffff8881e6393000, ffff8881e6393200)
The buggy address belongs to the page:
page:ffffea000798e400 refcount:1 mapcount:0 mapping:ffff8881f5c0db80 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c0db80
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 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x194/0x380 mm/page_alloc.c:2171
get_page_from_freelist+0x524/0x560 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x372/0x860 mm/page_alloc.c:4857
alloc_slab_page+0x39/0x3e0 mm/slub.c:343
allocate_slab mm/slub.c:1683 [inline]
new_slab+0x97/0x450 mm/slub.c:1749
new_slab_objects mm/slub.c:2505 [inline]
___slab_alloc+0x320/0x4a0 mm/slub.c:2667
__slab_alloc+0x5a/0x90 mm/slub.c:2707
slab_alloc_node mm/slub.c:2792 [inline]
slab_alloc mm/slub.c:2837 [inline]
__kmalloc+0x197/0x2b0 mm/slub.c:3909
kmalloc include/linux/slab.h:561 [inline]
__d_alloc+0xac/0x6a0 fs/dcache.c:1706
d_alloc fs/dcache.c:1769 [inline]
d_alloc_parallel+0xe6/0x1310 fs/dcache.c:2521
__lookup_slow+0x15a/0x450 fs/namei.c:1731
lookup_slow+0x53/0x70 fs/namei.c:1765
walk_component+0x62a/0xb30 fs/namei.c:1885
lookup_last fs/namei.c:2348 [inline]
path_lookupat+0x188/0x3f0 fs/namei.c:2393
filename_lookup+0x223/0x6a0 fs/namei.c:2423
user_path_at include/linux/namei.h:49 [inline]
do_mount+0x134/0xe10 fs/namespace.c:3101
page_owner free stack trace missing

Memory state around the buggy address:
ffff8881e6392f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881e6392f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881e6393000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8881e6393080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8881e6393100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Nov 15, 2022, 2:42:46 AM11/15/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0118fb827bc7 Merge branch 'android12-5.10' into branch 'an..
git tree: android12-5.10-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=165bc3a5880000
kernel config: https://syzkaller.appspot.com/x/.config?x=931ba4a2ebdf1123
dashboard link: https://syzkaller.appspot.com/bug?extid=5656d401995e0d601704
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=164d63ae880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14ccad35880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/5d19a74d5814/disk-0118fb82.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/292f1b190260/vmlinux-0118fb82.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ae4263f2bba8/bzImage-0118fb82.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5656d4...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in fuse_copy_do fs/fuse/dev.c:770 [inline]
BUG: KASAN: use-after-free in fuse_copy_one+0x1e7/0x3f0 fs/fuse/dev.c:1021
Read of size 256 at addr ffff88811f178c10 by task syz-executor162/969

CPU: 1 PID: 969 Comm: syz-executor162 Not tainted 5.10.149-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118
print_address_description+0x81/0x3c0 mm/kasan/report.c:233
__kasan_report mm/kasan/report.c:419 [inline]
kasan_report+0x1a4/0x1f0 mm/kasan/report.c:436
check_region_inline mm/kasan/generic.c:135 [inline]
kasan_check_range+0x2aa/0x2e0 mm/kasan/generic.c:186
memcpy+0x2d/0x70 mm/kasan/shadow.c:65
fuse_copy_do fs/fuse/dev.c:770 [inline]
fuse_copy_one+0x1e7/0x3f0 fs/fuse/dev.c:1021
fuse_copy_args+0x309/0x400 fs/fuse/dev.c:1039
fuse_dev_do_read+0xc96/0x1190 fs/fuse/dev.c:1314
fuse_dev_read+0x16f/0x210 fs/fuse/dev.c:1381
call_read_iter include/linux/fs.h:1946 [inline]
new_sync_read fs/read_write.c:415 [inline]
vfs_read+0x9e2/0xbf0 fs/read_write.c:496
ksys_read+0x198/0x2c0 fs/read_write.c:634
__do_sys_read fs/read_write.c:644 [inline]
__se_sys_read fs/read_write.c:642 [inline]
__x64_sys_read+0x7b/0x90 fs/read_write.c:642
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7fc579830469
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 15 00 00 90 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:00007fc5797e02f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fc5798c14c0 RCX: 00007fc579830469
RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003
RBP: 00007fc57988e49c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc579888378
R13: 00007fc57988a490 R14: 00007fc57988c498 R15: 00007fc5798c14c8

Allocated by task 969:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:428 [inline]
____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:507
__kasan_kmalloc+0x9/0x10 mm/kasan/common.c:516
kasan_kmalloc include/linux/kasan.h:269 [inline]
__kmalloc+0x1f7/0x360 mm/slub.c:4042
kmalloc include/linux/slab.h:557 [inline]
__d_alloc+0xab/0x6b0 fs/dcache.c:1725
d_alloc fs/dcache.c:1788 [inline]
d_alloc_parallel+0xe6/0x1330 fs/dcache.c:2540
__lookup_slow+0x14e/0x400 fs/namei.c:1615
lookup_slow+0x5a/0x80 fs/namei.c:1647
walk_component+0x425/0x5a0 fs/namei.c:1942
lookup_last fs/namei.c:2391 [inline]
path_lookupat+0x18d/0x460 fs/namei.c:2415
filename_lookup+0x23f/0x6c0 fs/namei.c:2448
user_path_at_empty+0x40/0x50 fs/namei.c:2728
user_path_at include/linux/namei.h:59 [inline]
do_mount fs/namespace.c:3239 [inline]
__do_sys_mount fs/namespace.c:3450 [inline]
__se_sys_mount+0x293/0x3c0 fs/namespace.c:3427
__x64_sys_mount+0xbf/0xd0 fs/namespace.c:3427
do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xc6

Freed by task 74:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:357
____kasan_slab_free+0x121/0x160 mm/kasan/common.c:360
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:368
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:1604 [inline]
slab_free_freelist_hook+0xcc/0x1a0 mm/slub.c:1630
slab_free mm/slub.c:3212 [inline]
kmem_cache_free_bulk+0x437/0x590 mm/slub.c:3345
kfree_bulk include/linux/slab.h:409 [inline]
kfree_rcu_work+0x2bb/0x690 kernel/rcu/tree.c:3229
process_one_work+0x726/0xc10 kernel/workqueue.c:2296
worker_thread+0xb27/0x1550 kernel/workqueue.c:2442
kthread+0x349/0x3d0 kernel/kthread.c:313
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:299

The buggy address belongs to the object at ffff88811f178c00
which belongs to the cache kmalloc-rcl-512 of size 512
The buggy address is located 16 bytes inside of
512-byte region [ffff88811f178c00, ffff88811f178e00)
The buggy address belongs to the page:
page:ffffea00047c5e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11f178
head:ffffea00047c5e00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 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 894, ts 32186343926, free_ts 0
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2386 [inline]
prep_new_page mm/page_alloc.c:2392 [inline]
get_page_from_freelist+0x755/0x810 mm/page_alloc.c:4073
__alloc_pages_nodemask+0x3b6/0x890 mm/page_alloc.c:5160
alloc_slab_page mm/slub.c:1815 [inline]
allocate_slab+0x78/0x540 mm/slub.c:1817
new_slab mm/slub.c:1878 [inline]
new_slab_objects mm/slub.c:2636 [inline]
___slab_alloc+0x131/0x2e0 mm/slub.c:2800
__slab_alloc+0x63/0xa0 mm/slub.c:2840
slab_alloc_node mm/slub.c:2922 [inline]
slab_alloc mm/slub.c:2964 [inline]
__kmalloc+0x24f/0x360 mm/slub.c:4038
kmalloc include/linux/slab.h:557 [inline]
__d_alloc+0xab/0x6b0 fs/dcache.c:1725
d_alloc fs/dcache.c:1788 [inline]
d_alloc_parallel+0xe6/0x1330 fs/dcache.c:2540
__lookup_slow+0x14e/0x400 fs/namei.c:1615
lookup_slow+0x5a/0x80 fs/namei.c:1647
walk_component+0x425/0x5a0 fs/namei.c:1942
lookup_last fs/namei.c:2391 [inline]
path_lookupat+0x18d/0x460 fs/namei.c:2415
filename_lookup+0x23f/0x6c0 fs/namei.c:2448
user_path_at_empty+0x40/0x50 fs/namei.c:2728
user_path_at include/linux/namei.h:59 [inline]
vfs_statx+0x116/0x3f0 fs/stat.c:193
vfs_fstatat fs/stat.c:215 [inline]
__do_sys_newfstatat fs/stat.c:383 [inline]
__se_sys_newfstatat+0xc8/0x780 fs/stat.c:377
page_owner free stack trace missing

Memory state around the buggy address:
ffff88811f178b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811f178b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811f178c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811f178c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88811f178d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

syzbot

unread,
Nov 15, 2022, 9:31:50 AM11/15/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7f2e600bf63a Merge 5.15.74 into android13-5.15-lts
git tree: android13-5.15-lts
console output: https://syzkaller.appspot.com/x/log.txt?x=10406bf5880000
kernel config: https://syzkaller.appspot.com/x/.config?x=5f64a7340a9acccc
dashboard link: https://syzkaller.appspot.com/bug?extid=fa07b4a72f8a92222f0b
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=127fd679880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15cf8095880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/812ba136ff9b/disk-7f2e600b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/62047acb99c1/vmlinux-7f2e600b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fae2296743ba/bzImage-7f2e600b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fa07b4...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: use-after-free in fuse_copy_one+0x1e7/0x3f0 fs/fuse/dev.c:1017
Read of size 256 at addr ffff88811f8ca010 by task syz-executor302/4941

CPU: 0 PID: 4941 Comm: syz-executor302 Not tainted 5.15.74-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 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+0x1e7/0x3f0 fs/fuse/dev.c:1017
fuse_copy_args+0x309/0x400 fs/fuse/dev.c:1035
fuse_dev_do_read+0xc9b/0x1190 fs/fuse/dev.c:1310
fuse_dev_read+0x180/0x210 fs/fuse/dev.c:1377
call_read_iter include/linux/fs.h:2123 [inline]
new_sync_read fs/read_write.c:404 [inline]
vfs_read+0xabc/0xd80 fs/read_write.c:485
ksys_read+0x198/0x2c0 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+0x7b/0x90 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:0x7f589d294bc9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 00 00 90 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:00007f589d1e22f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f589d3264f0 RCX: 00007f589d294bc9
RDX: 0000000000002020 RSI: 0000000020002140 RDI: 0000000000000003
RBP: 00007f589d2f3284 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f589d2ed160
R13: 00007f589d2ef278 R14: 00007f589d2f1280 R15: 00007f589d3264f8
</TASK>

Allocated by task 4923:
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:254 [inline]
__kmalloc+0x203/0x350 mm/slub.c:4423
kmalloc include/linux/slab.h:596 [inline]
__d_alloc+0xab/0x6b0 fs/dcache.c:1760
d_alloc fs/dcache.c:1823 [inline]
d_alloc_parallel+0xe0/0x12b0 fs/dcache.c:2575
__lookup_slow+0x14e/0x400 fs/namei.c:1644
lookup_slow+0x5a/0x80 fs/namei.c:1676
walk_component+0x425/0x5a0 fs/namei.c:1972
lookup_last fs/namei.c:2427 [inline]
path_lookupat+0x18d/0x460 fs/namei.c:2451
filename_lookup+0x277/0x640 fs/namei.c:2480
user_path_at_empty+0x44/0x1b0 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+0x293/0x3c0 fs/namespace.c:3522
__x64_sys_mount+0xbf/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 20:
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:220 [inline]
slab_free_hook mm/slub.c:1721 [inline]
slab_free_freelist_hook+0xc9/0x1a0 mm/slub.c:1747
slab_free mm/slub.c:3515 [inline]
kmem_cache_free_bulk+0x3dc/0x720 mm/slub.c:3656
kfree_bulk include/linux/slab.h:448 [inline]
kfree_rcu_work+0x2cb/0x6c0 kernel/rcu/tree.c:3281
process_one_work+0x6db/0xc00 kernel/workqueue.c:2313
worker_thread+0xb3e/0x1340 kernel/workqueue.c:2460
kthread+0x41c/0x500 kernel/kthread.c:319
ret_from_fork+0x1f/0x30

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:3558
copy_name fs/dcache.c:2844 [inline]
__d_move+0xb3e/0x16d0 fs/dcache.c:2907
__d_unalias+0x1cc/0x220 fs/dcache.c:3021
d_splice_alias+0x22f/0x3b0 fs/dcache.c:3084
fuse_lookup+0x2b4/0x5f0 fs/fuse/dir.c:478
__lookup_slow+0x2b3/0x400 fs/namei.c:1659
lookup_slow+0x5a/0x80 fs/namei.c:1676
walk_component+0x425/0x5a0 fs/namei.c:1972
link_path_walk+0x682/0xde0
path_parentat fs/namei.c:2498 [inline]
filename_parentat+0x27e/0x6b0 fs/namei.c:2521
filename_create+0xef/0x4f0 fs/namei.c:3689
do_mkdirat+0xc2/0x420 fs/namei.c:3952
__do_sys_mkdir fs/namei.c:3983 [inline]
__se_sys_mkdir fs/namei.c:3981 [inline]
__x64_sys_mkdir+0x6e/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

Second to 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:3558
copy_name fs/dcache.c:2844 [inline]
__d_move+0xb3e/0x16d0 fs/dcache.c:2907
__d_unalias+0x1cc/0x220 fs/dcache.c:3021
d_splice_alias+0x22f/0x3b0 fs/dcache.c:3084
fuse_lookup+0x2b4/0x5f0 fs/fuse/dir.c:478
__lookup_slow+0x2b3/0x400 fs/namei.c:1659
lookup_slow+0x5a/0x80 fs/namei.c:1676
walk_component+0x425/0x5a0 fs/namei.c:1972
link_path_walk+0x682/0xde0
path_parentat fs/namei.c:2498 [inline]
filename_parentat+0x27e/0x6b0 fs/namei.c:2521
filename_create+0xef/0x4f0 fs/namei.c:3689
do_mkdirat+0xc2/0x420 fs/namei.c:3952
__do_sys_mkdir fs/namei.c:3983 [inline]
__se_sys_mkdir fs/namei.c:3981 [inline]
__x64_sys_mkdir+0x6e/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 ffff88811f8ca000
which belongs to the cache kmalloc-rcl-512 of size 512
The buggy address is located 16 bytes inside of
512-byte region [ffff88811f8ca000, ffff88811f8ca200)
The buggy address belongs to the page:
page:ffffea00047e3200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811f8c9000 pfn:0x11f8c8
head:ffffea00047e3200 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea00047e8700 0000000400000004 ffff88810004c300
raw: ffff88811f8c9000 000000008010000b 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 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 1972, ts 1087064259248, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1ab/0x1b0 mm/page_alloc.c:2495
prep_new_page mm/page_alloc.c:2501 [inline]
get_page_from_freelist+0x38b/0x400 mm/page_alloc.c:4281
__alloc_pages+0x3a8/0x7c0 mm/page_alloc.c:5548
allocate_slab+0x62/0x580 mm/slub.c:1928
new_slab mm/slub.c:1991 [inline]
___slab_alloc+0x2e2/0x6f0 mm/slub.c:3024
__slab_alloc+0x4a/0x90 mm/slub.c:3111
slab_alloc_node mm/slub.c:3202 [inline]
slab_alloc mm/slub.c:3244 [inline]
__kmalloc+0x25b/0x350 mm/slub.c:4419
kmalloc include/linux/slab.h:596 [inline]
__d_alloc+0xab/0x6b0 fs/dcache.c:1760
d_alloc fs/dcache.c:1823 [inline]
d_alloc_parallel+0xe0/0x12b0 fs/dcache.c:2575
__lookup_slow+0x14e/0x400 fs/namei.c:1644
lookup_slow+0x5a/0x80 fs/namei.c:1676
walk_component+0x425/0x5a0 fs/namei.c:1972
lookup_last fs/namei.c:2427 [inline]
path_lookupat+0x18d/0x460 fs/namei.c:2451
filename_lookup+0x277/0x640 fs/namei.c:2480
user_path_at_empty+0x44/0x1b0 fs/namei.c:2853
user_path_at include/linux/namei.h:57 [inline]
vfs_statx+0x104/0x6a0 fs/stat.c:221
page_owner free stack trace missing

Memory state around the buggy address:
ffff88811f8c9f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811f8c9f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811f8ca000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811f8ca080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88811f8ca100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

syzbot

unread,
May 17, 2023, 3:00:37 PM5/17/23
to syzkaller-a...@googlegroups.com
Auto-closing this bug as obsolete.
No recent activity, existing reproducers are no longer triggering the issue.
Reply all
Reply to author
Forward
0 new messages