[v5.15] KASAN: use-after-free Read in steam_input_open

11 views
Skip to first unread message

syzbot

unread,
Mar 6, 2025, 1:53:28 AM3/6/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10d64254580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link: https://syzkaller.appspot.com/bug?extid=90e00c014235fc0be992
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/267e46ee7273/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/944e289206cf/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f8cadf62458e/bzImage-c16c81c8.xz

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

==================================================================
BUG: KASAN: use-after-free in __mutex_lock_common+0x11e/0x25a0 kernel/locking/mutex.c:575
Read of size 8 at addr ffff8880238858e8 by task udevd/4159

CPU: 0 PID: 4159 Comm: udevd Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
print_address_description+0x63/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
__mutex_lock_common+0x11e/0x25a0 kernel/locking/mutex.c:575
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
steam_input_open+0x93/0x1b0 drivers/hid/hid-steam.c:297
input_open_device+0x188/0x2d0 drivers/input/input.c:640
evdev_open_device drivers/input/evdev.c:400 [inline]
evdev_open+0x3ed/0x600 drivers/input/evdev.c:487
chrdev_open+0x54a/0x630 fs/char_dev.c:414
do_dentry_open+0x807/0xfb0 fs/open.c:826
do_open fs/namei.c:3608 [inline]
path_openat+0x2705/0x2f20 fs/namei.c:3742
do_filp_open+0x21c/0x460 fs/namei.c:3769
do_sys_openat2+0x13b/0x4f0 fs/open.c:1253
do_sys_open fs/open.c:1269 [inline]
__do_sys_openat fs/open.c:1285 [inline]
__se_sys_openat fs/open.c:1280 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1280
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fdf2905a9a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffc6c5db680 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fdf2905a9a4
RDX: 0000000000080000 RSI: 0000560929a4c660 RDI: 00000000ffffff9c
RBP: 0000560929a4c660 R08: 0000560929a6be18 R09: 00007fdf29135b10
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 00007ffc6c5db848 R14: 0000000000000000 R15: 0000560924e6fed5
</TASK>

