syzbot


KASAN: use-after-free Read in steam_send_report

Status: premoderation: reported on 2025/09/11 13:14
Reported-by: syzbot+d5a731afe8ccc99964b7@syzkaller.appspotmail.com
First crash: 2d03h, last: 2d03h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 KASAN: use-after-free Read in steam_send_report 19 1 187d 187d 0/2 auto-obsoleted due to no activity on 2025/06/08 04:35
android-5-15 general protection fault in steam_send_report 19 2 352d 366d 0/2 auto-obsoleted due to no activity on 2024/12/24 21:29
android-5-10 general protection fault in steam_send_report 2 1 365d 365d 0/2 auto-obsoleted due to no activity on 2024/12/11 21:08

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in hid_report_len include/linux/hid.h:1171 [inline]
BUG: KASAN: use-after-free in steam_send_report+0x2d7/0x310 drivers/hid/hid-steam.c:178
Read of size 4 at addr ffff88811d8aa834 by task udevd/483

CPU: 0 PID: 483 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025
Call Trace:
 __dump_stack+0x21/0x24 lib/dump_stack.c:77
 dump_stack_lvl+0x169/0x1d8 lib/dump_stack.c:118
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:435 [inline]
 kasan_report+0xe2/0x130 mm/kasan/report.c:452
 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308
 hid_report_len include/linux/hid.h:1171 [inline]
 steam_send_report+0x2d7/0x310 drivers/hid/hid-steam.c:178
 steam_send_report_byte drivers/hid/hid-steam.c:212 [inline]
 steam_set_lizard_mode drivers/hid/hid-steam.c:277 [inline]
 steam_input_close+0xdd/0x170 drivers/hid/hid-steam.c:310
 input_close_device+0x26a/0x300 drivers/input/input.c:694
 evdev_close_device drivers/input/evdev.c:414 [inline]
 evdev_release+0x797/0x820 drivers/input/evdev.c:456
 __fput+0x2fb/0x770 fs/file_table.c:281
 ____fput+0x15/0x20 fs/file_table.c:314
 task_work_run+0x127/0x190 kernel/task_work.c:189
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop+0xcb/0xe0 kernel/entry/common.c:172
 exit_to_user_mode_prepare kernel/entry/common.c:199 [inline]
 syscall_exit_to_user_mode+0x68/0x90 kernel/entry/common.c:274
 do_syscall_64+0x3d/0x40 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f40d1b70407
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:00007ffc94a46360 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00007f40d1a82880 RCX: 00007f40d1b70407
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f40d1a826e8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000002
R13: 00007ffc94a464dc R14: 00007ffc94a464d0 R15: 0000564153502bcc

Allocated by task 5:
 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:430 [inline]
 ____kasan_kmalloc mm/kasan/common.c:509 [inline]
 __kasan_kmalloc+0xda/0x110 mm/kasan/common.c:518
 kasan_kmalloc include/linux/kasan.h:254 [inline]
 kmem_cache_alloc_trace+0x184/0x2e0 mm/slub.c:2979
 kmalloc include/linux/slab.h:552 [inline]
 kzalloc include/linux/slab.h:664 [inline]
 hid_register_report drivers/hid/hid-core.c:70 [inline]
 hid_add_field+0x2b0/0x1a00 drivers/hid/hid-core.c:270
 hid_parser_main+0x2a5/0xa90 drivers/hid/hid-core.c:-1
 hid_open_report+0x809/0xe30 drivers/hid/hid-core.c:1270
 hid_parse include/linux/hid.h:1049 [inline]
 steam_probe+0x78/0xb10 drivers/hid/hid-steam.c:721
 hid_device_probe+0x287/0x380 drivers/hid/hid-core.c:2312
 really_probe+0x386/0xa90 drivers/base/dd.c:558
 driver_probe_device+0xe7/0x190 drivers/base/dd.c:752
 __device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:433
 __device_attach+0x29a/0x400 drivers/base/dd.c:932
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493
 device_add+0x8b4/0xbf0 drivers/base/core.c:3273
 hid_add_device+0x356/0x4b0 drivers/hid/hid-core.c:2464
 usbhid_probe+0xb2e/0xee0 drivers/hid/usbhid/hid-core.c:1421
 usb_probe_interface+0x5ff/0xae0 drivers/usb/core/driver.c:397
 really_probe+0x3d8/0xa90 drivers/base/dd.c:562
 driver_probe_device+0xe7/0x190 drivers/base/dd.c:752
 __device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:433
 __device_attach+0x29a/0x400 drivers/base/dd.c:932
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493
 device_add+0x8b4/0xbf0 drivers/base/core.c:3273
 usb_set_configuration+0x1a47/0x1f80 drivers/usb/core/message.c:2160
 usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x148/0x260 drivers/usb/core/driver.c:294
 really_probe+0x3d8/0xa90 drivers/base/dd.c:562
 driver_probe_device+0xe7/0x190 drivers/base/dd.c:752
 __device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863
 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:433
 __device_attach+0x29a/0x400 drivers/base/dd.c:932
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:981
 bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493
 device_add+0x8b4/0xbf0 drivers/base/core.c:3273
 usb_new_device+0xcd1/0x1450 drivers/usb/core/hub.c:2654
 hub_port_connect drivers/usb/core/hub.c:5499 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5639 [inline]
 port_event drivers/usb/core/hub.c:5805 [inline]
 hub_event+0x283f/0x42c0 drivers/usb/core/hub.c:5887
 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301
 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447
 kthread+0x346/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

