* [syzbot] [wireless?] WARNING in rate_control_rate_init (2)
@ 2023-07-02 15:15 syzbot
2023-11-28 23:57 ` syzbot
` (5 more replies)
0 siblings, 6 replies; 10+ messages in thread
From: syzbot @ 2023-07-02 15:15 UTC (permalink / raw)
To: davem, edumazet, johannes, kuba, linux-kernel, linux-wireless,
llvm, nathan, ndesaulniers, netdev, pabeni, syzkaller-bugs, trix
Hello,
syzbot found the following issue on:
HEAD commit: 6e2332e0ab53 Merge tag 'cgroup-for-6.5' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16e1c60b280000
kernel config: https://syzkaller.appspot.com/x/.config?x=b8f24c1070268858
dashboard link: https://syzkaller.appspot.com/bug?extid=62d7eef57b09bfebcd84
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=171c0767280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10113ebd280000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-6e2332e0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5c6bc163c340/vmlinux-6e2332e0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f1e705993336/bzImage-6e2332e0.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+62d7eef57b09bfebcd84@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5126 at net/mac80211/rate.c:48 rate_control_rate_init+0x548/0x740 net/mac80211/rate.c:48
Modules linked in:
CPU: 0 PID: 5126 Comm: syz-executor279 Not tainted 6.4.0-syzkaller-01647-g6e2332e0ab53 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:rate_control_rate_init+0x548/0x740 net/mac80211/rate.c:48
Code: f7 48 c7 c2 00 84 7f 8b be 09 03 00 00 48 c7 c7 c0 83 7f 8b c6 05 f9 bc d6 04 01 e8 22 ac d6 f7 e9 d8 fd ff ff e8 a8 16 f6 f7 <0f> 0b e8 c1 32 83 00 31 ff 89 c3 89 c6 e8 b6 12 f6 f7 85 db 75 27
RSP: 0018:ffffc90003197280 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff8881070796c0 RCX: 0000000000000000
RDX: ffff88802a51cb80 RSI: ffffffff898db228 RDI: 0000000000000005
RBP: ffff8880255c0000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000001
R13: 0000000000000000 R14: ffff888021f30de0 R15: ffff888032530000
FS: 000055555570f300(0000) GS:ffff88806b600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000001f594000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
sta_apply_auth_flags.constprop.0+0x424/0x4a0 net/mac80211/cfg.c:1678
sta_apply_parameters+0xaf8/0x16f0 net/mac80211/cfg.c:2005
ieee80211_add_station+0x3d0/0x620 net/mac80211/cfg.c:2070
rdev_add_station net/wireless/rdev-ops.h:201 [inline]
nl80211_new_station+0x1258/0x1b20 net/wireless/nl80211.c:7564
genl_family_rcv_msg_doit.isra.0+0x1e6/0x2d0 net/netlink/genetlink.c:968
genl_family_rcv_msg net/netlink/genetlink.c:1048 [inline]
genl_rcv_msg+0x4ff/0x7e0 net/netlink/genetlink.c:1065
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546
genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913
sock_sendmsg_nosec net/socket.c:725 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:748
____sys_sendmsg+0x722/0x900 net/socket.c:2504
___sys_sendmsg+0x110/0x1b0 net/socket.c:2558
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2587
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc033504a69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 14 00 00 90 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:00007ffe0868f2d8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000000ae5a RCX: 00007fc033504a69
RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000004
RBP: 0000000000000000 R08: 00007ffe0868f478 R09: 00007ffe0868f478
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe0868f2ec
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
</TASK>
---
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 syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init (2) 2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot @ 2023-11-28 23:57 ` syzbot 2023-11-29 3:06 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot ` (4 subsequent siblings) 5 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-28 23:57 UTC (permalink / raw) To: davem, edumazet, johannes.berg, johannes, kuba, linux-kernel, linux-wireless, llvm, nathan, ndesaulniers, netdev, pabeni, syzkaller-bugs, trix syzbot has bisected this issue to: commit b303835dabe0340f932ebb4e260d2229f79b0684 Author: Johannes Berg <johannes.berg@intel.com> Date: Sat Jul 23 20:08:49 2022 +0000 wifi: mac80211: accept STA changes without link changes bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=125a86dce80000 start commit: a214724554ae Merge tag 'wireless-next-2023-11-27' of git:/.. git tree: net-next final oops: https://syzkaller.appspot.com/x/report.txt?x=115a86dce80000 console output: https://syzkaller.appspot.com/x/log.txt?x=165a86dce80000 kernel config: https://syzkaller.appspot.com/x/.config?x=abf6d5a82dab01fe dashboard link: https://syzkaller.appspot.com/bug?extid=62d7eef57b09bfebcd84 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10a4fc64e80000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1363b22ce80000 Reported-by: syzbot+62d7eef57b09bfebcd84@syzkaller.appspotmail.com Fixes: b303835dabe0 ("wifi: mac80211: accept STA changes without link changes") For information about bisection process see: https://goo.gl/tpsmEJ#bisection ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init 2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot 2023-11-28 23:57 ` syzbot @ 2023-11-29 3:06 ` syzbot 2023-11-29 4:04 ` syzbot ` (3 subsequent siblings) 5 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-29 3:06 UTC (permalink / raw) To: linux-kernel For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: [wireless?] WARNING in rate_control_rate_init Author: eadavis@qq.com please test WARNING in rate_control_rate_init #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2332e0ab53 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 606b1b2e4123..13d52452a124 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1796,7 +1796,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, !params->supported_rates_len && !params->ht_capa && !params->vht_capa && !params->he_capa && !params->eht_capa && - !params->opmode_notif_used) + !params->opmode_notif_used && 0) return 0; if (!link || !link_sta) @@ -1817,6 +1817,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, } else if (new_link) { return -EINVAL; } + printk("b, %p \n", rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf)); if (params->txpwr_set) { link_sta->pub->txpwr.type = params->txpwr.type; @@ -1868,6 +1869,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, params->opmode_notif, sband->band); } + printk("e, %p \n", rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf)); return ret; } @@ -1982,6 +1984,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->listen_interval >= 0) sta->listen_interval = params->listen_interval; + printk("b, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); ret = sta_link_apply_parameters(local, sta, false, ¶ms->link_sta_params); if (ret) @@ -1996,6 +2002,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->airtime_weight) sta->airtime_weight = params->airtime_weight; + printk("a, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); /* set the STA state after all sta info from usermode has been set */ if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) || set & BIT(NL80211_STA_FLAG_ASSOCIATED)) { ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init 2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot 2023-11-28 23:57 ` syzbot 2023-11-29 3:06 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot @ 2023-11-29 4:04 ` syzbot [not found] ` <tencent_0CCA1979CFA30DC8A5CF8DDC92365DCE5D07@qq.com> ` (2 subsequent siblings) 5 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-29 4:04 UTC (permalink / raw) To: linux-kernel For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: [wireless?] WARNING in rate_control_rate_init Author: eadavis@qq.com please test WARNING in rate_control_rate_init #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2332e0ab53 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 606b1b2e4123..e97ed85b7723 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1787,22 +1787,12 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, rcu_dereference_protected(sta->link[link_id], lockdep_is_held(&local->hw.wiphy->mtx)); - /* - * If there are no changes, then accept a link that doesn't exist, - * unless it's a new link. - */ - if (params->link_id < 0 && !new_link && - !params->link_mac && !params->txpwr_set && - !params->supported_rates_len && - !params->ht_capa && !params->vht_capa && - !params->he_capa && !params->eht_capa && - !params->opmode_notif_used) - return 0; - + printk("%p, %p, %d\n", link, link_sta, new_link); if (!link || !link_sta) return -EINVAL; sband = ieee80211_get_link_sband(link); + printk("%p\n", sband); if (!sband) return -EINVAL; @@ -1812,11 +1802,23 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, memcpy(link_sta->pub->addr, params->link_mac, ETH_ALEN); } else if (!ether_addr_equal(link_sta->addr, params->link_mac)) { + printk("%s\n", __func__); return -EINVAL; } } else if (new_link) { return -EINVAL; } + /* + * If there are no changes, then accept a link that doesn't exist, + * unless it's a new link. + */ + if (params->link_id < 0 && !new_link && + !params->link_mac && !params->txpwr_set && + !params->supported_rates_len && + !params->ht_capa && !params->vht_capa && + !params->he_capa && !params->eht_capa && + !params->opmode_notif_used) + return 0; if (params->txpwr_set) { link_sta->pub->txpwr.type = params->txpwr.type; @@ -1982,6 +1985,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->listen_interval >= 0) sta->listen_interval = params->listen_interval; + printk("b, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); ret = sta_link_apply_parameters(local, sta, false, ¶ms->link_sta_params); if (ret) @@ -1996,6 +2003,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->airtime_weight) sta->airtime_weight = params->airtime_weight; + printk("a, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); /* set the STA state after all sta info from usermode has been set */ if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) || set & BIT(NL80211_STA_FLAG_ASSOCIATED)) { ^ permalink raw reply related [flat|nested] 10+ messages in thread
[parent not found: <tencent_0CCA1979CFA30DC8A5CF8DDC92365DCE5D07@qq.com>]
* Re: [PATCH] wifi: mac80211: sband's null check should precede params [not found] ` <tencent_0CCA1979CFA30DC8A5CF8DDC92365DCE5D07@qq.com> @ 2023-11-29 6:57 ` Johannes Berg [not found] ` <tencent_DE78F66DB82F496F9894B8E826EC8ACE0C0A@qq.com> 0 siblings, 1 reply; 10+ messages in thread From: Johannes Berg @ 2023-11-29 6:57 UTC (permalink / raw) To: Edward Adam Davis, syzbot+62d7eef57b09bfebcd84 Cc: davem, edumazet, kuba, linux-kernel, linux-wireless, llvm, nathan, ndesaulniers, netdev, pabeni, syzkaller-bugs, trix On Wed, 2023-11-29 at 13:48 +0800, Edward Adam Davis wrote: > > [Analysis] > When ieee80211_get_link_sband() fails to find a valid sband and first checks > for params in sta_link_apply_parameters(), it will return 0 due to new_link > being 0, which will lead to an incorrect process after sta_apply_parameters(). > > [Fix] > First obtain sband and perform a non null check before checking the params. Not sure I can even disagree with that analysis, it seems right, but ... > + if (!link || !link_sta) > + return -EINVAL; > + > + sband = ieee80211_get_link_sband(link); > + if (!sband) > + return -EINVAL; > + > /* > * If there are no changes, then accept a link that doesn't exist, > * unless it's a new link. There's a comment here which is clearly not true after this change, since you've already returned for !link_sta? johannes ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <tencent_DE78F66DB82F496F9894B8E826EC8ACE0C0A@qq.com>]
* Re: [PATCH] wifi: mac80211: sband's null check should precede params [not found] ` <tencent_DE78F66DB82F496F9894B8E826EC8ACE0C0A@qq.com> @ 2023-11-29 8:33 ` Johannes Berg [not found] ` <tencent_6E9CA7EF46E452C90650899D2ECFEEFE4C06@qq.com> 0 siblings, 1 reply; 10+ messages in thread From: Johannes Berg @ 2023-11-29 8:33 UTC (permalink / raw) To: Edward Adam Davis Cc: davem, edumazet, kuba, linux-kernel, linux-wireless, llvm, nathan, ndesaulniers, netdev, pabeni, syzbot+62d7eef57b09bfebcd84, syzkaller-bugs, trix On Wed, 2023-11-29 at 16:18 +0800, Edward Adam Davis wrote: > On Wed, 29 Nov 2023 07:57:07 +0100, Johannes Berg wrote: > > > [Analysis] > > > When ieee80211_get_link_sband() fails to find a valid sband and first checks > > > for params in sta_link_apply_parameters(), it will return 0 due to new_link > > > being 0, which will lead to an incorrect process after sta_apply_parameters(). > > > > > > [Fix] > > > First obtain sband and perform a non null check before checking the params. > > > > Not sure I can even disagree with that analysis, it seems right, but ... > > > > > + if (!link || !link_sta) > > > + return -EINVAL; > > > + > > > + sband = ieee80211_get_link_sband(link); > > > + if (!sband) > > > + return -EINVAL; > > > + > > > /* > > > * If there are no changes, then accept a link that doesn't exist, > > > * unless it's a new link. > > > > There's a comment here which is clearly not true after this change, > > since you've already returned for !link_sta? > No, after applying my patch, it will return due to !sband. > Right, OK, but the way I read the comment (now) is that it wanted to accept it in that case? That said, I just threw the patch into our internal testing machinery quickly (probably has more MLO tests than upstream hostap for now), and it worked just fine ... Maybe we should just remove the comment? johannes ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <tencent_6E9CA7EF46E452C90650899D2ECFEEFE4C06@qq.com>]
* Re: [PATCH] wifi: mac80211: sband's null check should precede params [not found] ` <tencent_6E9CA7EF46E452C90650899D2ECFEEFE4C06@qq.com> @ 2023-11-29 9:15 ` Johannes Berg 0 siblings, 0 replies; 10+ messages in thread From: Johannes Berg @ 2023-11-29 9:15 UTC (permalink / raw) To: Edward Adam Davis Cc: davem, edumazet, kuba, linux-kernel, linux-wireless, llvm, nathan, ndesaulniers, netdev, pabeni, syzbot+62d7eef57b09bfebcd84, syzkaller-bugs, trix On Wed, 2023-11-29 at 16:48 +0800, Edward Adam Davis wrote: > On Wed, 29 Nov 2023 09:33:23 +0100, Johannes Berg wrote: > > > > > [Analysis] > > > > > When ieee80211_get_link_sband() fails to find a valid sband and first checks > > > > > for params in sta_link_apply_parameters(), it will return 0 due to new_link > > > > > being 0, which will lead to an incorrect process after sta_apply_parameters(). > > > > > > > > > > [Fix] > > > > > First obtain sband and perform a non null check before checking the params. > > > > > > > > Not sure I can even disagree with that analysis, it seems right, but ... > > > > > > > > > + if (!link || !link_sta) > > > > > + return -EINVAL; > > > > > + > > > > > + sband = ieee80211_get_link_sband(link); > > > > > + if (!sband) > > > > > + return -EINVAL; > > > > > + > > > > > /* > > > > > * If there are no changes, then accept a link that doesn't exist, > > > > > * unless it's a new link. > > > > > > > > There's a comment here which is clearly not true after this change, > > > > since you've already returned for !link_sta? > > > No, after applying my patch, it will return due to !sband. > > > > > > > Right, OK, but the way I read the comment (now) is that it wanted to > > accept it in that case? > > > > That said, I just threw the patch into our internal testing machinery > > quickly (probably has more MLO tests than upstream hostap for now), and > > it worked just fine ... > > > > Maybe we should just remove the comment? > Do you mean to delete the comments below? > 3 /* > 2 * If there are no changes, then accept a link that doesn't exist, > 1 * unless it's a new link. > 1800 */ > Right, it doesn't seem correct any more? johannes ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init 2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot ` (3 preceding siblings ...) [not found] ` <tencent_0CCA1979CFA30DC8A5CF8DDC92365DCE5D07@qq.com> @ 2023-11-29 11:04 ` syzbot 2023-11-29 11:26 ` syzbot 5 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-29 11:04 UTC (permalink / raw) To: linux-kernel For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: [wireless?] WARNING in rate_control_rate_init Author: eadavis@qq.com please test WARNING in rate_control_rate_init #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2332e0ab53 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 606b1b2e4123..d0b5a5dd7410 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1788,10 +1788,10 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, lockdep_is_held(&local->hw.wiphy->mtx)); /* - * If there are no changes, then accept a link that doesn't exist, + * If there are no changes, then accept a link that exist, * unless it's a new link. */ - if (params->link_id < 0 && !new_link && + if ((sta->sta.valid_links & BIT(params->link_id)) && !new_link && !params->link_mac && !params->txpwr_set && !params->supported_rates_len && !params->ht_capa && !params->vht_capa && -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init 2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot ` (4 preceding siblings ...) 2023-11-29 11:04 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot @ 2023-11-29 11:26 ` syzbot 5 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-29 11:26 UTC (permalink / raw) To: linux-kernel For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: [wireless?] WARNING in rate_control_rate_init Author: eadavis@qq.com please test WARNING in rate_control_rate_init #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2332e0ab53 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 606b1b2e4123..d0b5a5dd7410 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1788,10 +1788,10 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, lockdep_is_held(&local->hw.wiphy->mtx)); /* - * If there are no changes, then accept a link that doesn't exist, + * If there are no changes, then accept a link that exist, * unless it's a new link. */ - if (params->link_id < 0 && !new_link && + if (params->link_id >= 0 && !new_link && !params->link_mac && !params->txpwr_set && !params->supported_rates_len && !params->ht_capa && !params->vht_capa && -- 2.43.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [syzbot] [crypto?] INFO: task hung in hwrng_fillfn
@ 2023-11-25 13:21 syzbot
2023-11-29 2:59 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot
0 siblings, 1 reply; 10+ messages in thread
From: syzbot @ 2023-11-25 13:21 UTC (permalink / raw)
To: davem, herbert, linux-crypto, linux-kernel, olivia,
syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 98b1cc82c4af Linux 6.7-rc2
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12e89e10e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6ae1a4ee971a7305
dashboard link: https://syzkaller.appspot.com/bug?extid=c52ab18308964d248092
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=174f0bd4e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b83b84e80000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/39c6cdad13fc/disk-98b1cc82.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5a77b5daef9b/vmlinux-98b1cc82.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5e09ae712e0d/bzImage-98b1cc82.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+c52ab18308964d248092@syzkaller.appspotmail.com
INFO: task hwrng:749 blocked for more than 143 seconds.
Not tainted 6.7.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:hwrng state:D stack:29040 pid:749 tgid:749 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5376 [inline]
__schedule+0xedb/0x5af0 kernel/sched/core.c:6688
__schedule_loop kernel/sched/core.c:6763 [inline]
schedule+0xe9/0x270 kernel/sched/core.c:6778
schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:6835
__mutex_lock_common kernel/locking/mutex.c:679 [inline]
__mutex_lock+0x5b9/0x9d0 kernel/locking/mutex.c:747
hwrng_fillfn+0x145/0x430 drivers/char/hw_random/core.c:504
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
</TASK>
Showing all locks held in the system:
1 lock held by khungtaskd/29:
#0: ffffffff8cfabce0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline]
#0: ffffffff8cfabce0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline]
#0: ffffffff8cfabce0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x75/0x340 kernel/locking/lockdep.c:6613
2 locks held by kswapd0/86:
1 lock held by hwrng/749:
#0: ffffffff8dbafee8 (reading_mutex){+.+.}-{3:3}, at: hwrng_fillfn+0x145/0x430 drivers/char/hw_random/core.c:504
2 locks held by getty/4824:
#0: ffff888025fa10a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x80 drivers/tty/tty_ldisc.c:243
#1: ffffc90002f062f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xfc6/0x1490 drivers/tty/n_tty.c:2201
2 locks held by syz-executor391/5105:
2 locks held by syz-executor391/5106:
=============================================
NMI backtrace for cpu 1
CPU: 1 PID: 29 Comm: khungtaskd Not tainted 6.7.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
nmi_cpu_backtrace+0x277/0x390 lib/nmi_backtrace.c:113
nmi_trigger_cpumask_backtrace+0x299/0x300 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
watchdog+0xf87/0x1210 kernel/hung_task.c:379
kthread+0x2c6/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5105 Comm: syz-executor391 Not tainted 6.7.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:__lock_acquire+0x30/0x3b10 kernel/locking/lockdep.c:4992
Code: f6 41 55 41 54 49 89 fc 55 89 d5 53 44 89 cb 48 81 ec f0 00 00 00 48 8b 84 24 28 01 00 00 48 c7 84 24 90 00 00 00 b3 8a b5 41 <44> 89 44 24 08 44 8b ac 24 48 01 00 00 48 c7 84 24 98 00 00 00 1b
RSP: 0018:ffffc900044271d8 EFLAGS: 00000086
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8cfabce0
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff8f1934d7 R11: 0000000000000002 R12: ffffffff8cfabce0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 00007f3c785f96c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005565d7bb9be7 CR3: 000000001af30000 CR4: 0000000000350ef0
Call Trace:
<NMI>
</NMI>
<TASK>
lock_acquire kernel/locking/lockdep.c:5753 [inline]
lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5718
rcu_lock_acquire include/linux/rcupdate.h:301 [inline]
rcu_read_lock include/linux/rcupdate.h:747 [inline]
get_mem_cgroup_from_mm+0x4b/0x4c0 mm/memcontrol.c:1081
__mem_cgroup_charge+0x1c/0x140 mm/memcontrol.c:7224
mem_cgroup_charge include/linux/memcontrol.h:684 [inline]
__filemap_add_folio+0x88c/0xed0 mm/filemap.c:854
filemap_add_folio+0xb1/0x1e0 mm/filemap.c:937
page_cache_ra_unbounded+0x1d0/0x5f0 mm/readahead.c:250
do_page_cache_ra mm/readahead.c:299 [inline]
page_cache_ra_order+0x72b/0xa80 mm/readahead.c:546
do_sync_mmap_readahead mm/filemap.c:3141 [inline]
filemap_fault+0x16a8/0x3570 mm/filemap.c:3233
__do_fault+0x107/0x600 mm/memory.c:4265
do_cow_fault mm/memory.c:4662 [inline]
do_fault mm/memory.c:4764 [inline]
do_pte_missing mm/memory.c:3730 [inline]
handle_pte_fault mm/memory.c:5038 [inline]
__handle_mm_fault+0x3a8d/0x3d70 mm/memory.c:5179
handle_mm_fault+0x47a/0xa10 mm/memory.c:5344
do_user_addr_fault+0x3d1/0x1000 arch/x86/mm/fault.c:1413
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x5d/0xc0 arch/x86/mm/fault.c:1561
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:rep_movs_alternative+0x57/0x70 arch/x86/lib/copy_user_64.S:80
Code: 00 66 90 48 8b 06 48 89 07 48 83 c6 08 48 83 c7 08 83 e9 08 74 df 83 f9 08 73 e8 eb c9 eb 01 c3 48 89 c8 48 c1 e9 03 83 e0 07 <f3> 48 a5 89 c1 85 c9 75 b3 c3 48 8d 0c c8 eb ac 66 0f 1f 84 00 00
RSP: 0018:ffffc90004427bb0 EFLAGS: 00050246
RAX: 0000000000000000 RBX: 0000000000000040 RCX: 0000000000000008
RDX: ffffed1028a4ab48 RSI: ffff888145255a00 RDI: 0000000020019980
RBP: 0000000020019980 R08: 0000000000000000 R09: ffffed1028a4ab47
R10: ffff888145255a3f R11: 0000000000000001 R12: ffff888145255a00
R13: 00000000200199c0 R14: 0000000000000000 R15: dffffc0000000000
copy_user_generic arch/x86/include/asm/uaccess_64.h:112 [inline]
raw_copy_to_user arch/x86/include/asm/uaccess_64.h:133 [inline]
_copy_to_user lib/usercopy.c:41 [inline]
_copy_to_user+0xa8/0xb0 lib/usercopy.c:34
copy_to_user include/linux/uaccess.h:191 [inline]
rng_dev_read+0x184/0x580 drivers/char/hw_random/core.c:255
do_loop_readv_writev fs/read_write.c:755 [inline]
do_loop_readv_writev fs/read_write.c:743 [inline]
do_iter_read+0x567/0x830 fs/read_write.c:797
vfs_readv+0x12d/0x1a0 fs/read_write.c:915
do_preadv fs/read_write.c:1007 [inline]
__do_sys_preadv fs/read_write.c:1057 [inline]
__se_sys_preadv fs/read_write.c:1052 [inline]
__x64_sys_preadv+0x228/0x300 fs/read_write.c:1052
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f3c78638b29
Code: Unable to access opcode bytes at 0x7f3c78638aff.
RSP: 002b:00007f3c785f9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007f3c786c2328 RCX: 00007f3c78638b29
RDX: 0000000000000001 RSI: 0000000020001880 RDI: 0000000000000003
RBP: 00007f3c786c2320 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3c786c232c
R13: 0000000000000000 R14: 00007ffc8a220310 R15: 00007ffc8a2203f8
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.464 msecs
---
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 syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [syzbot] [wireless?] WARNING in rate_control_rate_init 2023-11-25 13:21 [syzbot] [crypto?] INFO: task hung in hwrng_fillfn syzbot @ 2023-11-29 2:59 ` syzbot 0 siblings, 0 replies; 10+ messages in thread From: syzbot @ 2023-11-29 2:59 UTC (permalink / raw) To: linux-kernel For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org. *** Subject: [wireless?] WARNING in rate_control_rate_init Author: eadavis@qq.com please test WARNING in rate_control_rate_init #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2332e0ab53 diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 606b1b2e4123..13d52452a124 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1796,7 +1796,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, !params->supported_rates_len && !params->ht_capa && !params->vht_capa && !params->he_capa && !params->eht_capa && - !params->opmode_notif_used) + !params->opmode_notif_used && 0) return 0; if (!link || !link_sta) @@ -1817,6 +1817,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, } else if (new_link) { return -EINVAL; } + printk("b, %p \n", rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf)); if (params->txpwr_set) { link_sta->pub->txpwr.type = params->txpwr.type; @@ -1868,6 +1869,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, params->opmode_notif, sband->band); } + printk("e, %p \n", rcu_access_pointer(sdata->vif.bss_conf.chanctx_conf)); return ret; } @@ -1982,6 +1984,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->listen_interval >= 0) sta->listen_interval = params->listen_interval; + printk("b, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); ret = sta_link_apply_parameters(local, sta, false, ¶ms->link_sta_params); if (ret) @@ -1996,6 +2002,10 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->airtime_weight) sta->airtime_weight = params->airtime_weight; + printk("a, stp: %d, sa: %d, src: %d\n", + test_sta_flag(sta, WLAN_STA_TDLS_PEER), + test_sta_flag(sta, WLAN_STA_ASSOC), + test_sta_flag(sta, WLAN_STA_RATE_CONTROL)); /* set the STA state after all sta info from usermode has been set */ if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) || set & BIT(NL80211_STA_FLAG_ASSOCIATED)) { ^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-11-29 11:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-02 15:15 [syzbot] [wireless?] WARNING in rate_control_rate_init (2) syzbot
2023-11-28 23:57 ` syzbot
2023-11-29 3:06 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot
2023-11-29 4:04 ` syzbot
[not found] ` <tencent_0CCA1979CFA30DC8A5CF8DDC92365DCE5D07@qq.com>
2023-11-29 6:57 ` [PATCH] wifi: mac80211: sband's null check should precede params Johannes Berg
[not found] ` <tencent_DE78F66DB82F496F9894B8E826EC8ACE0C0A@qq.com>
2023-11-29 8:33 ` Johannes Berg
[not found] ` <tencent_6E9CA7EF46E452C90650899D2ECFEEFE4C06@qq.com>
2023-11-29 9:15 ` Johannes Berg
2023-11-29 11:04 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot
2023-11-29 11:26 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2023-11-25 13:21 [syzbot] [crypto?] INFO: task hung in hwrng_fillfn syzbot
2023-11-29 2:59 ` [syzbot] [wireless?] WARNING in rate_control_rate_init syzbot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox