================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3fa6/0x4c50 kernel/locking/lockdep.c:4225 Read of size 8 at addr ffff88801d628940 by task udevd/28918 CPU: 3 PID: 28918 Comm: udevd Not tainted 5.7.0-rc7-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 __lock_acquire+0x3fa6/0x4c50 kernel/locking/lockdep.c:4225 lock_acquire+0x1f2/0x8f0 kernel/locking/lockdep.c:4934 __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+0x207/0x3d0 drivers/usb/core/hcd.c:1648 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1713 __skb_queue_head_init include/linux/skbuff.h:1880 [inline] skbpoolfree drivers/block/aoe/aoedev.c:435 [inline] freedev drivers/block/aoe/aoedev.c:290 [inline] dummy_timer+0x1243/0x2fe1 drivers/block/aoe/aoedev.c:366 call_timer_fn+0x1ac/0x780 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+0x623/0x1600 kernel/time/timer.c:1787 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x192/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x19e/0x600 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:759 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x8c/0xe0 kernel/locking/spinlock.c:191 Code: 48 c7 c0 60 c0 94 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 37 48 83 3d ab 21 c3 01 00 74 22 48 89 df 57 9d <0f> 1f 44 00 00 bf 01 00 00 00 e8 35 6c 7d f9 65 8b 05 f6 7f 30 78 RSP: 0018:ffffc90005db7758 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff132980c RBX: 0000000000000282 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: 0000000000000282 RBP: ffffffff8c8ee560 R08: ffff88801147dc40 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88801eb2bf80 R14: dffffc0000000000 R15: 1ffff92000bb6ef2 debug_object_activate+0x24a/0x480 lib/debugobjects.c:670 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] __call_rcu kernel/rcu/tree.c:2657 [inline] call_rcu+0x2c/0x7e0 kernel/rcu/tree.c:2744 dentry_free+0xc3/0x160 fs/dcache.c:350 __dentry_kill+0x442/0x5d0 fs/dcache.c:593 dentry_kill fs/dcache.c:698 [inline] dput+0x61f/0xdf0 fs/dcache.c:859 handle_mounts fs/namei.c:1375 [inline] step_into+0xe32/0x1c80 fs/namei.c:1676 walk_component+0x171/0x6a0 fs/namei.c:1852 lookup_last fs/namei.c:2295 [inline] path_lookupat.isra.0+0x180/0x530 fs/namei.c:2319 filename_lookup+0x1a3/0x3e0 fs/namei.c:2352 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x119/0x1e0 fs/stat.c:197 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x96/0x120 fs/stat.c:364 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x7fad4de22d05 Code: f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 90 90 83 ff 01 48 89 f0 77 18 48 89 c7 48 89 d6 b8 06 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 17 f3 c3 90 48 8b 05 01 51 2b 00 64 c7 00 16 RSP: 002b:00007ffd31c34128 EFLAGS: 00000246 ORIG_RAX: 0000000000000006 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fad4de22d05 RDX: 00007ffd31c34140 RSI: 00007ffd31c34140 RDI: 00007ffd31c341d0 RBP: 000000000041ea4e R08: 000000000041ea4e R09: 00007fad4de795d0 R10: 75642f6d726f6674 R11: 0000000000000246 R12: 0000000001f0f5b0 R13: 0000000001f0f6a0 R14: 0000000000000000 R15: 00007ffd31c35710 Allocated by task 8588: 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 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:1104 usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:374 really_probe+0x281/0x6d0 drivers/base/dd.c:520 driver_probe_device+0x104/0x210 drivers/base/dd.c:697 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:804 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x360 drivers/base/dd.c:870 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x132d/0x1c10 drivers/base/core.c:2557 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:520 driver_probe_device+0x104/0x210 drivers/base/dd.c:697 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:804 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x360 drivers/base/dd.c:870 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x132d/0x1c10 drivers/base/core.c:2557 usb_new_device.cold+0x701/0xfcf 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/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Freed by task 8514: 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+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 usblp_disconnect.cold+0x24/0x29 drivers/usb/class/usblp.c:1380 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+0x2dc/0x4a0 drivers/base/bus.c:533 device_del+0x481/0xd30 drivers/base/core.c:2734 usb_disable_device+0x211/0x690 drivers/usb/core/message.c:1245 usb_disconnect+0x284/0x8d0 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+0x17ca/0x38f0 drivers/usb/core/hub.c:5576 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff88801d628800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 320 bytes inside of 1024-byte region [ffff88801d628800, ffff88801d628c00) The buggy address belongs to the page: page:ffffea0000758a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0000750848 ffffea000081d208 ffff88802c800c40 raw: 0000000000000000 ffff88801d628000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801d628800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d628880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88801d628900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d628980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d628a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================