Allocated by task 4214:
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:434 [inline]
____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
kasan_kmalloc include/linux/kasan.h:264 [inline]
__kmalloc_node_track_caller+0x195/0x390 mm/slub.c:4963
alloc_dr drivers/base/devres.c:116 [inline]
devm_kmalloc+0x7a/0x290 drivers/base/devres.c:824
devm_kzalloc include/linux/device.h:208 [inline]
steam_probe+0x11d/0xaa0 drivers/hid/hid-steam.c:741
hid_device_probe+0x2a6/0x3a0 drivers/hid/hid-core.c:2307
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
hid_add_device+0x3a5/0x510 drivers/hid/hid-core.c:2459
usbhid_probe+0xb32/0xec0 drivers/hid/usbhid/hid-core.c:1424
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3412
usb_new_device+0xc21/0x18f0 drivers/usb/core/hub.c:2593
hub_port_connect drivers/usb/core/hub.c:5457 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5597 [inline]
port_event drivers/usb/core/hub.c:5743 [inline]
hub_event+0x2cdf/0x54c0 drivers/usb/core/hub.c:5825
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Freed by task 1108:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xf1/0x270 mm/slub.c:4559
release_nodes drivers/base/devres.c:501 [inline]
devres_release_all+0x1c1/0x240 drivers/base/devres.c:530
__device_release_driver drivers/base/dd.c:1231 [inline]
device_release_driver_internal+0x51d/0x7f0 drivers/base/dd.c:1262
bus_remove_device+0x2e5/0x400 drivers/base/bus.c:531
device_del+0x6e2/0xbd0 drivers/base/core.c:3600
hid_remove_device drivers/hid/hid-core.c:2508 [inline]
hid_destroy_device+0x64/0x100 drivers/hid/hid-core.c:2527
usbhid_disconnect+0x9a/0xc0 drivers/hid/usbhid/hid-core.c:1451
usb_unbind_interface+0x1cd/0x840 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1229 [inline]
device_release_driver_internal+0x50e/0x7f0 drivers/base/dd.c:1262
bus_remove_device+0x2e5/0x400 drivers/base/bus.c:531
device_del+0x6e2/0xbd0 drivers/base/core.c:3600
usb_disable_device+0x3b8/0x840 drivers/usb/core/message.c:1414
usb_disconnect+0x33c/0x8c0 drivers/usb/core/hub.c:2248
hub_port_connect drivers/usb/core/hub.c:5301 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5597 [inline]
port_event drivers/usb/core/hub.c:5743 [inline]
hub_event+0x1d58/0x54c0 drivers/usb/core/hub.c:5825
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff888023885800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 232 bytes inside of
512-byte region [ffff888023885800, ffff888023885a00)
The buggy address belongs to the page:
page:ffffea00008e2100 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23884
head:ffffea00008e2100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017441c80
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4165, ts 57458397169, free_ts 57337891438
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
__alloc_pages+0x272/0x700 mm/page_alloc.c:5465
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xbb/0x4b0 mm/slub.c:1975
___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
mca_alloc net/ipv6/mcast.c:880 [inline]
__ipv6_dev_mc_inc+0x426/0xa80 net/ipv6/mcast.c:936
ipv6_add_dev+0xd53/0x1180 net/ipv6/addrconf.c:467
addrconf_notify+0x671/0xf30 net/ipv6/addrconf.c:3579
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2044
register_netdevice+0x12e8/0x1720 net/core/dev.c:10396
veth_newlink+0x72e/0xe20 drivers/net/veth.c:1683
__rtnl_newlink net/core/rtnetlink.c:3521 [inline]
rtnl_newlink+0x14e1/0x2070 net/core/rtnetlink.c:3569
rtnetlink_rcv_msg+0x993/0xee0 net/core/rtnetlink.c:5647
netlink_rcv_skb+0x1cf/0x410 net/netlink/af_netlink.c:2489
netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
netlink_unicast+0x7b6/0x980 net/netlink/af_netlink.c:1337
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317
free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
free_slab mm/slub.c:2015 [inline]
discard_slab mm/slub.c:2021 [inline]
__unfreeze_partials+0x1b7/0x210 mm/slub.c:2507
put_cpu_partial+0x132/0x1a0 mm/slub.c:2587
do_slab_free mm/slub.c:3487 [inline]
___cache_free+0xe3/0x100 mm/slub.c:3506
qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0xfb/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:643 [inline]
netdevice_event+0x382/0x960 drivers/infiniband/core/roce_gid_mgmt.c:802
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
__netdev_upper_dev_link+0x579/0x750 net/core/dev.c:8167
netdev_master_upper_dev_link+0xad/0xf0 net/core/dev.c:8237
br_add_if+0x592/0x1200 net/bridge/br_if.c:642
do_set_master net/core/rtnetlink.c:2572 [inline]
do_setlink+0xdd3/0x3d80 net/core/rtnetlink.c:2783

Memory state around the buggy address:
ffff888023885780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888023885800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888023885880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888023885900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888023885980: 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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Mar 6, 2025, 5:27:36 AM3/6/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15354a54580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d302c69e93fb6774
dashboard link: https://syzkaller.appspot.com/bug?extid=90e00c014235fc0be992
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=158544b7980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10bc8a64580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/267e46ee7273/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/944e289206cf/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f8cadf62458e/bzImage-c16c81c8.xz

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

==================================================================
BUG: KASAN: use-after-free in __mutex_lock_common+0x11e/0x25a0 kernel/locking/mutex.c:575
Read of size 8 at addr ffff8880259894e8 by task udevd/4179

CPU: 0 PID: 4179 Comm: udevd Not tainted 5.15.178-syzkaller #0
RIP: 0033:0x7f46313da9a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffd8c4b92e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f46313da9a4
RDX: 0000000000080000 RSI: 000055dcc1130aa0 RDI: 00000000ffffff9c
RBP: 000055dcc1130aa0 R08: 000055dcc1145e18 R09: fffffffffffffe98
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 00007ffd8c4b94a8 R14: 0000000000000000 R15: 000055dc848fded5
</TASK>

Allocated by task 7:
process_scheduled_works kernel/workqueue.c:2373 [inline]
worker_thread+0xdcf/0x1280 kernel/workqueue.c:2459
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Freed by task 4183:
The buggy address belongs to the object at ffff888025989400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 232 bytes inside of
512-byte region [ffff888025989400, ffff888025989600)
The buggy address belongs to the page:
page:ffffea0000966200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25988
head:ffffea0000966200 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 0000000100000001 ffff888017441c80
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2183, ts 8751959095, free_ts 0
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
__alloc_pages+0x272/0x700 mm/page_alloc.c:5465
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xbb/0x4b0 mm/slub.c:1975
___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
alloc_bprm+0x57/0x700 fs/exec.c:1516
kernel_execve+0x49/0x9b0 fs/exec.c:1978
call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:112
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing

