syzbot


KASAN: use-after-free Read in steam_input_open

Status: upstream: reported C repro on 2025/03/06 06:53
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+90e00c014235fc0be992@syzkaller.appspotmail.com
First crash: 311d, last: 7d20h
Fix commit to backport (bisect log) :
tree: upstream
commit 691ead124a0c35e56633dbb73e43711ff3db23ef
Author: Vicki Pfau <vi@endrift.com>
Date: Wed Dec 20 03:38:33 2023 +0000

  HID: hid-steam: Clean up locking

  
Bug presence (2)
Date Name Commit Repro Result
2025/03/23 linux-5.15.y (ToT) 0c935c049b5c C [report] KASAN: use-after-free Read in steam_input_open
2025/03/23 upstream (ToT) 586de92313fc C Didn't crash
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in steam_input_open origin:lts-only 19 C done 5 294d 311d 0/3 upstream: reported C repro on 2025/03/06 15:18
android-54 KASAN: use-after-free Write in steam_input_open 24 C 29 249d 321d 0/2 upstream: reported C repro on 2025/02/24 11:20
upstream KASAN: slab-use-after-free Read in steam_input_open input usb 19 C done 5 309d 322d 28/29 fixed on 2025/06/10 16:19
android-5-15 KASAN: use-after-free Write in steam_input_open origin:lts 24 C 91 6d09h 490d 0/2 upstream: reported C repro on 2024/09/08 02:35
android-6-1 KASAN: use-after-free Write in steam_input_open origin:lts 24 C 80 6d11h 473d 0/2 upstream: reported C repro on 2024/09/25 04:26
android-5-10 KASAN: use-after-free Write in steam_input_open 24 C inconclusive 232 6d12h 495d 0/2 upstream: reported C repro on 2024/09/03 09:12
Last patch testing requests (10)
Created Duration User Patch Repo Result
2025/12/09 00:11 16m retest repro linux-5.15.y report log
2025/11/09 06:20 9m retest repro linux-5.15.y report log
2025/11/09 06:20 9m retest repro linux-5.15.y report log
2025/10/23 01:03 17m retest repro linux-5.15.y report log
2025/09/29 22:53 10m retest repro linux-5.15.y report log
2025/08/30 14:58 14m retest repro linux-5.15.y report log
2025/08/30 14:58 12m retest repro linux-5.15.y report log
2025/08/12 20:47 53m retest repro linux-5.15.y report log
2025/06/20 18:18 44m retest repro linux-5.15.y report log
2025/06/20 18:18 1h14m retest repro linux-5.15.y report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/07/03 11:59 9h53m fix candidate upstream OK (1) job log
2025/05/03 12:37 12h12m fix candidate upstream error job log

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __mutex_lock_common+0x114/0x2390 kernel/locking/mutex.c:575
Read of size 8 at addr ffff88807960e0e8 by task udevd/4193

CPU: 0 PID: 4193 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 __mutex_lock_common+0x114/0x2390 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/0x170 drivers/hid/hid-steam.c:297
 input_open_device+0x16c/0x2e0 drivers/input/input.c:640
 evdev_open_device drivers/input/evdev.c:400 [inline]
 evdev_open+0x4b0/0x5b0 drivers/input/evdev.c:487
 chrdev_open+0x597/0x670 fs/char_dev.c:414
 do_dentry_open+0x7ff/0xf80 fs/open.c:826
 do_open fs/namei.c:3616 [inline]
 path_openat+0x2682/0x2f30 fs/namei.c:3750
 do_filp_open+0x1b3/0x3e0 fs/namei.c:3777
 do_sys_openat2+0x142/0x4a0 fs/open.c:1255
 do_sys_open fs/open.c:1271 [inline]
 __do_sys_openat fs/open.c:1287 [inline]
 __se_sys_openat fs/open.c:1282 [inline]
 __x64_sys_openat+0x135/0x160 fs/open.c:1282
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f19d10dd407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffecf27d0d0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f19d0fef880 RCX: 00007f19d10dd407
RDX: 0000000000080000 RSI: 000055b1044bb720 RDI: ffffffffffffff9c
RBP: 000055b1044b5830 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055b0c81a90c8
R13: 000055b0c81a90ce R14: 00007ffecf27d6d0 R15: 000055b0c81afbcc
 </TASK>