Freed by task 315:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
 kasan_slab_free include/linux/kasan.h:220 [inline]
 slab_free_hook mm/slub.c:1600 [inline]
 slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
 slab_free mm/slub.c:3208 [inline]
 kfree+0xc0/0x270 mm/slub.c:4196
 hid_free_report drivers/hid/hid-core.c:666 [inline]
 hid_close_report+0x4df/0x650 drivers/hid/hid-core.c:683
 hid_device_remove+0x26a/0x390 drivers/hid/hid-core.c:2344
 __device_release_driver drivers/base/dd.c:-1 [inline]
 device_release_driver_internal+0x4bc/0x750 drivers/base/dd.c:1221
 device_release_driver+0x19/0x20 drivers/base/dd.c:1244
 bus_remove_device+0x2dd/0x340 drivers/base/bus.c:535
 device_del+0x696/0xed0 drivers/base/core.c:3452
 hid_remove_device drivers/hid/hid-core.c:2512 [inline]
 hid_destroy_device+0x6a/0x110 drivers/hid/hid-core.c:2531
 usbhid_disconnect+0x9f/0xc0 drivers/hid/usbhid/hid-core.c:1448
 usb_unbind_interface+0x212/0x8c0 drivers/usb/core/driver.c:459
 __device_release_driver drivers/base/dd.c:-1 [inline]
 device_release_driver_internal+0x4bc/0x750 drivers/base/dd.c:1221
 device_release_driver+0x19/0x20 drivers/base/dd.c:1244
 bus_remove_device+0x2dd/0x340 drivers/base/bus.c:535
 device_del+0x696/0xed0 drivers/base/core.c:3452
 usb_disable_device+0x3a8/0x750 drivers/usb/core/message.c:1411
 usb_disconnect+0x31e/0x850 drivers/usb/core/hub.c:2310
 hub_port_connect drivers/usb/core/hub.c:5338 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5639 [inline]
 port_event drivers/usb/core/hub.c:5805 [inline]
 hub_event+0x1a88/0x42c0 drivers/usb/core/hub.c:5887
 process_one_work+0x6e1/0xba0 kernel/workqueue.c:2301
 worker_thread+0xa6a/0x13b0 kernel/workqueue.c:2447
 kthread+0x346/0x3d0 kernel/kthread.c:313
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298

The buggy address belongs to the object at ffff88811d8aa000
 which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 2100 bytes inside of
 4096-byte region [ffff88811d8aa000, ffff88811d8ab000)
The buggy address belongs to the page:
page:ffffea0004762a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d8a8
head:ffffea0004762a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 dead000000000100 dead000000000122 ffff888100042c00
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 267, ts 29746551594, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook mm/page_alloc.c:2456 [inline]
 prep_new_page+0x179/0x180 mm/page_alloc.c:2462
 get_page_from_freelist+0x2235/0x23d0 mm/page_alloc.c:4254
 __alloc_pages_nodemask+0x268/0x5f0 mm/page_alloc.c:5370
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1813 [inline]
 new_slab+0x84/0x3f0 mm/slub.c:1874
 new_slab_objects mm/slub.c:2632 [inline]
 ___slab_alloc+0x2a6/0x450 mm/slub.c:2796
 __slab_alloc+0x63/0xa0 mm/slub.c:2836
 slab_alloc_node mm/slub.c:2918 [inline]
 slab_alloc mm/slub.c:2960 [inline]
 __kmalloc+0x201/0x330 mm/slub.c:4034
 __kmalloc_node include/linux/slab.h:418 [inline]
 kmalloc_node include/linux/slab.h:575 [inline]
 kvmalloc_node+0x88/0x130 mm/util.c:612
 kvmalloc include/linux/mm.h:833 [inline]
 seq_buf_alloc fs/seq_file.c:38 [inline]
 seq_read_iter+0x1fc/0xd30 fs/seq_file.c:210
 kernfs_fop_read_iter+0x147/0x470 fs/kernfs/file.c:241
 call_read_iter include/linux/fs.h:2060 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x874/0xa10 fs/read_write.c:496
 ksys_read+0x140/0x240 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+0x31/0x40 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88811d8aa700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811d8aa780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88811d8aa800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff88811d8aa880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811d8aa900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
hid 0003:28DE:1102.000A: No HID_FEATURE_REPORT submitted -  nothing to read
hid 0003:28DE:1102.000A: No HID_FEATURE_REPORT submitted -  nothing to read

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/09/11 13:13 android13-5.10-lts 43931d9f8738 fdeaa69b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 KASAN: use-after-free Read in steam_send_report
* Struck through repros no longer work on HEAD.