[syzbot] INFO: trying to register non-static key in ieee80211_do_stop

26 views
Skip to first unread message

syzbot

unread,
Jul 14, 2022, 8:08:26 AM7/14/22
to da...@davemloft.net, edum...@google.com, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b11e5f6a3a5c net: sunhme: output link status with a single..
git tree: net
console+strace: https://syzkaller.appspot.com/x/log.txt?x=108ed862080000
kernel config: https://syzkaller.appspot.com/x/.config?x=fa95f12403a2e0d2
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173a7c78080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1102749a080000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+eceab5...@syzkaller.appspotmail.com

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: 0 PID: 3615 Comm: syz-executor630 Not tainted 5.19.0-rc5-syzkaller-00263-gb11e5f6a3a5c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
assign_lock_key kernel/locking/lockdep.c:979 [inline]
register_lock_class+0xf30/0x1130 kernel/locking/lockdep.c:1292
__lock_acquire+0x10a/0x5660 kernel/locking/lockdep.c:4932
lock_acquire kernel/locking/lockdep.c:5665 [inline]
lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:354 [inline]
ieee80211_do_stop+0xc3/0x1ff0 net/mac80211/iface.c:380
ieee80211_runtime_change_iftype net/mac80211/iface.c:1789 [inline]
ieee80211_if_change_type+0x383/0x840 net/mac80211/iface.c:1827
ieee80211_change_iface+0x57/0x3f0 net/mac80211/cfg.c:190
rdev_change_virtual_intf net/wireless/rdev-ops.h:69 [inline]
cfg80211_change_iface+0x5e1/0xf10 net/wireless/util.c:1078
nl80211_set_interface+0x64f/0x8c0 net/wireless/nl80211.c:4041
genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:731
genl_family_rcv_msg net/netlink/genetlink.c:775 [inline]
genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:792
netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2501
genl_rcv+0x24/0x40 net/netlink/genetlink.c:803
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
netlink_unicast+0x543/0x7f0 net/netlink/af_netlink.c:1345
netlink_sendmsg+0x917/0xe10 net/netlink/af_netlink.c:1921
sock_sendmsg_nosec net/socket.c:714 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:734
____sys_sendmsg+0x6eb/0x810 net/socket.c:2488
___sys_sendmsg+0xf3/0x170 net/socket.c:2542
__sys_sendmsg net/socket.c:2571 [inline]
__do_sys_sendmsg net/socket.c:2580 [inline]
__se_sys_sendmsg net/socket.c:2578 [inline]
__x64_sys_sendmsg+0x132/0x220 net/socket.c:2578
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f5bf1b37b89
Code: 28 c3 e8 5a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd682b8a38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Hillf Danton

unread,
Jul 15, 2022, 7:49:01 AM7/15/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 14 Jul 2022 05:08:25 -0700
Dont acquire lock without checking ops->wake_tx_queue.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git b11e5f6a3a5c

