================================================================== BUG: KASAN: use-after-free in __wake_up_common+0x634/0x650 kernel/sched/wait.c:86 Read of size 8 at addr ffff8881cf140000 by task systemd-udevd/5207 CPU: 0 PID: 5207 Comm: systemd-udevd Not tainted 5.6.0-rc5-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/0x314 mm/kasan/report.c:374 __kasan_report.cold+0x37/0x77 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 __wake_up_common+0x634/0x650 kernel/sched/wait.c:86 complete+0x51/0x70 kernel/sched/completion.c:36 htc_process_conn_rsp drivers/net/wireless/ath/ath9k/htc_hst.c:138 [inline] ath9k_htc_rx_msg+0x7c2/0xaf0 drivers/net/wireless/ath/ath9k/htc_hst.c:443 ath9k_hif_usb_reg_in_cb+0x1ba/0x630 drivers/net/wireless/ath/ath9k/hif_usb.c:718 __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+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966 call_timer_fn+0x195/0x6f0 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+0x5f9/0x1500 kernel/time/timer.c:1786 __do_softirq+0x21e/0x950 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:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:lock_is_held_type+0x1ce/0x240 kernel/locking/lockdep.c:4526 Code: 89 f9 48 c1 e9 03 0f b6 0c 11 48 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 75 6e c7 83 4c 08 00 00 00 00 00 00 ff 74 24 08 9d <48> 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 31 c0 eb a8 48 83 c4 RSP: 0000:ffff8881c5dc7ab0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff8881cc6e8000 RCX: 0000000000000000 RDX: 0000000000000007 RSI: ffffffff87109060 RDI: ffff8881cc6e884c RBP: ffff8881cc6e8000 R08: ffff8881cc6e8000 R09: fffff94000d3d3e9 R10: fffff94000d3d3e8 R11: ffffea00069e9f47 R12: ffff8881cc6e8848 R13: ffffed10398dd109 R14: ffffffff87109060 R15: ffff8881cc6e8850 lock_is_held include/linux/lockdep.h:361 [inline] rcu_preempt_sleep_check include/linux/rcupdate.h:272 [inline] ___might_sleep+0x1c5/0x2b0 kernel/sched/core.c:6763 mmu_notifier_invalidate_range_start include/linux/mmu_notifier.h:441 [inline] wp_page_copy+0x474/0x1fd0 mm/memory.c:2543 do_wp_page+0x2cd/0x1af0 mm/memory.c:2831 handle_pte_fault mm/memory.c:4068 [inline] __handle_mm_fault+0x16e5/0x2da0 mm/memory.c:4182 handle_mm_fault+0x2ec/0x8d0 mm/memory.c:4219 do_user_addr_fault arch/x86/mm/fault.c:1442 [inline] do_page_fault+0x517/0x1180 arch/x86/mm/fault.c:1517 page_fault+0x34/0x40 arch/x86/entry/entry_64.S:1203 RIP: 0033:0x7fbaf2ae1bd5 Code: 85 f6 74 41 4d 85 c0 74 44 49 8b 00 0f b6 56 04 48 03 46 08 83 e2 0f 80 fa 0a 0f 84 95 00 00 00 8b 15 17 51 21 00 85 d2 75 03 <48> 89 03 48 83 c4 10 5b c3 66 90 45 31 c0 e9 75 ff ff ff 0f 1f 84 RSP: 002b:00007fff82719aa0 EFLAGS: 00010246 RAX: 00007fbaf268d2a0 RBX: 00007fbaf28c8400 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 00007fbaf2685ac8 RDI: 0000000000000001 RBP: 0000000000000001 R08: 00007fbaf2cf04f0 R09: 00007fbaf2685ac8 R10: 00000000000000de R11: 00007fbaf26844d8 R12: 0000000000000000 R13: 0000000000000000 R14: 000056170642cb50 R15: 00000000ffffffff Allocated by task 152: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2778 [inline] slab_alloc mm/slub.c:2786 [inline] kmem_cache_alloc+0xd8/0x300 mm/slub.c:2791 getname_flags fs/namei.c:138 [inline] getname_flags+0xd2/0x5b0 fs/namei.c:128 user_path_at_empty+0x2a/0x50 fs/namei.c:2746 user_path_at include/linux/namei.h:58 [inline] do_faccessat+0x248/0x7a0 fs/open.c:398 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 152: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x117/0x160 mm/kasan/common.c:476 slab_free_hook mm/slub.c:1444 [inline] slab_free_freelist_hook mm/slub.c:1477 [inline] slab_free mm/slub.c:3024 [inline] kmem_cache_free+0x9b/0x360 mm/slub.c:3040 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x282/0x3e0 fs/namei.c:2475 user_path_at include/linux/namei.h:58 [inline] do_faccessat+0x248/0x7a0 fs/open.c:398 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8881cf140000 which belongs to the cache names_cache of size 4096 The buggy address is located 0 bytes inside of 4096-byte region [ffff8881cf140000, ffff8881cf141000) The buggy address belongs to the page: page:ffffea00073c5000 refcount:1 mapcount:0 mapping:ffff8881da11c000 index:0x0 compound_mapcount: 0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 dead000000000100 dead000000000122 ffff8881da11c000 raw: 0000000000000000 0000000000070007 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cf13ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881cf13ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881cf140000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881cf140080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cf140100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================