usbtmc 6-1:16.0: usbtmc_read_bulk_cb - nonzero read bulk status received: -71
usbtmc 6-1:16.0: usbtmc_read_bulk_cb - nonzero read bulk status received: -71
usbtmc 6-1:16.0: usbtmc_read_bulk_cb - nonzero read bulk status received: -71
==================================================================
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 ffff88803d9e8110 by task kworker/1:0/32376
CPU: 1 PID: 32376 Comm: kworker/1:0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Workqueue: usb_hub_wq hub_event
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:console_flush_all+0x9e0/0xfb0 kernel/printk/printk.c:2972
Code: b6 5e 23 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 84 a6 1c 00 48 85 db 0f 85 97 03 00 00 e8 e6 aa 1c 00 fb 48 8b 44 24 08 <48> 8b 14 24 0f b6 00 83 e2 07 38 d0 7f 08 84 c0 0f 85 08 05 00 00
RSP: 0018:ffffc9001906f598 EFLAGS: 00000283
RAX: fffff5200320dede RBX: 0000000000000000 RCX: ffffc900144a5000
RDX: 0000000000040000 RSI: ffffffff816b1b4a RDI: 0000000000000007
RBP: dffffc0000000000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 205d363733323354 R12: ffffffff8d6dbd60
R13: 0000000000000000 R14: ffffffff8d6dbdb8 R15: 0000000000000001
console_unlock+0x10c/0x260 kernel/printk/printk.c:3035
vprintk_emit+0x17f/0x5f0 kernel/printk/printk.c:2307
dev_vprintk_emit drivers/base/core.c:4849 [inline]
dev_printk_emit+0xfb/0x140 drivers/base/core.c:4860
__dev_printk+0xf5/0x270 drivers/base/core.c:4872
_dev_info+0xe5/0x120 drivers/base/core.c:4918
usb_disconnect+0xec/0x890 drivers/usb/core/hub.c:2234
hub_port_connect drivers/usb/core/hub.c:5280 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x1db7/0x4e00 drivers/usb/core/hub.c:5822
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
Allocated by task 22604:
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:3639 [inline]
path_openat+0x19af/0x29c0 fs/namei.c:3796
do_filp_open+0x1de/0x430 fs/namei.c:3823
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 22604:
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:179
get_signal+0x106f/0x2790 kernel/signal.c:2668
arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
exit_to_user_mode_prepare+0x11f/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
The buggy address belongs to the object at ffff88803d9e8000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 272 bytes inside of
freed 1024-byte region [ffff88803d9e8000, ffff88803d9e8400)
The buggy address belongs to the physical page:
page:ffffea0000f67a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3d9e8
head:ffffea0000f67a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888012c41dc0 ffffea0000f3b800 dead000000000003
raw: 0000000000000000 0000000000100010 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 0x1f2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_MEMALLOC|__GFP_HARDWALL), pid 8034, tgid 8034 (kworker/u4:2), ts 739446005582, free_ts 0
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:2298
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:1022 [inline]
__kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1043
kmalloc_reserve+0xef/0x260 net/core/skbuff.c:581
__alloc_skb+0x12b/0x330 net/core/skbuff.c:650
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:714
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3245 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3255 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x14f0 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8c0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x884/0x15c0 kernel/workqueue.c:2630
page_owner free stack trace missing
Memory state around the buggy address:
ffff88803d9e8000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803d9e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88803d9e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803d9e8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803d9e8200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: b6 5e mov $0x5e,%dh
2: 23 00 and (%rax),%eax
4: 9c pushf
5: 5b pop %rbx
6: 81 e3 00 02 00 00 and $0x200,%ebx
c: 31 ff xor %edi,%edi
e: 48 89 de mov %rbx,%rsi
11: e8 84 a6 1c 00 call 0x1ca69a
16: 48 85 db test %rbx,%rbx
19: 0f 85 97 03 00 00 jne 0x3b6
1f: e8 e6 aa 1c 00 call 0x1cab0a
24: fb sti
25: 48 8b 44 24 08 mov 0x8(%rsp),%rax
* 2a: 48 8b 14 24 mov (%rsp),%rdx <-- trapping instruction
2e: 0f b6 00 movzbl (%rax),%eax
31: 83 e2 07 and $0x7,%edx
34: 38 d0 cmp %dl,%al
36: 7f 08 jg 0x40
38: 84 c0 test %al,%al
3a: 0f 85 08 05 00 00 jne 0x548