Memory state around the buggy address:
ffff888025989380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888025989400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888025989480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888025989500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888025989580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Mar 6, 2025, 10:18:26 AM3/6/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3a8358583626 Linux 6.1.129
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=100cc4b7980000
kernel config: https://syzkaller.appspot.com/x/.config?x=d841937c118666c6
dashboard link: https://syzkaller.appspot.com/bug?extid=541ce19a7f6f4e686cbc
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=140cc4b7980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=120cc4b7980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/13f8e53cc467/disk-3a835858.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a85676a44932/vmlinux-3a835858.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9e9dcc0eaae9/bzImage-3a835858.xz

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

==================================================================
BUG: KASAN: use-after-free in __mutex_lock_common kernel/locking/mutex.c:582 [inline]
BUG: KASAN: use-after-free in __mutex_lock+0xfa/0xd80 kernel/locking/mutex.c:747
Read of size 8 at addr ffff8880193f7ce8 by task udevd/4267

CPU: 1 PID: 4267 Comm: udevd Not tainted 6.1.129-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x15f/0x4f0 mm/kasan/report.c:427
kasan_report+0x136/0x160 mm/kasan/report.c:531
__mutex_lock_common kernel/locking/mutex.c:582 [inline]
__mutex_lock+0xfa/0xd80 kernel/locking/mutex.c:747
steam_input_open+0x93/0x1b0 drivers/hid/hid-steam.c:297
input_open_device+0x188/0x2d0 drivers/input/input.c:650
evdev_open_device drivers/input/evdev.c:400 [inline]
evdev_open+0x3ed/0x600 drivers/input/evdev.c:487
chrdev_open+0x54a/0x630 fs/char_dev.c:414
do_dentry_open+0x7f9/0x10f0 fs/open.c:882
do_open fs/namei.c:3626 [inline]
path_openat+0x2644/0x2e60 fs/namei.c:3783
do_filp_open+0x230/0x480 fs/namei.c:3810
do_sys_openat2+0x13b/0x4f0 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5b147169a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007fffbb26cf40 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5b147169a4
RDX: 0000000000080000 RSI: 00005637cb0f17f0 RDI: 00000000ffffff9c
RBP: 00005637cb0f17f0 R08: 00005637cb0e6bb8 R09: 00007f5b147f1b10
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 00007fffbb26d108 R14: 0000000000000000 R15: 0000563798ce4ed5
</TASK>

Allocated by task 4253:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:936 [inline]
__kmalloc_node_track_caller+0xb1/0x220 mm/slab_common.c:956
alloc_dr drivers/base/devres.c:116 [inline]
devm_kmalloc+0x7c/0x2b0 drivers/base/devres.c:826
devm_kzalloc include/linux/device.h:210 [inline]
steam_probe+0x12e/0xc10 drivers/hid/hid-steam.c:741
hid_device_probe+0x298/0x3a0 drivers/hid/hid-core.c:2632
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785
driver_probe_device+0x50/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:1015
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3696
hid_add_device+0x3a5/0x510 drivers/hid/hid-core.c:2784
usbhid_probe+0xc09/0xfc0 drivers/hid/usbhid/hid-core.c:1424
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785
driver_probe_device+0x50/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:1015
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3696
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x2ab/0xcb0 drivers/base/dd.c:639
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:785
driver_probe_device+0x50/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2cf/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:429
__device_attach+0x359/0x570 drivers/base/dd.c:1015
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:489
device_add+0xb48/0xfd0 drivers/base/core.c:3696
usb_new_device+0xbdd/0x1900 drivers/usb/core/hub.c:2631
hub_port_connect drivers/usb/core/hub.c:5489 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5629 [inline]
port_event drivers/usb/core/hub.c:5785 [inline]
hub_event+0x2efe/0x5730 drivers/usb/core/hub.c:5867
process_one_work+0x917/0x1260 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Freed by task 22:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674
release_nodes drivers/base/devres.c:503 [inline]
devres_release_all+0x1c1/0x240 drivers/base/devres.c:532
device_unbind_cleanup drivers/base/dd.c:530 [inline]
__device_release_driver drivers/base/dd.c:1265 [inline]
device_release_driver_internal+0x5bf/0x880 drivers/base/dd.c:1286
bus_remove_device+0x2e5/0x400 drivers/base/bus.c:531
device_del+0x6e2/0xbd0 drivers/base/core.c:3884
hid_remove_device drivers/hid/hid-core.c:2833 [inline]
hid_destroy_device+0x64/0x100 drivers/hid/hid-core.c:2852
usbhid_disconnect+0x9a/0xc0 drivers/hid/usbhid/hid-core.c:1451
usb_unbind_interface+0x1cd/0x840 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:550 [inline]
__device_release_driver drivers/base/dd.c:1260 [inline]
device_release_driver_internal+0x59e/0x880 drivers/base/dd.c:1286
bus_remove_device+0x2e5/0x400 drivers/base/bus.c:531
device_del+0x6e2/0xbd0 drivers/base/core.c:3884
usb_disable_device+0x3b8/0x840 drivers/usb/core/message.c:1414
usb_disconnect+0x33c/0x8c0 drivers/usb/core/hub.c:2286
hub_port_connect drivers/usb/core/hub.c:5333 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5629 [inline]
port_event drivers/usb/core/hub.c:5785 [inline]
hub_event+0x1f78/0x5730 drivers/usb/core/hub.c:5867
process_one_work+0x917/0x1260 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff8880193f7c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 232 bytes inside of
512-byte region [ffff8880193f7c00, ffff8880193f7e00)

