==================================================================
BUG: KASAN: use-after-free in usa49_glocont_callback+0x19f/0x270 drivers/usb/serial/keyspan.c:1044
Read of size 4 at addr ffff88802414adb0 by task udevd/3557
CPU: 1 PID: 3557 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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:d_walk+0x4d9/0x6a0 fs/dcache.c:1395
Code: ff e8 9b 6f aa ff c6 05 27 a5 a8 0b 01 48 c7 c7 e0 e4 36 8a be 02 03 00 00 48 c7 c2 80 e5 36 8a e8 6c c2 e7 07 e9 56 fc ff ff 72 6f aa ff 83 7c 24 14 00 0f 85 0e 01 00 00 8b 1d 01 a1 32 0a
RSP: 0018:ffffc90002daf508 EFLAGS: 00000246
RAX: ffffffff81cea32c RBX: ffff88807274c758 RCX: ffff88807ccd9dc0
RDX: 0000000000000000 RSI: ffffffff8a7a48a0 RDI: ffffffff8a7a4860
RBP: ffff88807274c870 R08: dffffc0000000000 R09: 1ffffffff203e218
R10: dffffc0000000000 R11: fffffbfff203e219 R12: dffffc0000000000
R13: ffff88807274c7e8 R14: ffffc90002daf5c0 R15: ffff88807274c758
shrink_dcache_parent+0x114/0x3d0 fs/dcache.c:1605
d_invalidate+0x118/0x270 fs/dcache.c:1717
lookup_fast+0x5e6/0x720 fs/namei.c:1636
walk_component+0x81/0x460 fs/namei.c:1980
link_path_walk+0x688/0xde0 fs/namei.c:-1
path_openat+0x28e/0x2fb0 fs/namei.c:3789
do_filp_open+0x1df/0x400 fs/namei.c:3820
do_sys_openat2+0x14b/0x500 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:0x7febc0ce2407
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:00007ffe4d23e4b0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007febc0bf4880 RCX: 00007febc0ce2407
RDX: 0000000000080000 RSI: 00007ffe4d23e630 RDI: ffffffffffffff9c
RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000055c4798df7f5
R13: 000055c4798df7f5 R14: 0000000000000001 R15: 0000000000000000
Allocated by task 4263:
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 7:
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
ipvlan_link_new+0x3a8/0xb10 drivers/net/ipvlan/ipvlan_main.c:588
__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
Second to 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]
call_usermodehelper_exec+0x2e3/0x520 kernel/umh.c:435
kobject_uevent_env+0x67b/0x890 lib/kobject_uevent.c:633
device_add+0xac2/0x1050 drivers/base/core.c:3393
device_create_groups_vargs drivers/base/core.c:4123 [inline]
device_create+0x266/0x300 drivers/base/core.c:4165
mon_bin_add+0xb2/0x120 drivers/usb/mon/mon_bin.c:1371
mon_bus_init+0x162/0x290 drivers/usb/mon/mon_main.c:302
mon_bus_add drivers/usb/mon/mon_main.c:199 [inline]
mon_notify+0x108/0x3e0 drivers/usb/mon/mon_main.c:230
notifier_call_chain kernel/notifier.c:83 [inline]
blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:318
usb_register_bus+0xcf/0x140 drivers/usb/core/hcd.c:933
usb_add_hcd+0x395/0x1080 drivers/usb/core/hcd.c:2891
dummy_hcd_probe+0x130/0x260 drivers/usb/gadget/udc/dummy_hcd.c:2704
platform_probe+0x137/0x1c0 drivers/base/platform.c:1391
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
platform_device_add+0x4bf/0x830 drivers/base/platform.c:712
init+0x371/0x1170 drivers/usb/gadget/udc/dummy_hcd.c:2857
do_one_initcall+0x272/0x730 init/main.c:1276
do_initcall_level+0x13d/0x1f0 init/main.c:1349
do_initcalls+0x4b/0x90 init/main.c:1365
kernel_init_freeable+0x3d5/0x560 init/main.c:1589
kernel_init+0x19/0x1b0 init/main.c:1480
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff88802414ad00
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 176 bytes inside of
192-byte region [ffff88802414ad00, ffff88802414adc0)
The buggy address belongs to the page:
page:ffffea0000905280 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2414a
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 0000000500000001 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 11752267298, free_ts 11606245383
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
get_hub_descriptor drivers/usb/core/hub.c:413 [inline]
hub_configure drivers/usb/core/hub.c:1453 [inline]
hub_probe+0xed7/0x3630 drivers/usb/core/hub.c:1956
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
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+0x8f/0x2a0 mm/page_alloc.c:3396
__vunmap+0x8e0/0xa80 mm/vmalloc.c:2628
free_work+0x56/0x80 mm/vmalloc.c:95
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
Memory state around the buggy address:
ffff88802414ac80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
ffff88802414ad00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802414ad80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
^
ffff88802414ae00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802414ae80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: ff ljmp (bad)
1: e8 9b 6f aa ff call 0xffaa6fa1
6: c6 05 27 a5 a8 0b 01 movb $0x1,0xba8a527(%rip) # 0xba8a534
d: 48 c7 c7 e0 e4 36 8a mov $0xffffffff8a36e4e0,%rdi
14: be 02 03 00 00 mov $0x302,%esi
19: 48 c7 c2 80 e5 36 8a mov $0xffffffff8a36e580,%rdx
20: e8 6c c2 e7 07 call 0x7e7c291
25: e9 56 fc ff ff jmp 0xfffffc80
* 2a: e8 72 6f aa ff call 0xffaa6fa1 <-- trapping instruction
2f: 83 7c 24 14 00 cmpl $0x0,0x14(%rsp)
34: 0f 85 0e 01 00 00 jne 0x148
3a: 8b 1d 01 a1 32 0a mov 0xa32a101(%rip),%ebx # 0xa32a141