ci starts bisection 2023-05-30 00:00:32.498728277 +0000 UTC m=+289533.279896944
bisecting fixing commit since 89d77f71f493a3663b10fa812d17f472935d24be
building syzkaller on 62df2017e3b1edd786a4c737bd4ccba2b4581d88
ensuring issue is reproducible on original commit 89d77f71f493a3663b10fa812d17f472935d24be
testing commit 89d77f71f493a3663b10fa812d17f472935d24be gcc
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: 202597c12c171a6872525e914ba8d0b74cd2240c67719ceac17782d4b609e10e
all runs: crashed: KASAN: slab-use-after-free Write in usb_anchor_suspend_wakeups
testing current HEAD 8b817fded42d8fe3a0eb47b1149d907851a3c942
testing commit 8b817fded42d8fe3a0eb47b1149d907851a3c942 gcc
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
kernel signature: ff96ce8f3095d3a9aeafc1ed66a15121d7afe415687da3136681c8daf4162740
all runs: crashed: KASAN: slab-use-after-free Write in usb_anchor_suspend_wakeups
crash still not fixed/happens on the oldest tested release
revisions tested: 2, total time: 37m22.066083765s (build: 21m55.968974461s, test: 14m28.845852532s)
crash still not fixed on HEAD or HEAD had kernel test errors
commit msg: Merge tag 'trace-v6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
crash: KASAN: slab-use-after-free Write in usb_anchor_suspend_wakeups
==================================================================
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:190 [inline]
BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups drivers/usb/core/urb.c:942 [inline]
BUG: KASAN: slab-use-after-free in usb_anchor_suspend_wakeups+0x1e/0x30 drivers/usb/core/urb.c:939
Write of size 4 at addr ffff88807b6e1110 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x64/0xb0 lib/dump_stack.c:106
print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351
print_report mm/kasan/report.c:462 [inline]
kasan_report+0x11c/0x130 mm/kasan/report.c:572
check_region_inline mm/kasan/generic.c:181 [inline]
kasan_check_range+0x141/0x190 mm/kasan/generic.c:187
instrument_atomic_read_write include/linux/instrumented.h:96 [inline]
atomic_inc include/linux/atomic/atomic-instrumented.h:190 [inline]
usb_anchor_suspend_wakeups drivers/usb/core/urb.c:942 [inline]
usb_anchor_suspend_wakeups+0x1e/0x30 drivers/usb/core/urb.c:939
__usb_hcd_giveback_urb+0x1d8/0x3f0 drivers/usb/core/hcd.c:1658
dummy_timer+0xffe/0x2c30 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x163/0x400 kernel/time/timer.c:1700
expire_timers+0x224/0x400 kernel/time/timer.c:1751
__run_timers kernel/time/timer.c:2022 [inline]
__run_timers kernel/time/timer.c:1995 [inline]
run_timer_softirq+0x296/0x790 kernel/time/timer.c:2035
__do_softirq+0x1d4/0x905 kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x114/0x190 kernel/softirq.c:650
irq_exit_rcu+0x9/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:37 [inline]
RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:72 [inline]
RIP: 0010:acpi_safe_halt+0x1b/0x20 drivers/acpi/processor_idle.c:113
Code: ed c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 65 48 8b 04 25 40 bb 03 00 48 8b 00 a8 08 75 0c 66 90 0f 00 2d d7 c6 94 00 fb f4 c3 0f 1f 00 0f b6 47 08 3c 01 74 0b 3c 02 74 05 8b 7f 04 eb 9f
RSP: 0018:ffffffff8b407d68 EFLAGS: 00000246
RAX: 0000000000004000 RBX: 0000000000038f48 RCX: ffffffff89380e9e
RDX: 0000000000000001 RSI: ffff888141a65800 RDI: ffff888141a65864
RBP: ffff888018efb000 R08: 0000000000000001 R09: ffff8880b9a36c6b
R10: ffffed1017346d8d R11: ffffffff8c1a4ae0 R12: 0000000000000001
R13: ffff888141a65864 R14: ffffffff8c1a4ae0 R15: 0000000000000000
acpi_idle_enter+0xc7/0x150 drivers/acpi/processor_idle.c:711
cpuidle_enter_state+0x82/0x520 drivers/cpuidle/cpuidle.c:267
cpuidle_enter+0x49/0xa0 drivers/cpuidle/cpuidle.c:388
cpuidle_idle_call kernel/sched/idle.c:215 [inline]
do_idle+0x2fe/0x3c0 kernel/sched/idle.c:282
cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:379
rest_init+0x14a/0x220 init/main.c:735
arch_call_rest_init+0xe/0x20 init/main.c:834
start_kernel+0x305/0x340 init/main.c:1088
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:556
x86_64_start_kernel+0xb3/0xc0 arch/x86/kernel/head64.c:537
secondary_startup_64_no_verify+0xf4/0xfb
Allocated by task 8098:
kasan_save_stack+0x22/0x40 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 mm/kasan/common.c:333 [inline]
__kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:559 [inline]
kzalloc include/linux/slab.h:680 [inline]
usbtmc_open+0x9c/0x980 drivers/usb/class/usbtmc.c:175
usb_open+0x1d9/0x2a0 drivers/usb/core/file.c:48
chrdev_open+0x213/0x650 fs/char_dev.c:414
do_dentry_open+0x452/0x1140 fs/open.c:920
do_open fs/namei.c:3636 [inline]
path_openat+0x12a5/0x2280 fs/namei.c:3791
do_filp_open+0x1a9/0x3e0 fs/namei.c:3818
do_sys_openat2+0x11e/0x3f0 fs/open.c:1356
do_sys_open fs/open.c:1372 [inline]
__do_sys_openat fs/open.c:1388 [inline]
__se_sys_openat fs/open.c:1383 [inline]
__x64_sys_openat+0x11f/0x1d0 fs/open.c:1383
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Freed by task 8098:
kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2e/0x40 mm/kasan/generic.c:521
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x160/0x1c0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:162 [inline]
slab_free_hook mm/slub.c:1781 [inline]
slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1807
slab_free mm/slub.c:3786 [inline]
__kmem_cache_free+0xaf/0x2d0 mm/slub.c:3799
usbtmc_release+0x23b/0x340 drivers/usb/class/usbtmc.c:261
__fput+0x1fa/0x9a0 fs/file_table.c:321
task_work_run+0x12f/0x220 kernel/task_work.c:179
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+0x210/0x240 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x1d/0x50 kernel/entry/common.c:297
do_syscall_64+0x46/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Last potentially related work creation:
kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:491
kvfree_call_rcu+0x70/0xad0 kernel/rcu/tree.c:3332
neigh_flush_dev+0x4e7/0x7f0 net/core/neighbour.c:421
__neigh_ifdown.isra.0+0x41/0x470 net/core/neighbour.c:438
neigh_ifdown+0xb/0x10 net/core/neighbour.c:456
rt6_disable_ip+0x122/0x7d0 net/ipv6/route.c:4893
addrconf_ifdown.isra.0+0xea/0x13f0 net/ipv6/addrconf.c:3755
addrconf_notify+0xc6/0x1330 net/ipv6/addrconf.c:3678
notifier_call_chain+0x94/0x2a0 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:1973 [inline]
call_netdevice_notifiers net/core/dev.c:1987 [inline]
dev_close_many+0x296/0x570 net/core/dev.c:1528
unregister_netdevice_many_notify+0x381/0x1620 net/core/dev.c:10855
ip6gre_exit_batch_net+0x328/0x480 net/ipv6/ip6_gre.c:1642
cleanup_net+0x427/0x990 net/core/net_namespace.c:614
process_one_work+0x86e/0x1410 kernel/workqueue.c:2405
worker_thread+0x5af/0xf00 kernel/workqueue.c:2552
kthread+0x2f0/0x3d0 kernel/kthread.c:379
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
The buggy address belongs to the object at ffff88807b6e1000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 272 bytes inside of
freed 1024-byte region [ffff88807b6e1000, ffff88807b6e1400)
The buggy address belongs to the physical page:
page:ffffea0001edb800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b6e0
head:ffffea0001edb800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000010200 ffff888011441dc0 ffffea0001e12200 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4745, tgid 4745 (S50sshd), ts 24192129758, free_ts 24152595849
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731
prep_new_page mm/page_alloc.c:1738 [inline]
get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502
__alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768
alloc_slab_page mm/slub.c:1851 [inline]
allocate_slab+0x25f/0x390 mm/slub.c:1998
new_slab mm/slub.c:2051 [inline]
___slab_alloc+0xa91/0x1400 mm/slub.c:3192
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3291
__slab_alloc_node mm/slub.c:3344 [inline]
slab_alloc_node mm/slub.c:3441 [inline]
__kmem_cache_alloc_node+0x136/0x320 mm/slub.c:3490
__do_kmalloc_node mm/slab_common.c:965 [inline]
__kmalloc+0x4e/0x190 mm/slab_common.c:979
kmalloc include/linux/slab.h:563 [inline]
load_elf_phdrs+0xd4/0x190 fs/binfmt_elf.c:486
load_elf_binary+0x11c6/0x43e0 fs/binfmt_elf.c:960
search_binary_handler fs/exec.c:1737 [inline]
exec_binprm fs/exec.c:1779 [inline]
bprm_execve fs/exec.c:1854 [inline]
bprm_execve+0x677/0x14f0 fs/exec.c:1810
do_execveat_common+0x602/0x800 fs/exec.c:1962
do_execve fs/exec.c:2036 [inline]
__do_sys_execve fs/exec.c:2112 [inline]
__se_sys_execve fs/exec.c:2107 [inline]
__x64_sys_execve+0x8e/0xc0 fs/exec.c:2107
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1302 [inline]
free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564
free_unref_page+0x33/0x370 mm/page_alloc.c:2659
__unfreeze_partials+0x17c/0x1a0 mm/slub.c:2636
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:186 [inline]
slab_post_alloc_hook mm/slab.h:711 [inline]
slab_alloc_node mm/slub.c:3451 [inline]
slab_alloc mm/slub.c:3459 [inline]
__kmem_cache_alloc_lru mm/slub.c:3466 [inline]
kmem_cache_alloc+0x17c/0x3b0 mm/slub.c:3475
vm_area_dup+0x1e/0x280 kernel/fork.c:504
__split_vma+0x155/0x710 mm/mmap.c:2248
mprotect_fixup+0x759/0x9e0 mm/mprotect.c:692
do_mprotect_pkey+0x645/0xa60 mm/mprotect.c:860
__do_sys_mprotect mm/mprotect.c:881 [inline]
__se_sys_mprotect mm/mprotect.c:878 [inline]
__x64_sys_mprotect+0x73/0xb0 mm/mprotect.c:878
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff88807b6e1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807b6e1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807b6e1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807b6e1180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807b6e1200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: ed in (%dx),%eax
1: c3 retq
2: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00 00
d: 66 90 xchg %ax,%ax
f: 65 48 8b 04 25 40 bb mov %gs:0x3bb40,%rax
16: 03 00
18: 48 8b 00 mov (%rax),%rax
1b: a8 08 test $0x8,%al
1d: 75 0c jne 0x2b
1f: 66 90 xchg %ax,%ax
21: 0f 00 2d d7 c6 94 00 verw 0x94c6d7(%rip) # 0x94c6ff
28: fb sti
29: f4 hlt
* 2a: fa cli <-- trapping instruction
2b: c3 retq
2c: 0f 1f 00 nopl (%rax)
2f: 0f b6 47 08 movzbl 0x8(%rdi),%eax
33: 3c 01 cmp $0x1,%al
35: 74 0b je 0x42
37: 3c 02 cmp $0x2,%al
39: 74 05 je 0x40
3b: 8b 7f 04 mov 0x4(%rdi),%edi
3e: eb 9f jmp 0xffffffdf