The buggy address belongs to the physical page:
page:ffffea000064fd00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x193f4
head:ffffea000064fd00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000a96a00 dead000000000002 ffff888017c41c80
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 88, tgid 88 (kworker/u4:1), ts 7709161958, free_ts 7626807139
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x3731/0x38d0 mm/page_alloc.c:4328
__alloc_pages+0x28d/0x770 mm/page_alloc.c:5605
alloc_slab_page+0x6a/0x150 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x84/0x2d0 mm/slub.c:1992
___slab_alloc+0xc20/0x1270 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
__kmem_cache_alloc_node+0x19f/0x260 mm/slub.c:3437
kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
alloc_bprm+0x56/0x790 fs/exec.c:1537
kernel_execve+0x92/0xa10 fs/exec.c:2004
call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:113
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x12a6/0x15b0 mm/page_alloc.c:3384
free_unref_page+0x33/0x3e0 mm/page_alloc.c:3479
__stack_depot_save+0x409/0x470 lib/stackdepot.c:506
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x60/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
slab_alloc_node mm/slub.c:3398 [inline]
slab_alloc mm/slub.c:3406 [inline]
__kmem_cache_alloc_lru mm/slub.c:3413 [inline]
kmem_cache_alloc_lru+0x10c/0x2d0 mm/slub.c:3429
alloc_inode_sb include/linux/fs.h:3245 [inline]
alloc_inode fs/inode.c:263 [inline]
new_inode_pseudo+0x81/0x1d0 fs/inode.c:1063
new_inode+0x25/0x1d0 fs/inode.c:1091
tracefs_get_inode fs/tracefs/inode.c:132 [inline]
tracefs_create_file+0xe9/0x5b0 fs/tracefs/inode.c:498
trace_create_file+0x2e/0x60 kernel/trace/trace.c:9053
tracer_init_tracefs_work_func+0x58/0x13b kernel/trace/trace.c:9960
process_one_work+0x917/0x1260 kernel/workqueue.c:2292
worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
ffff8880193f7b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880193f7c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880193f7c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880193f7d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880193f7d80: 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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Mar 27, 2025, 10:10:03 AM3/27/25
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 691ead124a0c35e56633dbb73e43711ff3db23ef
git tree: upstream
Author: Vicki Pfau <v...@endrift.com>
Date: Wed Dec 20 03:38:33 2023 +0000

HID: hid-steam: Clean up locking

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10d03804580000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13cac4b7980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15caca54580000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Jul 3, 2025, 5:54:05 PM7/3/25
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 691ead124a0c35e56633dbb73e43711ff3db23ef
git tree: upstream
Author: Vicki Pfau <v...@endrift.com>
Date: Wed Dec 20 03:38:33 2023 +0000

HID: hid-steam: Clean up locking

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=12a38c8c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=bcb6af887426ce59
dashboard link: https://syzkaller.appspot.com/bug?extid=90e00c014235fc0be992
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1166184c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15b87ff8580000
Reply all
Reply to author
Forward
0 new messages