syzbot


INFO: trying to register non-static key in cfg80211_dev_free

Status: fixed on 2025/07/14 10:32
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+4f62f981bd185e7a0aa4@syzkaller.appspotmail.com
Fix commit: b679fe84cd5c wifi: cfg80211: init wiphy_work before allocating rfkill fails
First crash: 245d, last: 196d
Fix bisection: fixed by (bisect log) :
commit b679fe84cd5cc6f3481b7131fd28676191ad2615
Author: Edward Adam Davis <eadavis@qq.com>
Date: Tue Mar 18 03:13:45 2025 +0000

  wifi: cfg80211: init wiphy_work before allocating rfkill fails

  
Bug presence (2)
Date Name Commit Repro Result
2025/04/22 linux-6.1.y (ToT) 420102835862 C [report] INFO: trying to register non-static key in cfg80211_dev_free
2025/04/22 upstream (ToT) a33b5a08cbbd C Didn't crash
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: trying to register non-static key in cfg80211_dev_free wireless -1 C 304 260d 280d 28/29 fixed on 2025/06/10 16:19

Sample crash report:
R13: 0000000000000000 R14: 00007f279abb5fa0 R15: 00007ffc0b9ea058
 </TASK>
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 1 PID: 11928 Comm: syz.8.2369 Not tainted 6.1.141-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
 assign_lock_key+0x1f5/0x230 kernel/locking/lockdep.c:974
 register_lock_class+0x20e/0x860 kernel/locking/lockdep.c:1287
 __lock_acquire+0x160/0x7c50 kernel/locking/lockdep.c:4928
 lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
 cfg80211_dev_free+0x2f/0x2d0 net/wireless/core.c:1151
 device_release+0x92/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:681 [inline]
 kobject_release lib/kobject.c:712 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x21d/0x460 lib/kobject.c:729
 wiphy_free net/wireless/core.c:1179 [inline]
 wiphy_new_nm+0x1789/0x1a40 net/wireless/core.c:562
 ieee80211_alloc_hw_nm+0x38d/0x1eb0 net/mac80211/main.c:674
 mac80211_hwsim_new_radio+0x143/0x4c40 drivers/net/wireless/mac80211_hwsim.c:4256
 hwsim_new_radio_nl+0xafa/0xce0 drivers/net/wireless/mac80211_hwsim.c:5176
 genl_family_rcv_msg_doit+0x22e/0x320 net/netlink/genetlink.c:756
 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline]
 genl_rcv_msg+0x5f2/0x780 net/netlink/genetlink.c:850
 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2493
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1859
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x59b/0x970 net/socket.c:2519
 ___sys_sendmsg+0x21c/0x290 net/socket.c:2573
 __sys_sendmsg net/socket.c:2602 [inline]
 __do_sys_sendmsg net/socket.c:2611 [inline]
 __se_sys_sendmsg+0x19e/0x270 net/socket.c:2609
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f279a98e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f279b74e038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f279abb5fa0 RCX: 00007f279a98e929
RDX: 0000000024000810 RSI: 00002000000000c0 RDI: 0000000000000005
RBP: 00007f279b74e090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007f279abb5fa0 R15: 00007ffc0b9ea058
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 1 PID: 11928 at net/wireless/core.c:1152 cfg80211_dev_free+0x2ba/0x2d0 net/wireless/core.c:1152
Modules linked in:
CPU: 1 PID: 11928 Comm: syz.8.2369 Not tainted 6.1.141-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:cfg80211_dev_free+0x2ba/0x2d0 net/wireless/core.c:1152
Code: 9a 67 f8 48 8b bb 40 09 00 00 e8 91 8f 4f f8 48 89 df 48 83 c4 20 5b 41 5c 41 5d 41 5e 41 5f 5d e9 7b 8f 4f f8 e8 46 21 16 f8 <0f> 0b e9 a0 fd ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00
RSP: 0018:ffffc90004b3f1e0 EFLAGS: 00010093
RAX: ffffffff896ab52a RBX: ffff8880685d8000 RCX: ffff88802fae3b80
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffc90004b3f0c0
RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000003
R10: fffff52000967e18 R11: 1ffff92000967e18 R12: ffff8880685d8708
R13: dffffc0000000000 R14: ffff8880685d8718 R15: 0000000000000a06
FS:  00007f279b74e6c0(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc0bb6fe78 CR3: 000000002a187000 CR4: 00000000003506e0
DR0: 0000200000000300 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff1 DR7: 0000000000000600
Call Trace:
 <TASK>
 device_release+0x92/0x1c0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:681 [inline]
 kobject_release lib/kobject.c:712 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x21d/0x460 lib/kobject.c:729
 wiphy_free net/wireless/core.c:1179 [inline]
 wiphy_new_nm+0x1789/0x1a40 net/wireless/core.c:562
 ieee80211_alloc_hw_nm+0x38d/0x1eb0 net/mac80211/main.c:674
 mac80211_hwsim_new_radio+0x143/0x4c40 drivers/net/wireless/mac80211_hwsim.c:4256
 hwsim_new_radio_nl+0xafa/0xce0 drivers/net/wireless/mac80211_hwsim.c:5176
 genl_family_rcv_msg_doit+0x22e/0x320 net/netlink/genetlink.c:756
 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline]
 genl_rcv_msg+0x5f2/0x780 net/netlink/genetlink.c:850
 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2493
 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861
 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
 netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337
 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1859
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x59b/0x970 net/socket.c:2519
 ___sys_sendmsg+0x21c/0x290 net/socket.c:2573
 __sys_sendmsg net/socket.c:2602 [inline]
 __do_sys_sendmsg net/socket.c:2611 [inline]
 __se_sys_sendmsg+0x19e/0x270 net/socket.c:2609
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f279a98e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f279b74e038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f279abb5fa0 RCX: 00007f279a98e929
RDX: 0000000024000810 RSI: 00002000000000c0 RDI: 0000000000000005
RBP: 00007f279b74e090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 0000000000000000 R14: 00007f279abb5fa0 R15: 00007ffc0b9ea058
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/09 09:41 linux-6.1.y 58485ff1a74f 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: trying to register non-static key in cfg80211_dev_free
2025/05/11 08:19 linux-6.1.y 02b72ccb5f9d 77908e5f .config console log report info ci2-linux-6-1-kasan-perf INFO: trying to register non-static key in cfg80211_dev_free
2025/04/21 12:03 linux-6.1.y 420102835862 2a20f901 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: trying to register non-static key in cfg80211_dev_free
2025/04/21 11:20 linux-6.1.y 420102835862 2a20f901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: trying to register non-static key in cfg80211_dev_free
2025/05/25 16:17 linux-6.1.y da3c5173c55f ed351ea7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: trying to register non-static key in cfg80211_dev_free
* Struck through repros no longer work on HEAD.