usblp0: nonzero read bulk status received: -71 ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x25c/0x290 kernel/locking/spinlock_debug.c:112 Read of size 4 at addr ffff8881aaaf0224 by task systemd-udevd/151 CPU: 1 PID: 151 Comm: systemd-udevd Not tainted 5.7.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xef/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x415 mm/kasan/report.c:382 __kasan_report.cold+0x37/0x7d mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 __read_once_size include/linux/compiler.h:199 [inline] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x25c/0x290 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 usblp_bulk_read+0x1e9/0x270 drivers/usb/class/usblp.c:309 __usb_hcd_giveback_urb+0x29a/0x550 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716 dummy_timer+0x125e/0x32b4 drivers/usb/gadget/udc/dummy_hcd.c:1967 call_timer_fn+0x1ac/0x700 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers kernel/time/timer.c:1774 [inline] __run_timers kernel/time/timer.c:1741 [inline] run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1787 __do_softirq+0x21e/0x9aa kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x141/0x540 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x1a/0x60 kernel/kcov.c:197 Code: c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 04 25 40 0f 02 00 65 8b 15 e8 cf c1 7e f7 c2 00 01 1f 00 48 8b 34 24 <74> 0f 80 e6 01 74 35 8b 90 2c 13 00 00 85 d2 74 2b 8b 90 08 13 00 RSP: 0018:ffff8881cfa37b18 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff8881d0a63180 RBX: dffffc0000000000 RCX: ffffffff8140a6a1 RDX: 0000000080000001 RSI: ffffffff814a6409 RDI: ffff8881cfa37be8 RBP: ffff8881cfa37be8 R08: ffff8881d0a63180 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed1039f46f7f R13: 0000000000000000 R14: ffff8881cfa37be8 R15: ffffc900008dc040 ___bpf_prog_run+0x39/0x6a60 kernel/bpf/core.c:1391 __bpf_prog_run32+0x8f/0xd0 kernel/bpf/core.c:1681 bpf_dispatcher_nop_func include/linux/bpf.h:545 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:599 [inline] seccomp_run_filters kernel/seccomp.c:272 [inline] __seccomp_filter+0x156/0x1300 kernel/seccomp.c:817 __secure_computing+0xac/0x280 kernel/seccomp.c:950 syscall_trace_enter+0x2a3/0xcd0 arch/x86/entry/common.c:119 do_syscall_64+0x462/0x5a0 arch/x86/entry/common.c:291 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x7f904a09eaa7 Code: 73 01 c3 48 8b 0d f1 f3 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 33 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c1 f3 2a 00 f7 d8 64 89 01 48 RSP: 002b:00007fffc1931c78 EFLAGS: 00000206 ORIG_RAX: 0000000000000033 RAX: ffffffffffffffda RBX: 000055bcdb2a2230 RCX: 00007f904a09eaa7 RDX: 00007fffc1931c8c RSI: 00007fffc1931c90 RDI: 000000000000000e RBP: 000055bcdb29fcd0 R08: 000055bcdb29f0e0 R09: 0000000000000210 R10: 000055bcdb2b0300 R11: 0000000000000206 R12: 000055bcdb29f010 R13: 000055bcdb29f010 R14: 000055bcdb29f010 R15: 000055bcdb29f028 Allocated by task 12: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] usblp_probe+0xed/0x1210 drivers/usb/class/usblp.c:1105 usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374 really_probe+0x290/0xac0 drivers/base/dd.c:520 driver_probe_device+0x223/0x350 drivers/base/dd.c:697 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:804 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x390 drivers/base/dd.c:870 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1367/0x1c40 drivers/base/core.c:2538 usb_set_configuration+0xed4/0x1850 drivers/usb/core/message.c:2032 usb_generic_driver_probe+0x9d/0xe0 drivers/usb/core/generic.c:241 usb_probe_device+0xd9/0x230 drivers/usb/core/driver.c:272 really_probe+0x290/0xac0 drivers/base/dd.c:520 driver_probe_device+0x223/0x350 drivers/base/dd.c:697 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:804 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x390 drivers/base/dd.c:870 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1367/0x1c40 drivers/base/core.c:2538 usb_new_device.cold+0x552/0xf6e drivers/usb/core/hub.c:2554 hub_port_connect drivers/usb/core/hub.c:5208 [inline] hub_port_connect_change drivers/usb/core/hub.c:5348 [inline] port_event drivers/usb/core/hub.c:5494 [inline] hub_event+0x226d/0x43c0 drivers/usb/core/hub.c:5576 process_one_work+0x965/0x1630 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x326/0x430 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Freed by task 94: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x117/0x160 mm/kasan/common.c:456 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook mm/slub.c:1488 [inline] slab_free mm/slub.c:3045 [inline] kfree+0xd5/0x300 mm/slub.c:4026 usblp_disconnect.cold+0x24/0x29 drivers/usb/class/usblp.c:1382 usb_unbind_interface+0x1bd/0x8a0 drivers/usb/core/driver.c:436 __device_release_driver drivers/base/dd.c:1110 [inline] device_release_driver_internal+0x432/0x500 drivers/base/dd.c:1141 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x481/0xd30 drivers/base/core.c:2715 usb_disable_device+0x23d/0x790 drivers/usb/core/message.c:1245 usb_disconnect+0x293/0x900 drivers/usb/core/hub.c:2217 hub_port_connect drivers/usb/core/hub.c:5059 [inline] hub_port_connect_change drivers/usb/core/hub.c:5348 [inline] port_event drivers/usb/core/hub.c:5494 [inline] hub_event+0x1abf/0x43c0 drivers/usb/core/hub.c:5576 process_one_work+0x965/0x1630 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x326/0x430 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff8881aaaf0000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 548 bytes inside of 1024-byte region [ffff8881aaaf0000, ffff8881aaaf0400) The buggy address belongs to the page: page:ffffea0006aabc00 refcount:1 mapcount:0 mapping:00000000fd445188 index:0x0 head:ffffea0006aabc00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 dead000000000100 dead000000000122 ffff8881da002280 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881aaaf0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881aaaf0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881aaaf0200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881aaaf0280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881aaaf0300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================