mac80211_hwsim hwsim5 wlan1: refused to change device tx_queue_len ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x4346/0x6120 Read of size 8 at addr ffff88801a5a4be8 by task syz-executor/4741 CPU: 0 PID: 4741 Comm: syz-executor Not tainted 5.19.0-rc3-next-20220623 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x8b/0xb3 print_report.cold+0x5e/0x5e8 kasan_report+0xbe/0x1c0 __lock_acquire+0x4346/0x6120 lock_acquire+0x1a2/0x530 _raw_spin_lock_irq+0x32/0x50 kmemleak_scan+0x21d/0x16b0 kmemleak_write+0x56c/0x680 full_proxy_write+0x11d/0x190 vfs_write+0x264/0xac0 ksys_write+0x127/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f3af29d35c3 Code: 16 00 00 00 eb ae 90 b8 6e 00 00 00 eb a6 e8 44 ef 04 00 0f 1f 40 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18 RSP: 002b:00007ffc0b6ae918 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ffc0b6aef58 RCX: 00007f3af29d35c3 RDX: 0000000000000004 RSI: 00007f3af2a89ed9 RDI: 0000000000000003 RBP: 0000000000000002 R08: 000000000000015b R09: 00007ffc0b742080 R10: 00007ffc0b742090 R11: 0000000000000246 R12: 00000000fffffff6 R13: 00007ffc0b6afef1 R14: 0000000000000000 R15: 0000000000054f0a Allocated by task 129: kasan_save_stack+0x1e/0x40 __kasan_slab_alloc+0x66/0x80 kmem_cache_alloc+0x1b1/0x490 __create_object.isra.0+0x3d/0xc10 kmem_cache_alloc+0x247/0x490 __alloc_file+0x21/0x230 alloc_empty_file+0x6d/0x170 path_openat+0xe1/0x2870 do_filp_open+0x1aa/0x400 do_sys_openat2+0x16d/0x4c0 __x64_sys_openat+0x13f/0x1f0 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 Freed by task 13: kasan_save_stack+0x1e/0x40 kasan_set_track+0x21/0x30 kasan_set_free_info+0x20/0x30 ____kasan_slab_free+0x14b/0x1a0 kmem_cache_free+0xe7/0x5e0 rcu_core+0x7e2/0x2070 __do_softirq+0x270/0x8c7 Last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x97/0xa0 call_rcu+0x6a/0xa20 kmem_cache_free+0x26e/0x5e0 rcu_core+0x7e2/0x2070 __do_softirq+0x270/0x8c7 Second to last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x97/0xa0 call_rcu+0x6a/0xa20 kfree+0x1e1/0x5b0 ieee802_11_parse_elems_crc+0xad3/0xf70 ieee80211_bss_info_update+0x433/0xb00 ieee80211_ibss_rx_queued_mgmt+0x1912/0x2ef0 ieee80211_iface_work+0xa71/0xce0 process_one_work+0xa1c/0x16a0 worker_thread+0x637/0x1250 kthread+0x2f2/0x3b0 ret_from_fork+0x22/0x30 The buggy address belongs to the object at ffff88801a5a4bd0 which belongs to the cache kmemleak_object of size 368 The buggy address is located 24 bytes inside of 368-byte region [ffff88801a5a4bd0, ffff88801a5a4d40) The buggy address belongs to the physical page: page:000000003ef73b1f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a5a4 head:000000003ef73b1f order:1 compound_mapcount:0 compound_pincount:0 flags: 0x100000000010200(slab|head|node=0|zone=1) raw: 0100000000010200 dead000000000100 dead000000000122 ffff88800784f780 raw: 0000000000000000 0000000000120012 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801a5a4a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801a5a4b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801a5a4b80: 00 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb ^ ffff88801a5a4c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801a5a4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [kworker/u4:9:812] Modules linked in: irq event stamp: 493024 hardirqs last enabled at (493023): [] _raw_spin_unlock_irq+0x1f/0x40 hardirqs last disabled at (493024): [] __schedule+0x1223/0x2490 softirqs last enabled at (492638): [] ieee80211_ibss_work+0x2e8/0xdf0 softirqs last disabled at (492636): [] ieee80211_ibss_work+0x138/0xdf0 CPU: 1 PID: 812 Comm: kworker/u4:9 Tainted: G B 5.19.0-rc3-next-20220623 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Workqueue: events_unbound enable_ptr_key_workfn RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x60 Code: 00 5d e9 f6 9f c3 00 66 0f 1f 44 00 00 48 8b be a8 01 00 00 e8 b4 ff ff ff 31 c0 c3 90 65 8b 05 d9 eb bd 7e 89 c1 48 8b 34 24 <81> e1 00 01 00 00 65 48 8b 14 25 c0 6e 02 00 a9 00 01 ff 00 74 0e RSP: 0018:ffff8880182e7aa0 EFLAGS: 00000202 RAX: 0000000000000001 RBX: ffff88806ce3f180 RCX: 0000000000000001 RDX: ffff8880156cd040 RSI: ffffffff813a7419 RDI: 0000000000000005 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: ffffed100d9c7e31 R13: 0000000000000000 R14: ffff88806ce3f188 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f955d192ae0 CR3: 0000000005026000 CR4: 0000000000350ee0 Call Trace: smp_call_function_many_cond+0x419/0xb30 on_each_cpu_cond_mask+0x56/0xa0 text_poke_bp_batch+0x236/0x6d0 text_poke_finish+0x16/0x30 arch_jump_label_transform_apply+0x13/0x20 jump_label_update+0x32f/0x410 static_key_enable_cpuslocked+0x1b1/0x260 static_key_enable+0x16/0x20 process_one_work+0xa1c/0x16a0 worker_thread+0x637/0x1250 kthread+0x2f2/0x3b0 ret_from_fork+0x22/0x30 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 4741 Comm: syz-executor Tainted: G B 5.19.0-rc3-next-20220623 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:kasan_report+0xf/0x1c0 Code: c4 38 5b 5d 41 5c c3 e9 1a 6d 94 02 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 41 56 41 55 41 54 55 53 48 83 ec 38 9c 41 5e <0f> 01 ca 65 48 8b 04 25 c0 6e 02 00 8b 80 f8 13 00 00 85 c0 0f 85 RSP: 0018:ffff888044d57a60 EFLAGS: 00000086 RAX: 0000000000000003 RBX: ffffed10034b497b RCX: ffffffff81298687 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88801a5a4bd0 RBP: ffffed10034b497a R08: 0000000000000000 R09: ffff88801a5a4bd3 R10: ffffed10034b497a R11: 0000000000000001 R12: 0000000000000003 R13: ffffed10034b497a R14: 0000000000000086 R15: 1ffff110089aaf5e FS: 0000555555697400(0000) GS:ffff88806ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f955d192ae0 CR3: 0000000042f82000 CR4: 0000000000350ef0 Call Trace: kasan_check_range+0xf9/0x1e0 queued_spin_lock_slowpath+0xa7/0xc80 do_raw_spin_lock+0x1d8/0x260 kmemleak_scan+0x21d/0x16b0 kmemleak_write+0x56c/0x680 full_proxy_write+0x11d/0x190 vfs_write+0x264/0xac0 ksys_write+0x127/0x250 do_syscall_64+0x3b/0x90 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f3af29d35c3 Code: 16 00 00 00 eb ae 90 b8 6e 00 00 00 eb a6 e8 44 ef 04 00 0f 1f 40 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 55 c3 0f 1f 40 00 48 83 ec 28 48 89 54 24 18 RSP: 002b:00007ffc0b6ae918 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007ffc0b6aef58 RCX: 00007f3af29d35c3 RDX: 0000000000000004 RSI: 00007f3af2a89ed9 RDI: 0000000000000003 RBP: 0000000000000002 R08: 000000000000015b R09: 00007ffc0b742080 R10: 00007ffc0b742090 R11: 0000000000000246 R12: 00000000fffffff6 R13: 00007ffc0b6afef1 R14: 0000000000000000 R15: 0000000000054f0a ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 5d pop %rbp 1: e9 f6 9f c3 00 jmpq 0xc39ffc 6: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) c: 48 8b be a8 01 00 00 mov 0x1a8(%rsi),%rdi 13: e8 b4 ff ff ff callq 0xffffffcc 18: 31 c0 xor %eax,%eax 1a: c3 retq 1b: 90 nop 1c: 65 8b 05 d9 eb bd 7e mov %gs:0x7ebdebd9(%rip),%eax # 0x7ebdebfc 23: 89 c1 mov %eax,%ecx 25: 48 8b 34 24 mov (%rsp),%rsi * 29: 81 e1 00 01 00 00 and $0x100,%ecx <-- trapping instruction 2f: 65 48 8b 14 25 c0 6e mov %gs:0x26ec0,%rdx 36: 02 00 38: a9 00 01 ff 00 test $0xff0100,%eax 3d: 74 0e je 0x4d