Allocated by task 4220:
 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 mm/kasan/common.c:513 [inline]
 __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522
 alloc_dr drivers/base/devres.c:116 [inline]
 devm_kmalloc+0x77/0x280 drivers/base/devres.c:831
 devm_kzalloc include/linux/device.h:209 [inline]
 steam_probe+0x129/0xb40 drivers/hid/hid-steam.c:741
 hid_device_probe+0x271/0x360 drivers/hid/hid-core.c:2318
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x29b/0x460 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 hid_add_device+0x389/0x530 drivers/hid/hid-core.c:2470
 usbhid_probe+0xb92/0xf40 drivers/hid/usbhid/hid-core.c:1427
 usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x29b/0x460 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 usb_set_configuration+0x1991/0x1fd0 drivers/usb/core/message.c:2165
 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x139/0x270 drivers/usb/core/driver.c:293
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x284/0xc80 drivers/base/dd.c:595
 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
 __device_attach+0x29b/0x460 drivers/base/dd.c:979
 bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
 device_add+0xa00/0xfb0 drivers/base/core.c:3412
 usb_new_device+0xd53/0x1640 drivers/usb/core/hub.c:2632
 hub_port_connect drivers/usb/core/hub.c:5497 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
 port_event drivers/usb/core/hub.c:5799 [inline]
 hub_event+0x2dd9/0x5560 drivers/usb/core/hub.c:5881
 process_one_work+0x863/0x1000 kernel/workqueue.c:2310
 process_scheduled_works kernel/workqueue.c:2373 [inline]
 worker_thread+0xdca/0x12a0 kernel/workqueue.c:2459
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Freed by task 4220:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1710 [inline]
 slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kfree+0xef/0x2a0 mm/slub.c:4564
 release_nodes drivers/base/devres.c:501 [inline]
 devres_release_all+0x1a1/0x220 drivers/base/devres.c:530
 __device_release_driver drivers/base/dd.c:1231 [inline]
 device_release_driver_internal+0x4c3/0x750 drivers/base/dd.c:1262
 bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531
 device_del+0x628/0xa70 drivers/base/core.c:3600
 hid_remove_device drivers/hid/hid-core.c:2519 [inline]
 hid_destroy_device+0x66/0x100 drivers/hid/hid-core.c:2538
 usbhid_disconnect+0x9b/0xc0 drivers/hid/usbhid/hid-core.c:1454
 usb_unbind_interface+0x1ee/0x860 drivers/usb/core/driver.c:458
 __device_release_driver drivers/base/dd.c:1229 [inline]
 device_release_driver_internal+0x4b4/0x750 drivers/base/dd.c:1262
 bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531
 device_del+0x628/0xa70 drivers/base/core.c:3600
 usb_disable_device+0x3e2/0x890 drivers/usb/core/message.c:1414
 usb_disconnect+0x348/0x8a0 drivers/usb/core/hub.c:2287
 hub_port_connect drivers/usb/core/hub.c:5341 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
 port_event drivers/usb/core/hub.c:5799 [inline]
 hub_event+0x1e9f/0x5560 drivers/usb/core/hub.c:5881
 process_one_work+0x863/0x1000 kernel/workqueue.c:2310
 process_scheduled_works kernel/workqueue.c:2373 [inline]
 worker_thread+0xdca/0x12a0 kernel/workqueue.c:2459
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff88807960e000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 232 bytes inside of
 512-byte region [ffff88807960e000, ffff88807960e200)
The buggy address belongs to the page:
page:ffffea0001e58300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7960c
head:ffffea0001e58300 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888016841c80
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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4317, ts 86247032432, free_ts 84524814424
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
 alloc_slab_page mm/slub.c:1780 [inline]
 allocate_slab mm/slub.c:1917 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1980
 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3013
 __slab_alloc mm/slub.c:3100 [inline]
 slab_alloc_node mm/slub.c:3191 [inline]
 __kmalloc_node_track_caller+0x1fc/0x3a0 mm/slub.c:4963
 kmalloc_reserve net/core/skbuff.c:356 [inline]
 __alloc_skb+0x22c/0x750 net/core/skbuff.c:427
 alloc_skb include/linux/skbuff.h:1162 [inline]
 nlmsg_new include/net/netlink.h:953 [inline]
 netlink_ack+0x3a6/0xb60 net/netlink/af_netlink.c:2442
 netlink_rcv_skb+0x265/0x430 net/netlink/af_netlink.c:2513
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x774/0x920 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:706 [inline]
 __sock_sendmsg net/socket.c:718 [inline]
 __sys_sendto+0x423/0x580 net/socket.c:2073
 __do_sys_sendto net/socket.c:2085 [inline]
 __se_sys_sendto net/socket.c:2081 [inline]
 __x64_sys_sendto+0xda/0xf0 net/socket.c:2081
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
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+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x94/0x280 mm/page_alloc.c:3396
 free_slab mm/slub.c:2020 [inline]
 discard_slab mm/slub.c:2026 [inline]
 __unfreeze_partials+0x1a5/0x200 mm/slub.c:2512
 put_cpu_partial+0x12d/0x190 mm/slub.c:2592
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3225 [inline]
 slab_alloc mm/slub.c:3233 [inline]
 __kmalloc+0x127/0x330 mm/slub.c:4408
 kmalloc include/linux/slab.h:612 [inline]
 tomoyo_realpath_from_path+0x118/0x610 security/tomoyo/realpath.c:254
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x1cd/0x510 security/tomoyo/file.c:822
 security_inode_getattr+0xcf/0x120 security/security.c:1348
 vfs_getattr+0x26/0x3a0 fs/stat.c:157
 vfs_fstat fs/stat.c:182 [inline]
 __do_sys_newfstat fs/stat.c:421 [inline]
 __se_sys_newfstat fs/stat.c:418 [inline]
 __x64_sys_newfstat+0x104/0x1d0 fs/stat.c:418
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Memory state around the buggy address:
 ffff88807960df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88807960e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807960e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                          ^
 ffff88807960e100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88807960e180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/01/03 19:36 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/12/28 10:31 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/09/15 16:46 linux-5.15.y 43bb85222e53 e2beed91 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/16 17:34 linux-5.15.y 0c935c049b5c e2826670 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/06 10:59 linux-5.15.y c16c81c81336 831e3629 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/06 10:26 linux-5.15.y c16c81c81336 831e3629 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2026/01/02 00:36 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/12/28 07:46 linux-5.15.y 68efe5a6c16a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/20 23:20 linux-5.15.y 0c935c049b5c 62330552 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/19 21:09 linux-5.15.y 0c935c049b5c e20d7b13 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/18 20:34 linux-5.15.y 0c935c049b5c 22a6c2b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/17 11:20 linux-5.15.y 0c935c049b5c 948c34e4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/16 05:26 linux-5.15.y 0c935c049b5c e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/10 21:00 linux-5.15.y c16c81c81336 16256247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/06 11:35 linux-5.15.y c16c81c81336 831e3629 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/06 06:55 linux-5.15.y c16c81c81336 831e3629 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
2025/03/06 06:52 linux-5.15.y c16c81c81336 831e3629 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in steam_input_open
* Struck through repros no longer work on HEAD.