smsusb:smsusb_onresponse: error, urb status -71, 0 bytes smsusb:smsusb_onresponse: error, urb status -71, 0 bytes smsusb:smsusb_onresponse: error, urb status -71, 0 bytes smsusb:smsusb_onresponse: error, urb status -71, 0 bytes ================================================================== BUG: KASAN: slab-use-after-free in dummy_timer+0x2916/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1849 Read of size 4 at addr ffff88807e7dea54 by task kworker/0:1/9 CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.6.98-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: usb_hub_wq hub_event Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xac/0x230 mm/kasan/report.c:475 kasan_report+0x117/0x150 mm/kasan/report.c:588 dummy_timer+0x2916/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1849 __run_hrtimer kernel/time/hrtimer.c:1755 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1819 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1836 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa9/0x110 kernel/locking/spinlock.c:194 Code: 74 05 e8 4a c8 13 f7 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f6 44 24 21 02 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 82 32 e3 f6 65 8b 05 93 78 8b 75 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc900000e6860 EFLAGS: 00000206 RAX: b7f5bea1df6dbe00 RBX: 0000000000000a06 RCX: b7f5bea1df6dbe00 RDX: dffffc0000000000 RSI: ffffffff8aaab940 RDI: 0000000000000001 RBP: ffffc900000e68f0 R08: ffffffff90da659f R09: 1ffffffff21b4cb3 R10: dffffc0000000000 R11: fffffbfff21b4cb4 R12: dffffc0000000000 R13: 0000000000000001 R14: ffffffff970bf1d0 R15: 1ffff9200001cd0c debug_object_activate+0x2f7/0x4b0 lib/debugobjects.c:727 debug_rcu_head_queue kernel/rcu/rcu.h:227 [inline] __call_rcu_common kernel/rcu/tree.c:2706 [inline] call_rcu+0xab/0x930 kernel/rcu/tree.c:2837 kernfs_put+0x1d3/0x360 fs/kernfs/dir.c:578 device_del+0x251/0x900 drivers/base/core.c:3847 cdev_device_del+0x27/0xf0 fs/char_dev.c:580 media_devnode_unregister+0x30/0x70 drivers/media/mc/mc-devnode.c:284 media_device_unregister+0x37c/0x400 drivers/media/mc/mc-device.c:832 smsusb_init_device drivers/media/usb/siano/smsusb.c:493 [inline] smsusb_probe+0x1710/0x1da0 drivers/media/usb/siano/smsusb.c:569 usb_probe_interface+0x5a4/0xb00 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_set_configuration+0x1a79/0x20c0 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x13d/0x280 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_new_device+0xa31/0x1630 drivers/usb/core/hub.c:2632 hub_port_connect drivers/usb/core/hub.c:5501 [inline] hub_port_connect_change drivers/usb/core/hub.c:5641 [inline] port_event drivers/usb/core/hub.c:5801 [inline] hub_event+0x2957/0x49c0 drivers/usb/core/hub.c:5883 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Allocated by task 9: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] smsusb_init_device drivers/media/usb/siano/smsusb.c:397 [inline] smsusb_probe+0x833/0x1da0 drivers/media/usb/siano/smsusb.c:569 usb_probe_interface+0x5a4/0xb00 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_set_configuration+0x1a79/0x20c0 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x13d/0x280 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_new_device+0xa31/0x1630 drivers/usb/core/hub.c:2632 hub_port_connect drivers/usb/core/hub.c:5501 [inline] hub_port_connect_change drivers/usb/core/hub.c:5641 [inline] port_event drivers/usb/core/hub.c:5801 [inline] hub_event+0x2957/0x49c0 drivers/usb/core/hub.c:5883 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Freed by task 9: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4e/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1806 [inline] slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1832 slab_free mm/slub.c:3816 [inline] __kmem_cache_free+0xba/0x1f0 mm/slub.c:3829 smsusb_term_device+0x1ac/0x220 drivers/media/usb/siano/smsusb.c:352 smsusb_init_device drivers/media/usb/siano/smsusb.c:491 [inline] smsusb_probe+0x1708/0x1da0 drivers/media/usb/siano/smsusb.c:569 usb_probe_interface+0x5a4/0xb00 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_set_configuration+0x1a79/0x20c0 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x13d/0x280 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x25b/0xb40 drivers/base/dd.c:658 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:800 driver_probe_device+0x4f/0x420 drivers/base/dd.c:830 __device_attach_driver+0x2ca/0x520 drivers/base/dd.c:958 bus_for_each_drv+0x24b/0x2d0 drivers/base/bus.c:459 __device_attach+0x2b5/0x400 drivers/base/dd.c:1030 bus_probe_device+0x180/0x260 drivers/base/bus.c:534 device_add+0x85b/0xc20 drivers/base/core.c:3683 usb_new_device+0xa31/0x1630 drivers/usb/core/hub.c:2632 hub_port_connect drivers/usb/core/hub.c:5501 [inline] hub_port_connect_change drivers/usb/core/hub.c:5641 [inline] port_event drivers/usb/core/hub.c:5801 [inline] hub_event+0x2957/0x49c0 drivers/usb/core/hub.c:5883 process_one_work kernel/workqueue.c:2634 [inline] process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 insert_work+0x3d/0x310 kernel/workqueue.c:1651 __queue_work+0xc39/0x1020 kernel/workqueue.c:1800 queue_work_on+0x121/0x1e0 kernel/workqueue.c:1835 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x8a3/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1755 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1819 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1836 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492 insert_work+0x3d/0x310 kernel/workqueue.c:1651 __queue_work+0xc39/0x1020 kernel/workqueue.c:1800 queue_work_on+0x121/0x1e0 kernel/workqueue.c:1835 __usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1650 dummy_timer+0x8a3/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1993 __run_hrtimer kernel/time/hrtimer.c:1755 [inline] __hrtimer_run_queues+0x51e/0xc40 kernel/time/hrtimer.c:1819 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1836 handle_softirqs+0x280/0x820 kernel/softirq.c:578 __do_softirq kernel/softirq.c:612 [inline] invoke_softirq kernel/softirq.c:452 [inline] __irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline] sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687 The buggy address belongs to the object at ffff88807e7de000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2644 bytes inside of freed 4096-byte region [ffff88807e7de000, ffff88807e7df000) The buggy address belongs to the physical page: page:ffffea0001f9f600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7e7d8 head:ffffea0001f9f600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888017842140 0000000000000000 dead000000000001 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5161, tgid 5161 (udevd), ts 390243734076, free_ts 390138623629 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554 prep_new_page mm/page_alloc.c:1561 [inline] get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457 alloc_slab_page+0x5d/0x170 mm/slub.c:1876 allocate_slab mm/slub.c:2023 [inline] new_slab+0x87/0x2e0 mm/slub.c:2076 ___slab_alloc+0xc6d/0x12f0 mm/slub.c:3230 __slab_alloc mm/slub.c:3329 [inline] __slab_alloc_node mm/slub.c:3382 [inline] slab_alloc_node mm/slub.c:3475 [inline] __kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3524 kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:721 [inline] uevent_show+0x156/0x300 drivers/base/core.c:2700 dev_attr_show+0x54/0xc0 drivers/base/core.c:2379 sysfs_kf_seq_show+0x34d/0x4c0 fs/sysfs/file.c:59 seq_read_iter+0x49f/0xd50 fs/seq_file.c:230 call_read_iter include/linux/fs.h:2012 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x431/0x920 fs/read_write.c:470 ksys_read+0x147/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1154 [inline] free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429 discard_slab mm/slub.c:2122 [inline] __unfreeze_partials+0x1cf/0x210 mm/slub.c:2662 put_cpu_partial+0x17c/0x250 mm/slub.c:2738 __slab_free+0x31d/0x410 mm/slub.c:3686 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767 slab_alloc_node mm/slub.c:3485 [inline] slab_alloc mm/slub.c:3493 [inline] __kmem_cache_alloc_lru mm/slub.c:3500 [inline] kmem_cache_alloc+0x11e/0x2e0 mm/slub.c:3509 getname_flags+0xbb/0x500 fs/namei.c:140 user_path_at_empty+0x2c/0x60 fs/namei.c:2908 do_readlinkat+0xd8/0x480 fs/stat.c:494 __do_sys_readlink fs/stat.c:527 [inline] __se_sys_readlink fs/stat.c:524 [inline] __x64_sys_readlink+0x7f/0x90 fs/stat.c:524 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff88807e7de900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807e7de980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807e7dea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807e7dea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807e7deb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 74 05 je 0x7 2: e8 4a c8 13 f7 call 0xf713c851 7: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp) e: 00 00 10: 9c pushf 11: 8f 44 24 20 pop 0x20(%rsp) 15: f6 44 24 21 02 testb $0x2,0x21(%rsp) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 82 32 e3 f6 call 0xf6e332b1 <-- trapping instruction 2f: 65 8b 05 93 78 8b 75 mov %gs:0x758b7893(%rip),%eax # 0x758b78c9 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss