Skip to content

Commit 9540984

Browse files
committed
Johannes Berg says: ==================== Couple of fixes: * iwlwifi: add two missing device entries * cfg80211: fix a potential out-of-bounds access * mac80211: fix format of TID to link mapping action frames * tag 'wireless-2025-05-06' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: add support for Killer on MTL wifi: mac80211: fix the type of status_code for negotiated TID to Link Mapping wifi: cfg80211: fix out-of-bounds access during multi-link element defragmentation ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 2e6259d + ebedf8b commit 9540984

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,8 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = {
588588
IWL_DEV_INFO(0x7A70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
589589
IWL_DEV_INFO(0x7AF0, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
590590
IWL_DEV_INFO(0x7AF0, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
591+
IWL_DEV_INFO(0x7F70, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
592+
IWL_DEV_INFO(0x7F70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
591593

592594
IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name),
593595
IWL_DEV_INFO(0x7E40, 0x1691, iwl_cfg_ma, iwl_ax411_killer_1690s_name),

include/linux/ieee80211.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ struct ieee80211_mgmt {
15261526
struct {
15271527
u8 action_code;
15281528
u8 dialog_token;
1529-
u8 status_code;
1529+
__le16 status_code;
15301530
u8 variable[];
15311531
} __packed ttlm_res;
15321532
struct {

net/mac80211/mlme.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7675,6 +7675,7 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
76757675
int hdr_len = offsetofend(struct ieee80211_mgmt, u.action.u.ttlm_res);
76767676
int ttlm_max_len = 2 + 1 + sizeof(struct ieee80211_ttlm_elem) + 1 +
76777677
2 * 2 * IEEE80211_TTLM_NUM_TIDS;
7678+
u16 status_code;
76787679

76797680
skb = dev_alloc_skb(local->tx_headroom + hdr_len + ttlm_max_len);
76807681
if (!skb)
@@ -7697,19 +7698,18 @@ ieee80211_send_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
76977698
WARN_ON(1);
76987699
fallthrough;
76997700
case NEG_TTLM_RES_REJECT:
7700-
mgmt->u.action.u.ttlm_res.status_code =
7701-
WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING;
7701+
status_code = WLAN_STATUS_DENIED_TID_TO_LINK_MAPPING;
77027702
break;
77037703
case NEG_TTLM_RES_ACCEPT:
7704-
mgmt->u.action.u.ttlm_res.status_code = WLAN_STATUS_SUCCESS;
7704+
status_code = WLAN_STATUS_SUCCESS;
77057705
break;
77067706
case NEG_TTLM_RES_SUGGEST_PREFERRED:
7707-
mgmt->u.action.u.ttlm_res.status_code =
7708-
WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED;
7707+
status_code = WLAN_STATUS_PREF_TID_TO_LINK_MAPPING_SUGGESTED;
77097708
ieee80211_neg_ttlm_add_suggested_map(skb, neg_ttlm);
77107709
break;
77117710
}
77127711

7712+
mgmt->u.action.u.ttlm_res.status_code = cpu_to_le16(status_code);
77137713
ieee80211_tx_skb(sdata, skb);
77147714
}
77157715

@@ -7875,7 +7875,7 @@ void ieee80211_process_neg_ttlm_res(struct ieee80211_sub_if_data *sdata,
78757875
* This can be better implemented in the future, to handle request
78767876
* rejections.
78777877
*/
7878-
if (mgmt->u.action.u.ttlm_res.status_code != WLAN_STATUS_SUCCESS)
7878+
if (le16_to_cpu(mgmt->u.action.u.ttlm_res.status_code) != WLAN_STATUS_SUCCESS)
78797879
__ieee80211_disconnect(sdata);
78807880
}
78817881

net/wireless/scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2681,7 +2681,7 @@ cfg80211_defrag_mle(const struct element *mle, const u8 *ie, size_t ielen,
26812681
/* Required length for first defragmentation */
26822682
buf_len = mle->datalen - 1;
26832683
for_each_element(elem, mle->data + mle->datalen,
2684-
ielen - sizeof(*mle) + mle->datalen) {
2684+
ie + ielen - mle->data - mle->datalen) {
26852685
if (elem->id != WLAN_EID_FRAGMENT)
26862686
break;
26872687

0 commit comments

Comments
 (0)