--- y/net/mac80211/iface.c
+++ i/net/mac80211/iface.c
@@ -377,9 +377,11 @@ static void ieee80211_do_stop(struct iee
bool cancel_scan;
struct cfg80211_nan_func *func;

- spin_lock_bh(&local->fq.lock);
+ if (local->ops->wake_tx_queue)
+ spin_lock_bh(&local->fq.lock);
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
- spin_unlock_bh(&local->fq.lock);
+ if (local->ops->wake_tx_queue)
+ spin_unlock_bh(&local->fq.lock);

cancel_scan = rcu_access_pointer(local->scan_sdata) == sdata;
if (cancel_scan)
--

syzbot

unread,
Jul 15, 2022, 7:59:14 AM7/15/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
SYZFATAL: executor failed NUM times: failed to create temp dir: mkdir ./syzkaller-testdir5ADDR: read-only file system

2022/07/15 11:58:52 SYZFATAL: executor failed 11 times: failed to create temp dir: mkdir ./syzkaller-testdir573412366: read-only file system


Tested on:

commit: b11e5f6a net: sunhme: output link status with a single..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
console output: https://syzkaller.appspot.com/x/log.txt?x=14133fa4080000
kernel config: https://syzkaller.appspot.com/x/.config?x=fa95f12403a2e0d2
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=13043006080000

Hillf Danton

unread,
Jul 15, 2022, 8:26:31 AM7/15/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 14 Jul 2022 05:08:25 -0700

syzbot

unread,
Jul 15, 2022, 8:38:14 AM7/15/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
SYZFATAL: executor failed NUM times: failed to create temp dir: mkdir ./syzkaller-testdir3ADDR: read-only file system

2022/07/15 12:37:03 SYZFATAL: executor failed 11 times: failed to create temp dir: mkdir ./syzkaller-testdir3040842611: read-only file system


Tested on:

commit: b11e5f6a net: sunhme: output link status with a single..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
console output: https://syzkaller.appspot.com/x/log.txt?x=159f23b4080000
kernel config: https://syzkaller.appspot.com/x/.config?x=fa95f12403a2e0d2
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=12cc29b4080000

Hillf Danton

unread,
Jul 15, 2022, 6:55:59 PM7/15/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 14 Jul 2022 05:08:25 -0700
Dont acquire lock without checking ops->wake_tx_queue.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

syzbot

unread,
Jul 15, 2022, 7:06:12 PM7/15/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
SYZFATAL: executor failed NUM times: failed to create temp dir: mkdir ./syzkaller-testdir2ADDR: read-only file system

2022/07/15 23:05:48 SYZFATAL: executor failed 11 times: failed to create temp dir: mkdir ./syzkaller-testdir2570391515: read-only file system
[ 81.505213][ T47


Tested on:

commit: 9b59ec8d Merge tag 'riscv-for-linus-5.19-rc7' of git:/..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=17a34994080000
kernel config: https://syzkaller.appspot.com/x/.config?x=3cc990589d31f8d6
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=1577b5b2080000

Hillf Danton

unread,
Jul 16, 2022, 12:51:16 AM7/16/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 14 Jul 2022 05:08:25 -0700
v1, Dont acquire lock without checking ops->wake_tx_queue.
v2, revert f856373e2f31 to see the reasons for
> 2022/07/15 23:05:48 SYZFATAL: executor failed 11 times: failed to create temp dir: mkdir ./syzkaller-testdir2570391515: read-only file system

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

--- y/net/mac80211/iface.c
+++ i/net/mac80211/iface.c
@@ -377,9 +377,7 @@ static void ieee80211_do_stop(struct iee
bool cancel_scan;
struct cfg80211_nan_func *func;

- spin_lock_bh(&local->fq.lock);
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
- spin_unlock_bh(&local->fq.lock);

syzbot

unread,
Jul 16, 2022, 1:07:11 AM7/16/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
SYZFATAL: executor failed NUM times: executor NUM: failed to write control pipe: write |NUM: broken pipe

2022/07/16 05:06:15 SYZFATAL: executor failed 11 times: executor 5: failed to write control pipe: write |1: broken pipe
SYZFAIL: wrong response packet
(errno 16: Device or resource busy)
loop exited with status 67


Tested on:

commit: 9b59ec8d Merge tag 'riscv-for-linus-5.19-rc7' of git:/..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=17e216dc080000
kernel config: https://syzkaller.appspot.com/x/.config?x=8a04cbcc193add96
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=1292a4fc080000

syzbot

unread,
Jul 16, 2022, 9:56:11 PM7/16/22
to penguin...@i-love.sakura.ne.jp, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+eceab5...@syzkaller.appspotmail.com

Tested on:

commit: 972a278f Merge tag 'for-5.19-rc7-tag' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13b9a1b4080000
kernel config: https://syzkaller.appspot.com/x/.config?x=3cc990589d31f8d6
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=16cdc0ba080000

Note: testing is done by a robot and is best-effort only.

syzbot

unread,
Jul 17, 2022, 7:59:09 AM7/17/22
to penguin...@i-love.sakura.ne.jp, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+eceab5...@syzkaller.appspotmail.com

Tested on:

commit: 972a278f Merge tag 'for-5.19-rc7-tag' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15dd1464080000
kernel config: https://syzkaller.appspot.com/x/.config?x=3cc990589d31f8d6
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=173a363a080000

syzbot

unread,
Jul 19, 2022, 12:12:41 AM7/19/22
to Tetsuo Handa, penguin...@i-love.sakura.ne.jp, syzkall...@googlegroups.com
> #syz fix: wifi: mac80211: do not abuse fq.lock in ieee80211_do_stop()

Your 'fix:' command is accepted, but please keep syzkall...@googlegroups.com mailing list in CC next time. It serves as a history of what happened with each bug report. Thank you.

>
> https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?h=for-next&id=3598cb6e18626d28d20c8de4ee8217fdd4153d63
>

Hillf Danton

unread,
Jul 21, 2022, 12:27:07 PM7/21/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Thu, 14 Jul 2022 05:08:25 -0700
> syzbot found the following issue on:
>
> HEAD commit: b11e5f6a3a5c net: sunhme: output link status with a single..
> git tree: net
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=108ed862080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=fa95f12403a2e0d2
> dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=173a7c78080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1102749a080000
>
Dont acquire lock without checking ops->wake_tx_queue.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git e22c88799f26

--- y/net/mac80211/iface.c
+++ i/net/mac80211/iface.c
@@ -380,9 +380,11 @@ static void ieee80211_do_stop(struct iee
bool cancel_scan;
struct cfg80211_nan_func *func;

- spin_lock_bh(&local->fq.lock);
+ if (local->ops->wake_tx_queue)
+ spin_lock_bh(&local->fq.lock);
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
- spin_unlock_bh(&local->fq.lock);
+ if (local->ops->wake_tx_queue)
+ spin_unlock_bh(&local->fq.lock);

syzbot

unread,
Jul 21, 2022, 12:46:16 PM7/21/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+eceab5...@syzkaller.appspotmail.com

Tested on:

commit: e22c8879 Merge branch '100GbE' of git://git.kernel.org..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=119975d6080000
kernel config: https://syzkaller.appspot.com/x/.config?x=e37e9aaa4c062adb
dashboard link: https://syzkaller.appspot.com/bug?extid=eceab52db7c4b961e9d6
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=14583378080000
Reply all
Reply to author
Forward
0 new messages