==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
BUG: KASAN: slab-use-after-free in atomic_inc include/linux/atomic/atomic-instrumented.h:435 [inline]
BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups drivers/usb/core/urb.c:927 [inline]
BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups+0x28/0x40 drivers/usb/core/urb.c:924
Write of size 4 at addr ffff88801eb27110 by task udevd/21699
CPU: 0 PID: 21699 Comm: udevd Not tainted 6.6.0-rc6-syzkaller-00355-gfe3cfe869d5e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
check_region_inline mm/kasan/generic.c:181 [inline]
kasan_check_range+0xef/0x190 mm/kasan/generic.c:187
instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
atomic_inc include/linux/atomic/atomic-instrumented.h:435 [inline]
usb_anchor_suspend_wakeups drivers/usb/core/urb.c:927 [inline]
usb_anchor_suspend_wakeups+0x28/0x40 drivers/usb/core/urb.c:924
__usb_hcd_giveback_urb+0x217/0x5c0 drivers/usb/core/hcd.c:1637
usb_hcd_giveback_urb+0x389/0x430 drivers/usb/core/hcd.c:1733
dummy_timer+0x1415/0x35f0 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x19e/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x764/0xb10 kernel/time/timer.c:2022
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
__do_softirq+0x218/0x965 kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__orc_find+0xbf/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 75 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee 5c 89 4d 00 4d 39 ec 73 95 e8 42 8e 4d 00 49 8d 6f fc e8 39 8e
RSP: 0018:ffffc90015e17940 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8ee441c8 RCX: 0000000000000000
RDX: fffffffff2f8ea90 RSI: ffffffff81dd2c58 RDI: ffffffff81dd2d3f
RBP: ffffffff8ee441c8 R08: 0000000000000006 R09: ffffffff81dd2d3f
R10: ffffffff81dd2dc2 R11: 0000000000000000 R12: ffffffff81dd2d3f
R13: ffffffff81dd2c58 R14: dffffc0000000000 R15: ffffffff8ee441c8
orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
unwind_next_frame+0x329/0x2390 arch/x86/kernel/unwind_orc.c:494
arch_stack_walk+0xfa/0x170 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x96/0xd0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0xf0/0x480 mm/slub.c:3831
security_file_free+0xa8/0xd0 security/security.c:2628
file_free fs/file_table.c:77 [inline]
__fput+0x56d/0xa70 fs/file_table.c:397
__fput_sync+0x47/0x50 fs/file_table.c:465
__do_sys_close fs/open.c:1572 [inline]
__se_sys_close fs/open.c:1557 [inline]
__x64_sys_close+0x87/0xf0 fs/open.c:1557
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f51ebb1a37f
Code: af 6a 0d 00 f7 d8 64 89 02 48 83 c8 ff 44 89 c7 48 89 04 24 e8 e1 fc f9 ff 48 8b 04 24 48 83 c4 28 c3 c3 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 7a 6a 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffd1461e7b8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 000055c2df2722a0 RCX: 00007f51ebb1a37f
RDX: 00007f51ebbed860 RSI: 000055c2df264930 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000010f R11: 0000000000000202 R12: 0000000000000000
R13: 00007ffd1461e818 R14: 00007ffd1461ec18 R15: 000055c2dd633ec8
Allocated by task 23251:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:599 [inline]
kzalloc include/linux/slab.h:720 [inline]
usbtmc_open+0xa6/0x9b0 drivers/usb/class/usbtmc.c:175
usb_open+0x20f/0x2e0 drivers/usb/core/file.c:47
chrdev_open+0x277/0x700 fs/char_dev.c:414
do_dentry_open+0x88b/0x1730 fs/open.c:929
do_open fs/namei.c:3640 [inline]
path_openat+0x19af/0x29c0 fs/namei.c:3797
do_filp_open+0x1de/0x430 fs/namei.c:3824
do_sys_openat2+0x176/0x1e0 fs/open.c:1422
do_sys_open fs/open.c:1437 [inline]
__do_sys_openat fs/open.c:1453 [inline]
__se_sys_openat fs/open.c:1448 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1448
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Freed by task 23251:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
__kmem_cache_free+0xb8/0x2f0 mm/slub.c:3822
usbtmc_release+0x285/0x390 drivers/usb/class/usbtmc.c:261
__fput+0x3f7/0xa70 fs/file_table.c:384
task_work_run+0x14d/0x240 kernel/task_work.c:180
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
exit_to_user_mode_prepare+0x215/0x240 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372
put_css_set_locked kernel/cgroup/cgroup.c:957 [inline]
put_css_set_locked+0xadb/0x10c0 kernel/cgroup/cgroup.c:923
cgroup_migrate_finish+0x18a/0x650 kernel/cgroup/cgroup.c:2660
cgroup_attach_task+0x5bb/0x8c0 kernel/cgroup/cgroup.c:2859
cgroup_attach_task_all+0xe0/0x140 kernel/cgroup/cgroup-v1.c:70
kvm_vm_worker_thread+0x300/0x6a0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:6232
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Second to last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
kvfree_call_rcu+0x70/0xbe0 kernel/rcu/tree.c:3372
neigh_destroy+0x435/0x670 net/core/neighbour.c:910
neigh_release include/net/neighbour.h:445 [inline]
neigh_cleanup_and_release+0x1fe/0x280 net/core/neighbour.c:103
neigh_del net/core/neighbour.c:225 [inline]
neigh_remove_one+0x3ac/0x4c0 net/core/neighbour.c:246
neigh_forced_gc net/core/neighbour.c:276 [inline]
neigh_alloc net/core/neighbour.c:476 [inline]
___neigh_create+0x16b8/0x2a50 net/core/neighbour.c:640
ip6_finish_output2+0x10b8/0x1700 net/ipv6/ip6_output.c:126
__ip6_finish_output net/ipv6/ip6_output.c:196 [inline]
ip6_finish_output+0x485/0x1250 net/ipv6/ip6_output.c:207
NF_HOOK_COND include/linux/netfilter.h:293 [inline]
ip6_output+0x1e2/0x530 net/ipv6/ip6_output.c:228
dst_output include/net/dst.h:458 [inline]
NF_HOOK.constprop.0+0xff/0x570 include/linux/netfilter.h:304
mld_sendpack+0x713/0xd60 net/ipv6/mcast.c:1818
mld_send_cr net/ipv6/mcast.c:2119 [inline]
mld_ifc_work+0x756/0xcd0 net/ipv6/mcast.c:2651
process_one_work+0x884/0x15c0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
The buggy address belongs to the object at ffff88801eb27000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 272 bytes inside of
freed 1024-byte region [ffff88801eb27000, ffff88801eb27400)
The buggy address belongs to the physical page:
page:ffffea00007ac800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1eb20
head:ffffea00007ac800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888012c41dc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080100010 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 5088, tgid 5088 (syz-executor.2), ts 218822919890, free_ts 218765993194
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8c7/0x1580 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
__kmem_cache_alloc_node+0x131/0x340 mm/slub.c:3517
__do_kmalloc_node mm/slab_common.c:1025 [inline]
__kmalloc_node+0x52/0x110 mm/slab_common.c:1033
kmalloc_node include/linux/slab.h:619 [inline]
kzalloc_node include/linux/slab.h:731 [inline]
qdisc_alloc+0xb3/0xa90 net/sched/sch_generic.c:938
qdisc_create_dflt+0x73/0x3e0 net/sched/sch_generic.c:996
attach_one_default_qdisc net/sched/sch_generic.c:1159 [inline]
netdev_for_each_tx_queue include/linux/netdevice.h:2508 [inline]
attach_default_qdiscs net/sched/sch_generic.c:1177 [inline]
dev_activate+0x66c/0x1310 net/sched/sch_generic.c:1236
__dev_open+0x383/0x4d0 net/core/dev.c:1484
__dev_change_flags+0x56a/0x730 net/core/dev.c:8626
dev_change_flags+0x9a/0x170 net/core/dev.c:8698
do_setlink+0x1a2a/0x3fa0 net/core/rtnetlink.c:2880
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1136 [inline]
free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405
__unfreeze_partials+0x21d/0x240 mm/slub.c:2655
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523
__alloc_skb+0x287/0x330 net/core/skbuff.c:640
alloc_skb include/linux/skbuff.h:1286 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1214 [inline]
netlink_sendmsg+0x9c6/0xe40 net/netlink/af_netlink.c:1885
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
__sys_sendto+0x255/0x340 net/socket.c:2194
__do_sys_sendto net/socket.c:2206 [inline]
__se_sys_sendto net/socket.c:2202 [inline]
__x64_sys_sendto+0xe0/0x1b0 net/socket.c:2202
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff88801eb27000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801eb27080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88801eb27100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801eb27180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801eb27200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 4c 89 fa mov %r15,%rdx
3: 48 c1 ea 03 shr $0x3,%rdx
7: 42 0f b6 0c 32 movzbl (%rdx,%r14,1),%ecx
c: 4c 89 fa mov %r15,%rdx
f: 83 e2 07 and $0x7,%edx
12: 83 c2 03 add $0x3,%edx
15: 38 ca cmp %cl,%dl
17: 7c 04 jl 0x1d
19: 84 c9 test %cl,%cl
1b: 75 6f jne 0x8c
1d: 49 63 17 movslq (%r15),%rdx
20: 4c 89 e7 mov %r12,%rdi
23: 4d 8d 2c 17 lea (%r15,%rdx,1),%r13
27: 4c 89 ee mov %r13,%rsi
* 2a: e8 5c 89 4d 00 call 0x4d898b <-- trapping instruction
2f: 4d 39 ec cmp %r13,%r12
32: 73 95 jae 0xffffffc9
34: e8 42 8e 4d 00 call 0x4d8e7b
39: 49 8d 6f fc lea -0x4(%r15),%rbp
3d: e8 .byte 0xe8
3e: 39 .byte 0x39
3f: 8e .byte 0x8e