==================================================================
BUG: KASAN: use-after-free in strlen+0x57/0x70 lib/string.c:502
Read of size 1 at addr ffff888134128700 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x71/0x200 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:420
kasan_report+0x122/0x150 mm/kasan/report.c:524
__asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348
strlen+0x57/0x70 lib/string.c:502
__fortify_strlen include/linux/fortify-string.h:196 [inline]
usb_gadget_get_string+0x1a9/0x310 drivers/usb/gadget/usbstring.c:58
lookup_string drivers/usb/gadget/composite.c:1172 [inline]
get_string+0x467/0x1560 drivers/usb/gadget/composite.c:1249
composite_setup+0x17ac/0x2950 drivers/usb/gadget/composite.c:1780
android_setup+0x257/0x3a0 drivers/usb/gadget/configfs.c:1580
dummy_timer+0x1310/0x3270 drivers/usb/gadget/udc/dummy_hcd.c:1936
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__hrtimer_run_queues+0x398/0x890 kernel/time/hrtimer.c:1749
hrtimer_run_softirq+0x19b/0x260 kernel/time/hrtimer.c:1766
handle_softirqs+0x1d7/0x600 kernel/softirq.c:642
__do_softirq kernel/softirq.c:680 [inline]
invoke_softirq kernel/softirq.c:497 [inline]
__irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729
irq_exit_rcu+0x9/0x10 kernel/softirq.c:741
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:default_idle+0xf/0x20 arch/x86/kernel/process.c:742
Code: cc 00 00 cc cc 00 00 cc cc 00 00 90 90 90 90 90 90 90 90 90 90 90 b8 0c 67 40 a5 55 48 89 e5 66 90 0f 00 2d 53 5b 65 00 fb f4 <5d> c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 90 90 90 90 90
RSP: 0018:ffffffff87007d58 EFLAGS: 00000257
RAX: ffff8881f6e00000 RBX: ffffffff8701c680 RCX: 8757e34136c36e00
RDX: 0000000000000001 RSI: ffffffff85ca6940 RDI: ffffffff85ca6900
RBP: ffffffff87007d58 R08: ffff8881f6e348b3 R09: 1ffff1103edc6916
R10: 0000000000000000 R11: ffffffff8500d380 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffffff8701c680 R15: dffffc0000000000
arch_cpu_idle+0x1c/0x20 arch/x86/kernel/process.c:733
default_idle_call+0x71/0x1d0 kernel/sched/idle.c:109
cpuidle_idle_call kernel/sched/idle.c:199 [inline]
do_idle+0x354/0x640 kernel/sched/idle.c:323
cpu_startup_entry+0x43/0x60 kernel/sched/idle.c:422
rest_init+0x10a/0x130 init/main.c:744
arch_call_rest_init+0xe/0x10 init/main.c:904
start_kernel+0x483/0x4f1 init/main.c:1275
x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:555
x86_64_start_kernel+0x7c/0x81 arch/x86/kernel/head64.c:536
secondary_startup_64_no_verify+0xce/0xdb
Allocated by task 7770:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:380 [inline]
__kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:212 [inline]
kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
kmalloc include/linux/slab.h:563 [inline]
__hw_addr_create net/core/dev_addr_lists.c:60 [inline]
__hw_addr_add_ex+0x1f4/0x6f0 net/core/dev_addr_lists.c:118
__dev_mc_add net/core/dev_addr_lists.c:867 [inline]
dev_mc_add+0x74/0xd0 net/core/dev_addr_lists.c:885
ip_mc_filter_add net/ipv4/igmp.c:1155 [inline]
igmp_group_added+0x1dc/0x860 net/ipv4/igmp.c:1344
____ip_mc_inc_group+0x5d7/0x7f0 net/ipv4/igmp.c:1478
__ip_mc_inc_group net/ipv4/igmp.c:1487 [inline]
ip_mc_inc_group net/ipv4/igmp.c:1493 [inline]
ip_mc_up+0x112/0x1f0 net/ipv4/igmp.c:1792
inetdev_event+0xc4c/0x10a0 net/ipv4/devinet.c:1590
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
call_netdevice_notifiers_info net/core/dev.c:2022 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2060 [inline]
call_netdevice_notifiers net/core/dev.c:2074 [inline]
__dev_notify_flags+0x2f4/0x5b0 net/core/dev.c:8730
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8768
do_setlink+0xc02/0x2a10 net/core/rtnetlink.c:2836
__rtnl_newlink net/core/rtnetlink.c:3611 [inline]
rtnl_newlink+0x17d7/0x20d0 net/core/rtnetlink.c:3658
rtnetlink_rcv_msg+0xb28/0xde0 net/core/rtnetlink.c:6153
netlink_rcv_skb+0x200/0x450 net/netlink/af_netlink.c:2521
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6171
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1873
sock_sendmsg_nosec net/socket.c:716 [inline]
__sock_sendmsg net/socket.c:728 [inline]
__sys_sendto+0x4ac/0x660 net/socket.c:2142
__do_sys_sendto net/socket.c:2154 [inline]
__se_sys_sendto net/socket.c:2150 [inline]
__x64_sys_sendto+0xe5/0x100 net/socket.c:2150
x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 483:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1750 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
slab_free mm/slub.c:3712 [inline]
kmem_cache_free_bulk+0x376/0x450 mm/slub.c:3833
kfree_bulk include/linux/slab.h:475 [inline]
kfree_rcu_work+0x22b/0x7a0 kernel/rcu/tree.c:3131
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
__kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
kvfree_call_rcu+0x8b/0x7a0 kernel/rcu/tree.c:3445
__hw_addr_del_entry net/core/dev_addr_lists.c:161 [inline]
__hw_addr_del_ex+0x3f9/0x4e0 net/core/dev_addr_lists.c:200
__dev_mc_del net/core/dev_addr_lists.c:908 [inline]
dev_mc_del+0x70/0xd0 net/core/dev_addr_lists.c:926
ip_mc_filter_del net/ipv4/igmp.c:1168 [inline]
__igmp_group_dropped+0x1e0/0x840 net/ipv4/igmp.c:1301
igmp_group_dropped net/ipv4/igmp.c:1332 [inline]
ip_mc_down+0x7b/0x240 net/ipv4/igmp.c:1741
inetdev_event+0x2b2/0x10a0 net/ipv4/devinet.c:1601
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
call_netdevice_notifiers_info net/core/dev.c:2022 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2060 [inline]
call_netdevice_notifiers net/core/dev.c:2074 [inline]
dev_close_many+0x325/0x4d0 net/core/dev.c:1622
unregister_netdevice_many+0x43f/0x1910 net/core/dev.c:10979
default_device_exit_batch+0x951/0x9f0 net/core/dev.c:11518
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x630/0xb10 net/core/net_namespace.c:604
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Second to last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
__kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
__call_rcu_common kernel/rcu/tree.c:2807 [inline]
call_rcu+0xcf/0xf50 kernel/rcu/tree.c:2926
inet_free_ifa net/ipv4/devinet.c:234 [inline]
inetdev_destroy net/ipv4/devinet.c:324 [inline]
inetdev_event+0x6b3/0x10a0 net/ipv4/devinet.c:1615
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xa1/0x110 kernel/notifier.c:455
call_netdevice_notifiers_info net/core/dev.c:2022 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2060 [inline]
call_netdevice_notifiers net/core/dev.c:2074 [inline]
unregister_netdevice_many+0x104a/0x1910 net/core/dev.c:11005
ip_tunnel_delete_nets+0x346/0x390 net/ipv4/ip_tunnel.c:1139
ipip_exit_batch_net+0x22/0x30 net/ipv4/ipip.c:596
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x630/0xb10 net/core/net_namespace.c:604
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff888134128700
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 0 bytes inside of
128-byte region [ffff888134128700, ffff888134128780)
The buggy address belongs to the physical page:
page:ffffea0004d04a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888134128c00 pfn:0x134128
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea0004831688 ffffea00047ca3c8 ffff888100042a80
raw: ffff888134128c00 000000000010000d 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 0x112c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 19, tgid 19 (kworker/0:1), ts 34355012231, free_ts 34325260554
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672
prep_new_page+0x1c/0x110 mm/page_alloc.c:2679
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
__kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028
kmalloc include/linux/slab.h:563 [inline]
dummy_urb_enqueue+0x7d/0x810 drivers/usb/gadget/udc/dummy_hcd.c:1277
usb_hcd_submit_urb+0x347/0x1800 drivers/usb/core/hcd.c:1560
usb_submit_urb+0x1091/0x1740 drivers/usb/core/urb.c:596
usb_start_wait_urb+0x123/0x380 drivers/usb/core/message.c:61
usb_internal_control_msg drivers/usb/core/message.c:116 [inline]
usb_control_msg+0x243/0x3f0 drivers/usb/core/message.c:166
usb_get_descriptor+0x269/0x3d0 drivers/usb/core/message.c:851
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1580 [inline]
free_pcp_prepare mm/page_alloc.c:1654 [inline]
free_unref_page_prepare+0x80c/0x820 mm/page_alloc.c:3621
free_unref_page+0x93/0x530 mm/page_alloc.c:3719
free_the_page mm/page_alloc.c:863 [inline]
__free_pages+0x67/0x100 mm/page_alloc.c:6020
__vunmap+0xa3c/0xc00 mm/vmalloc.c:2739
free_work+0x5a/0x80 mm/vmalloc.c:98
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888134128600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888134128680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888134128700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888134128780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888134128800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: cc int3
1: 00 00 add %al,(%rax)
3: cc int3
4: cc int3
5: 00 00 add %al,(%rax)
7: cc int3
8: cc int3
9: 00 00 add %al,(%rax)
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: b8 0c 67 40 a5 mov $0xa540670c,%eax
1b: 55 push %rbp
1c: 48 89 e5 mov %rsp,%rbp
1f: 66 90 xchg %ax,%ax
21: 0f 00 2d 53 5b 65 00 verw 0x655b53(%rip) # 0x655b7b
28: fb sti
29: f4 hlt
* 2a: 5d pop %rbp <-- trapping instruction
2b: c3 ret
2c: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
33: 00 00 00
36: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop