WARNING in sta_info_insert_rcu

24 views
Skip to first unread message

syzbot

unread,
Sep 24, 2020, 5:26:27 AM9/24/20
to da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: eff48dde Merge tag 'trace-v5.9-rc5' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17b4e8e3900000
kernel config: https://syzkaller.appspot.com/x/.config?x=5f4c828c9e3cef97
dashboard link: https://syzkaller.appspot.com/bug?extid=ef4ca92d9d6f5ba2f880
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=167e5707900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1765b19b900000

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10341dab900000
final oops: https://syzkaller.appspot.com/x/report.txt?x=12341dab900000
console output: https://syzkaller.appspot.com/x/log.txt?x=14341dab900000

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

wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
------------[ cut here ]------------
WARNING: CPU: 0 PID: 72 at net/mac80211/sta_info.c:529 sta_info_insert_check net/mac80211/sta_info.c:529 [inline]
WARNING: CPU: 0 PID: 72 at net/mac80211/sta_info.c:529 sta_info_insert_rcu+0x27a/0x2ba0 net/mac80211/sta_info.c:707
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 72 Comm: kworker/u4:3 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: phy4 ieee80211_iface_work
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x198/0x1fd lib/dump_stack.c:118
panic+0x382/0x7fb kernel/panic.c:231
__warn.cold+0x20/0x4b kernel/panic.c:600
report_bug+0x1bd/0x210 lib/bug.c:198
handle_bug+0x38/0x90 arch/x86/kernel/traps.c:234
exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254
asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536
RIP: 0010:sta_info_insert_check net/mac80211/sta_info.c:529 [inline]
RIP: 0010:sta_info_insert_rcu+0x27a/0x2ba0 net/mac80211/sta_info.c:707
Code: 24 e8 3a 79 b8 f9 0f b6 85 50 ff ff ff 31 ff 83 e0 01 41 89 c7 89 c6 e8 44 75 b8 f9 45 84 ff 0f 84 c5 00 00 00 e8 16 79 b8 f9 <0f> 0b 41 bd ea ff ff ff e8 09 79 b8 f9 48 8b bd 30 ff ff ff e8 ed
RSP: 0018:ffffc90001017958 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888093338c00 RCX: ffffffff87bdc51c
RDX: ffff8880a9394040 RSI: ffffffff87bdc52a RDI: 0000000000000001
RBP: ffffc90001017aa0 R08: 0000000000000000 R09: ffff88809333925f
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000500177e9
R13: ffff8880a8916048 R14: ffff8880a8916000 R15: 0000000000000001
ieee80211_ibss_finish_sta+0x212/0x390 net/mac80211/ibss.c:592
ieee80211_ibss_work+0x2c7/0xe80 net/mac80211/ibss.c:1699
ieee80211_iface_work+0x7d2/0x8f0 net/mac80211/iface.c:1438
process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
kthread+0x3b5/0x4a0 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Kernel Offset: disabled
Rebooting in 86400 seconds..


---
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.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Hillf Danton

unread,
Sep 24, 2020, 7:44:37 AM9/24/20
to syzbot, da...@davemloft.net, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, Hillf Danton, syzkall...@googlegroups.com

Thu, 24 Sep 2020 02:26:25 -0700
Any light on pair with the below RCU read lock is highly appreciated and
it may have some link to another report.

syzbot+2e293d...@syzkaller.appspotmail.com

--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -694,7 +694,7 @@ static int sta_info_insert_finish(struct
return err;
}

-int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
+int sta_info_insert_rcu(struct sta_info *sta)
{
struct ieee80211_local *local = sta->local;
int err;
@@ -706,7 +706,6 @@ int sta_info_insert_rcu(struct sta_info
err = sta_info_insert_check(sta);
if (err) {
mutex_unlock(&local->sta_mtx);
- rcu_read_lock();
goto out_free;
}


syzbot

unread,
Nov 6, 2021, 12:09:07 PM11/6/21
to da...@davemloft.net, expe...@bandup.com.br, hda...@sina.com, johann...@intel.com, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com, yueha...@huawei.com
syzbot suspects this issue was fixed by commit:

commit a6555f844549cd190eb060daef595f94d3de1582
Author: YueHaibing <yueha...@huawei.com>
Date: Fri Aug 27 14:42:30 2021 +0000

mac80211: Drop frames from invalid MAC address in ad-hoc mode

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=103db432b00000
start commit: 7266f2030eb0 Merge tag 'pm-5.13-rc8' of git://git.kernel.o..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=533cb04fad26afdb
dashboard link: https://syzkaller.appspot.com/bug?extid=ef4ca92d9d6f5ba2f880
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11be2fd0300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d85b14300000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: mac80211: Drop frames from invalid MAC address in ad-hoc mode

YueHaibing

unread,
Nov 7, 2021, 8:13:00 PM11/7/21
to syzbot, da...@davemloft.net, expe...@bandup.com.br, hda...@sina.com, johann...@intel.com, joha...@sipsolutions.net, ku...@kernel.org, linux-...@vger.kernel.org, linux-w...@vger.kernel.org, net...@vger.kernel.org, syzkall...@googlegroups.com
> .
>
Reply all
Reply to author
Forward
0 new messages