usbtmc 8-1:16.0: usbtmc_read_bulk_cb - nonzero read bulk status received: -71
usbtmc 8-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 ffff88804e677910 by task syz.3.872/9110
CPU: 0 UID: 0 PID: 9110 Comm: syz.3.872 Not tainted 6.11.0-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189
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+0x223/0x6e0 drivers/usb/core/hcd.c:1636
usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734
dummy_timer+0x17c3/0x38d0 drivers/usb/gadget/udc/dummy_hcd.c:1987
__run_hrtimer kernel/time/hrtimer.c:1689 [inline]
__hrtimer_run_queues+0x20c/0xcc0 kernel/time/hrtimer.c:1753
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1815
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x450 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:preempt_schedule_irq+0x4c/0x90 kernel/sched/core.c:6851
Code: df 55 65 48 8b 2d c4 76 eb 74 53 48 89 eb 48 c1 eb 03 48 01 c3 bf 01 00 00 00 e8 af 9b 43 f6 e8 ea b7 7a f6 fb bf 01 00 00 00 4f a3 ff ff 9c 58 fa f6 c4 02 75 1e bf 01 00 00 00 e8 fd 4b 43
RSP: 0000:ffffc9002b6efbf8 EFLAGS: 00000202
RAX: 0000000000000cbf RBX: ffffed100520a488 RCX: 1ffffffff2028129
RDX: 0000000000000000 RSI: ffffffff8b4cd720 RDI: 0000000000000001
RBP: ffff888029052440 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90144d9f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:obj_cgroup_put include/linux/memcontrol.h:802 [inline]
RIP: 0010:refill_obj_stock+0x27e/0x610 mm/memcontrol.c:2908
Code: 06 03 00 00 4a 03 1c e5 80 ab 7c 8d 48 89 df e8 68 47 ff ff 48 83 3c 24 00 0f 85 d0 00 00 00 9c 58 f6 c4 02 0f 85 f2 01 00 00 <4d> 85 f6 74 65 e8 28 aa 7f ff 31 d2 45 31 c9 45 31 c0 48 8d 05 00
RSP: 0000:ffffc9002b6efcc0 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff88806a6397e0 RCX: 1ffffffff2028129
RDX: 0000000000000000 RSI: ffffffff8b4cd720 RDI: ffffffff8bb0fbc0
RBP: ffff88804b558e00 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90144d9f R11: 0000000000000000 R12: 0000000000000000
R13: ffff88806a6397e0 R14: ffff88804b552d00 R15: 0000000000000000
obj_cgroup_uncharge mm/memcontrol.c:2960 [inline]
__memcg_slab_free_hook+0x229/0x5a0 mm/memcontrol.c:3047
memcg_slab_free_hook mm/slub.c:2190 [inline]
slab_free mm/slub.c:4474 [inline]
kmem_cache_free+0x357/0x3a0 mm/slub.c:4552
file_free fs/file_table.c:73 [inline]
__fput+0x6c5/0xbb0 fs/file_table.c:435
task_work_run+0x14e/0x250 kernel/task_work.c:228
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7efd8497def9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007efd843ff038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffea RBX: 00007efd84b35f80 RCX: 00007efd8497def9
RDX: 0000000020000040 RSI: 00000000c0145b0e RDI: 000000000000000b
RBP: 00007efd849f0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007efd84b35f80 R15: 00007ffe16b88e98
Allocated by task 9110:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387
kmalloc_noprof include/linux/slab.h:681 [inline]
kzalloc_noprof include/linux/slab.h:807 [inline]
usbtmc_open+0xa6/0x9b0 drivers/usb/class/usbtmc.c:175
usb_open+0x213/0x2f0 drivers/usb/core/file.c:47
chrdev_open+0x26d/0x6f0 fs/char_dev.c:414
do_dentry_open+0x91f/0x15f0 fs/open.c:959
vfs_open+0x82/0x3f0 fs/open.c:1089
do_open fs/namei.c:3727 [inline]
path_openat+0x2141/0x2d20 fs/namei.c:3886
do_filp_open+0x1dc/0x430 fs/namei.c:3913
do_sys_openat2+0x17a/0x1e0 fs/open.c:1416
do_sys_open fs/open.c:1431 [inline]
__do_sys_openat fs/open.c:1447 [inline]
__se_sys_openat fs/open.c:1442 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1442
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 9110:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2256 [inline]
slab_free mm/slub.c:4477 [inline]
kfree+0x12a/0x3b0 mm/slub.c:4598
usbtmc_release+0x277/0x390 drivers/usb/class/usbtmc.c:261
__fput+0x408/0xbb0 fs/file_table.c:422
task_work_run+0x14e/0x250 kernel/task_work.c:228
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218
do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88804e677800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 272 bytes inside of
freed 1024-byte region [ffff88804e677800, ffff88804e677c00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4e670
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000040 ffff88801ac42dc0 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 00fff00000000040 ffff88801ac42dc0 0000000000000000 dead000000000001
head: 0000000000000000 0000000080100010 00000001fdffffff 0000000000000000
head: 00fff00000000003 ffffea0001399c01 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 13, tgid 13 (kworker/u32:1), ts 62687694259, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500
prep_new_page mm/page_alloc.c:1508 [inline]
get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x4e/0xf0 mm/slub.c:2325
allocate_slab mm/slub.c:2488 [inline]
new_slab+0x84/0x260 mm/slub.c:2541
___slab_alloc+0xdac/0x1870 mm/slub.c:3727
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3817
__slab_alloc_node mm/slub.c:3870 [inline]
slab_alloc_node mm/slub.c:4029 [inline]
__do_kmalloc_node mm/slub.c:4161 [inline]
__kmalloc_noprof+0x367/0x400 mm/slub.c:4174
kmalloc_noprof include/linux/slab.h:685 [inline]
kzalloc_noprof include/linux/slab.h:807 [inline]
ieee802_11_parse_elems_full+0xea/0x1680 net/mac80211/parse.c:958
ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2361 [inline]
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2368 [inline]
ieee80211_inform_bss+0xfd/0x1100 net/mac80211/scan.c:79
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x8e2/0x1dc0 net/wireless/scan.c:2335
cfg80211_inform_bss_data+0x205/0x39c0 net/wireless/scan.c:3159
cfg80211_inform_bss_frame_data+0x271/0x7a0 net/wireless/scan.c:3254
ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226
ieee80211_rx_bss_info net/mac80211/ibss.c:1100 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1579 [inline]
ieee80211_ibss_rx_queued_mgmt+0x1898/0x2f40 net/mac80211/ibss.c:1606
ieee80211_iface_process_skb net/mac80211/iface.c:1588 [inline]
ieee80211_iface_work+0xc0b/0xf00 net/mac80211/iface.c:1642
page_owner free stack trace missing
Memory state around the buggy address:
ffff88804e677800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88804e677880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88804e677900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88804e677980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88804e677a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: df 55 65 fists 0x65(%rbp)
3: 48 8b 2d c4 76 eb 74 mov 0x74eb76c4(%rip),%rbp # 0x74eb76ce
a: 53 push %rbx
b: 48 89 eb mov %rbp,%rbx
e: 48 c1 eb 03 shr $0x3,%rbx
12: 48 01 c3 add %rax,%rbx
15: bf 01 00 00 00 mov $0x1,%edi
1a: e8 af 9b 43 f6 call 0xf6439bce
1f: e8 ea b7 7a f6 call 0xf67ab80e
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 4f a3 ff ff call 0xffffa37e <-- trapping instruction
2f: 9c pushf
30: 58 pop %rax
31: fa cli
32: f6 c4 02 test $0x2,%ah
35: 75 1e jne 0x55
37: bf 01 00 00 00 mov $0x1,%edi
3c: e8 .byte 0xe8
3d: fd std
3e: 4b rex.WXB
3f: 43 rex.XB