[PATCH OLK-5.10 0/1] CVE-2025-39957
Lachlan Hodges (1): wifi: mac80211: increase scan_ies_len for S1G net/mac80211/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.43.0
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/20644 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/TW4... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/20644 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/TW4...
From: Lachlan Hodges <lachlan.hodges@morsemicro.com> stable inclusion from stable-v6.6.108 commit 93e063f15e17acb8cd6ac90c8f0802c2624e1a74 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ID13FM CVE: CVE-2025-39957 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=... -------------------------------- [ Upstream commit 7e2f3213e85eba00acb4cfe6d71647892d63c3a1 ] Currently the S1G capability element is not taken into account for the scan_ies_len, which leads to a buffer length validation failure in ieee80211_prep_hw_scan() and subsequent WARN in __ieee80211_start_scan(). This prevents hw scanning from functioning. To fix ensure we accommodate for the S1G capability length. Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com> Link: https://patch.msgid.link/20250826085437.3493-1-lachlan.hodges@morsemicro.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Conflicts: net/mac80211/main.c [Yongqiang: Only fix context conflicts without commit 820acc810fb6] Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com> --- net/mac80211/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index ae90ac3be59aa..cdd9734b09a69 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -897,7 +897,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) int result, i; enum nl80211_band band; int channels, max_bitrates; - bool supp_ht, supp_vht, supp_he; + bool supp_ht, supp_vht, supp_he, supp_s1g; struct cfg80211_chan_def dflt_chandef = {}; if (ieee80211_hw_check(hw, QUEUE_CONTROL) && @@ -974,6 +974,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) supp_ht = false; supp_vht = false; supp_he = false; + supp_s1g = false; for (band = 0; band < NUM_NL80211_BANDS; band++) { struct ieee80211_supported_band *sband; @@ -1010,6 +1011,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) max_bitrates = sband->n_bitrates; supp_ht = supp_ht || sband->ht_cap.ht_supported; supp_vht = supp_vht || sband->vht_cap.vht_supported; + supp_s1g = supp_s1g || sband->s1g_cap.s1g; if (!supp_he) supp_he = !!ieee80211_get_he_sta_cap(sband); @@ -1122,6 +1124,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) local->scan_ies_len += 2 + sizeof(struct ieee80211_vht_cap); + if (supp_s1g) + local->scan_ies_len += 2 + sizeof(struct ieee80211_s1g_cap); + /* HE cap element is variable in size - set len to allow max size */ /* * TODO: 1 is added at the end of the calculation to accommodate for -- 2.43.0
participants (2)
-
patchwork bot -
Yongqiang Liu