syzbot


BUG: sleeping function called from invalid context in sta_info_move_state

Status: fixed on 2020/12/25 08:46
Reported-by: syzbot+f1f5fadb1e03d4d54b6b@syzkaller.appspotmail.com
Fix commit: 499b109be688 mac80211: free sta in sta_info_insert_finish() on errors
First crash: 589d, last: 587d

Fix bisection: fixed by (bisect log) :
commit 499b109be6889b4a5442b7652c32370bb2d741a2
Author: Johannes Berg <johannes.berg@intel.com>
Date: Thu Nov 12 10:22:04 2020 +0000

  mac80211: free sta in sta_info_insert_finish() on errors

similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: sleeping function called from invalid context in sta_info_move_state C done 1101 587d 589d 1/1 fixed on 2020/12/25 08:46
upstream BUG: sleeping function called from invalid context in sta_info_move_state C done 39248 576d 607d 21/22 fixed on 2021/03/10 01:48

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
BUG: sleeping function called from invalid context at net/mac80211/sta_info.c:1850
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
in_atomic(): 0, irqs_disabled(): 0, pid: 7, name: kworker/u4:0
wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
4 locks held by kworker/u4:0/7:
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
 #0: 0000000076985581 ((wq_completion)"%s"wiphy_name(local->hw.wiphy)){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2126
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
 #1: 0000000054b1490c ((work_completion)(&sdata->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2130
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50
 #2: 00000000133b7732 (&wdev->mtx){+.+.}, at: sdata_lock net/mac80211/ieee80211_i.h:990 [inline]
 #2: 00000000133b7732 (&wdev->mtx){+.+.}, at: ieee80211_ibss_work+0x85/0xe10 net/mac80211/ibss.c:1675
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
 #3: 00000000ab6af969 (rcu_read_lock){....}, at: sta_info_insert_finish net/mac80211/sta_info.c:573 [inline]
 #3: 00000000ab6af969 (rcu_read_lock){....}, at: sta_info_insert_rcu+0x48e/0x2310 net/mac80211/sta_info.c:661
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Preemption disabled at:
[<ffffffff81533622>] rcu_lockdep_current_cpu_online kernel/rcu/tree.c:1076 [inline]
[<ffffffff81533622>] rcu_lockdep_current_cpu_online+0x32/0x1b0 kernel/rcu/tree.c:1068
CPU: 1 PID: 7 Comm: kworker/u4:0 Not tainted 4.19.159-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: phy2 ieee80211_iface_work
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 ___might_sleep.cold+0x235/0x250 kernel/sched/core.c:6196
 sta_info_move_state+0x32/0x900 net/mac80211/sta_info.c:1850
 sta_info_free+0x55/0x390 net/mac80211/sta_info.c:260
 sta_info_insert_rcu+0x517/0x2310 net/mac80211/sta_info.c:667
 ieee80211_ibss_finish_sta+0x25b/0x360 net/mac80211/ibss.c:601
 ieee80211_ibss_work+0x2b6/0xe10 net/mac80211/ibss.c:1692
 ieee80211_iface_work+0x7ba/0x8a0 net/mac80211/iface.c:1366
 process_one_work+0x864/0x1570 kernel/workqueue.c:2155
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2298
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready

Crashes (760):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-19 2020/11/24 12:49 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 11:51 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 10:52 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 10:36 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 09:45 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 07:04 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/24 06:03 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz C
ci2-linux-4-19 2020/11/23 18:12 linux-4.19.y 76bda503e640 878fb17a .config log report syz C
ci2-linux-4-19 2020/11/23 18:01 linux-4.19.y 76bda503e640 878fb17a .config log report syz C
ci2-linux-4-19 2020/11/23 17:38 linux-4.19.y 76bda503e640 878fb17a .config log report syz C
ci2-linux-4-19 2020/11/23 17:16 linux-4.19.y 76bda503e640 878fb17a .config log report syz C
ci2-linux-4-19 2020/11/23 14:22 linux-4.19.y 76bda503e640 0d27f508 .config log report syz C
ci2-linux-4-19 2020/11/23 09:09 linux-4.19.y 76bda503e640 0d27f508 .config log report syz C
ci2-linux-4-19 2020/11/23 08:31 linux-4.19.y 76bda503e640 0d27f508 .config log report syz C
ci2-linux-4-19 2020/11/23 07:40 linux-4.19.y 76bda503e640 0d27f508 .config log report syz C
ci2-linux-4-19 2020/11/22 12:13 linux-4.19.y 76bda503e640 0d27f508 .config log report syz C
ci2-linux-4-19 2020/11/24 12:30 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 12:29 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 12:14 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 11:09 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 08:16 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 07:18 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 07:16 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 06:25 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 05:53 linux-4.19.y 76bda503e640 1ab681a4 .config log report syz
ci2-linux-4-19 2020/11/24 03:17 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/24 02:08 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/24 01:46 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 23:53 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 23:37 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 23:25 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 21:20 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 20:43 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 18:31 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 18:15 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 17:24 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 17:16 linux-4.19.y 76bda503e640 878fb17a .config log report syz
ci2-linux-4-19 2020/11/23 13:09 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 12:24 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 10:54 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 10:42 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 10:07 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 08:11 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 07:58 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 07:17 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/23 07:10 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/22 11:57 linux-4.19.y 76bda503e640 0d27f508 .config log report syz
ci2-linux-4-19 2020/11/24 11:27 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 09:50 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 09:20 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 05:30 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 05:08 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 04:43 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 04:08 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 03:34 linux-4.19.y 76bda503e640 1ab681a4 .config log report info
ci2-linux-4-19 2020/11/24 02:23 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/24 01:15 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 23:55 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 23:08 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 21:51 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 20:00 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 18:59 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 16:13 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 15:48 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 15:11 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 14:41 linux-4.19.y 76bda503e640 878fb17a .config log report info
ci2-linux-4-19 2020/11/23 14:11 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 12:55 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 11:31 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 09:06 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 06:58 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 05:33 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 03:47 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 03:01 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 01:59 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/23 01:01 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 23:47 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 22:40 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 21:03 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 19:11 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 17:48 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 16:33 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 16:30 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 14:28 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 12:17 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 11:14 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 10:46 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 10:21 linux-4.19.y 76bda503e640 0d27f508 .config log report info
ci2-linux-4-19 2020/11/22 09:38 linux-4.19.y 76bda503e640 0d27f508 .config log report info