================================================================== BUG: KASAN: use-after-free in usa49_glocont_callback+0x19f/0x270 drivers/usb/serial/keyspan.c:1044 Read of size 4 at addr ffff8880248abab0 by task kworker/1:11/4527 CPU: 1 PID: 4527 Comm: kworker/1:11 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Workqueue: usb_hub_wq hub_event Call Trace: dump_stack_lvl+0x188/0x250 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 usa49_glocont_callback+0x19f/0x270 drivers/usb/serial/keyspan.c:1044 __usb_hcd_giveback_urb+0x35d/0x520 drivers/usb/core/hcd.c:1672 dummy_timer+0xa47/0x34a0 drivers/usb/gadget/udc/dummy_hcd.c:2012 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648 expire_timers kernel/time/timer.c:1699 [inline] __run_timers+0x56c/0x810 kernel/time/timer.c:1970 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983 handle_softirqs+0x336/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:console_unlock+0xc90/0x10f0 kernel/printk/printk.c:2749 Code: 75 11 e8 33 e5 18 00 4d 85 e4 75 16 e8 29 e5 18 00 eb 15 e8 22 e5 18 00 e8 6d 05 61 08 4d 85 e4 74 ea e8 13 e5 18 00 fb 31 ff <89> de e8 69 e8 18 00 85 db 0f 94 c0 22 44 24 1f 3c 01 75 1f e8 f7 RSP: 0018:ffffc900047eede0 EFLAGS: 00000246 RAX: ffffffff81602f8d RBX: 0000000000000000 RCX: 0000000000100000 RDX: ffffc90011b13000 RSI: 00000000000085b8 RDI: 0000000000000000 RBP: ffffc900047ef050 R08: ffffffff901f10c7 R09: 1ffffffff203e218 R10: dffffc0000000000 R11: fffffbfff203e219 R12: 0000000000000200 R13: 0000000000000069 R14: 0000000000000000 R15: dffffc0000000000 vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274 dev_vprintk_emit+0x2c2/0x360 drivers/base/core.c:4665 dev_printk_emit+0xeb/0x140 drivers/base/core.c:4676 _dev_info+0x11b/0x170 drivers/base/core.c:4734 usb_serial_device_remove+0x149/0x1e0 drivers/usb/serial/bus.c:99 __device_release_driver drivers/base/dd.c:1247 [inline] device_release_driver_internal+0x44c/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_serial_disconnect+0x294/0x480 drivers/usb/serial/usb-serial.c:1202 usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1249 [inline] device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1472 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2292 hub_port_connect drivers/usb/core/hub.c:5346 [inline] hub_port_connect_change drivers/usb/core/hub.c:5642 [inline] port_event drivers/usb/core/hub.c:5804 [inline] hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5886 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Allocated by task 4527: 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+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] keyspan_port_probe+0xa7/0xd10 drivers/usb/serial/keyspan.c:2890 usb_serial_device_probe+0xd6/0x2d0 drivers/usb/serial/bus.c:47 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_serial_probe+0x265c/0x2c90 drivers/usb/serial/usb-serial.c:1149 usb_probe_interface+0x5be/0xae0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_new_device+0x9f6/0x15d0 drivers/usb/core/hub.c:2637 hub_port_connect drivers/usb/core/hub.c:5502 [inline] hub_port_connect_change drivers/usb/core/hub.c:5642 [inline] port_event drivers/usb/core/hub.c:5804 [inline] hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5886 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 4527: 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+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 usb_serial_device_remove+0x11c/0x1e0 drivers/usb/serial/bus.c:97 __device_release_driver drivers/base/dd.c:1247 [inline] device_release_driver_internal+0x44c/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_serial_disconnect+0x294/0x480 drivers/usb/serial/usb-serial.c:1202 usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1249 [inline] device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1472 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2292 hub_port_connect drivers/usb/core/hub.c:5346 [inline] hub_port_connect_change drivers/usb/core/hub.c:5642 [inline] port_event drivers/usb/core/hub.c:5804 [inline] hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5886 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x90b/0xc80 kernel/workqueue.c:1532 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x898/0x930 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 call_netdevice_notifiers_extack net/core/dev.c:2074 [inline] call_netdevice_notifiers net/core/dev.c:2088 [inline] register_netdevice+0x12a8/0x1720 net/core/dev.c:10454 macvlan_common_newlink+0x1119/0x18a0 drivers/net/macvlan.c:1507 __rtnl_newlink net/core/rtnetlink.c:3538 [inline] rtnl_newlink+0x139e/0x1920 net/core/rtnetlink.c:3586 rtnetlink_rcv_msg+0x7f1/0xf10 net/core/rtnetlink.c:5698 netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2519 netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] netlink_unicast+0x78f/0x940 net/netlink/af_netlink.c:1340 netlink_sendmsg+0x8ba/0xbe0 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] __sys_sendto+0x46d/0x620 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 The buggy address belongs to the object at ffff8880248aba00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 176 bytes inside of 192-byte region [ffff8880248aba00, ffff8880248abac0) The buggy address belongs to the page: page:ffffea0000922ac0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x248ab flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00008adec0 0000000200000002 ffff888016c41a00 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 12182317110, free_ts 0 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 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+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] slab_alloc mm/slub.c:3233 [inline] __kmalloc+0x11d/0x340 mm/slub.c:4408 kmalloc include/linux/slab.h:612 [inline] usb_alloc_urb+0x3f/0x140 drivers/usb/core/urb.c:74 usb_internal_control_msg drivers/usb/core/message.c:109 [inline] usb_control_msg+0x115/0x3e0 drivers/usb/core/message.c:166 usb_get_string+0xa2/0x3d0 drivers/usb/core/message.c:901 usb_string_sub+0x76/0x420 drivers/usb/core/message.c:940 usb_string+0x34b/0x720 drivers/usb/core/message.c:1045 usb_cache_string+0x7b/0xf0 drivers/usb/core/message.c:1087 usb_enumerate_device drivers/usb/core/hub.c:2479 [inline] usb_new_device+0x26d/0x15d0 drivers/usb/core/hub.c:2607 register_root_hub+0x258/0x550 drivers/usb/core/hcd.c:1019 usb_add_hcd+0xbb9/0x1080 drivers/usb/core/hcd.c:3005 dummy_hcd_probe+0x130/0x260 drivers/usb/gadget/udc/dummy_hcd.c:2704 page_owner free stack trace missing Memory state around the buggy address: ffff8880248ab980: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff8880248aba00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880248aba80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8880248abb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880248abb80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 75 11 jne 0x13 2: e8 33 e5 18 00 call 0x18e53a 7: 4d 85 e4 test %r12,%r12 a: 75 16 jne 0x22 c: e8 29 e5 18 00 call 0x18e53a 11: eb 15 jmp 0x28 13: e8 22 e5 18 00 call 0x18e53a 18: e8 6d 05 61 08 call 0x861058a 1d: 4d 85 e4 test %r12,%r12 20: 74 ea je 0xc 22: e8 13 e5 18 00 call 0x18e53a 27: fb sti 28: 31 ff xor %edi,%edi * 2a: 89 de mov %ebx,%esi <-- trapping instruction 2c: e8 69 e8 18 00 call 0x18e89a 31: 85 db test %ebx,%ebx 33: 0f 94 c0 sete %al 36: 22 44 24 1f and 0x1f(%rsp),%al 3a: 3c 01 cmp $0x1,%al 3c: 75 1f jne 0x5d 3e: e8 .byte 0xe8 3f: f7 .byte 0xf7