================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3b20/0x48b0 kernel/locking/lockdep.c:4250 Read of size 8 at addr ffff8880192c2140 by task mcstransd/10092 CPU: 1 PID: 10092 Comm: mcstransd Not tainted 5.8.0-rc2-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 __lock_acquire+0x3b20/0x48b0 kernel/locking/lockdep.c:4250 lock_acquire+0x1f2/0x8f0 kernel/locking/lockdep.c:4959 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xbf kernel/locking/spinlock.c:159 usblp_bulk_read+0x211/0x270 drivers/usb/class/usblp.c:303 __usb_hcd_giveback_urb+0x2af/0x4b0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1716 __skb_queue_head_init include/linux/skbuff.h:1854 [inline] skbpoolfree drivers/block/aoe/aoedev.c:435 [inline] freedev drivers/block/aoe/aoedev.c:290 [inline] dummy_timer+0x1246/0x2fe4 drivers/block/aoe/aoedev.c:366 call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x60f/0x15d0 kernel/time/timer.c:1786 __do_softirq+0x268/0x9ee kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x131/0x170 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu kernel/softirq.c:417 [inline] irq_exit_rcu+0x18d/0x1d0 kernel/softirq.c:429 sysvec_apic_timer_interrupt+0xeb/0x210 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:596 RIP: 0033:0x56395e8b6580 Code: Bad RIP value. RSP: 002b:00007ffef2ae8e98 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00007fce5726d2b0 RDX: 00005639607d1000 RSI: 00007ffef2ae8ee0 RDI: 00005639607c5eb0 RBP: 00005639607b22e8 R08: 0030733a745f6c65 R09: 0000000000400000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00005639607c5eb0 R14: 0000000000000008 R15: 0000000000000005 Allocated by task 10379: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:467 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] usblp_probe+0xed/0x1120 drivers/usb/class/usblp.c:1105 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:374 really_probe+0x281/0x6d0 drivers/base/dd.c:525 driver_probe_device+0xfe/0x1d0 drivers/base/dd.c:701 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:807 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x360 drivers/base/dd.c:873 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xaf1/0x1900 drivers/base/core.c:2680 usb_set_configuration+0xec5/0x1740 drivers/usb/core/message.c:2032 usb_generic_driver_probe+0x9d/0xe0 drivers/usb/core/generic.c:241 usb_probe_device+0xc6/0x1f0 drivers/usb/core/driver.c:272 really_probe+0x281/0x6d0 drivers/base/dd.c:525 driver_probe_device+0xfe/0x1d0 drivers/base/dd.c:701 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:807 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x360 drivers/base/dd.c:873 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xaf1/0x1900 drivers/base/core.c:2680 usb_new_device.cold+0x753/0x103d 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+0x1eca/0x38f0 drivers/usb/core/hub.c:5576 process_one_work+0x965/0x1690 kernel/workqueue.c:2269 process_scheduled_works kernel/workqueue.c:2331 [inline] worker_thread+0x7ab/0xe10 kernel/workqueue.c:2417 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 Freed by task 20965: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 usblp_release.cold+0xd/0x12 drivers/usb/class/usblp.c:471 __fput+0x33e/0x880 fs/file_table.c:281 task_work_run+0xe0/0x1a0 kernel/task_work.c:123 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:216 [inline] __prepare_exit_to_usermode+0x20d/0x220 arch/x86/entry/common.c:246 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:368 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880192c2000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 320 bytes inside of 1024-byte region [ffff8880192c2000, ffff8880192c2400) The buggy address belongs to the page: page:ffffea000064b080 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00009f7008 ffffea00009ca148 ffff88802c800c40 raw: 0000000000000000 ffff8880192c2000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880192c2000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880192c2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880192c2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880192c2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880192c2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================