* [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
@ 2022-03-29 15:02 ` Karthikeyan Kathirvel
0 siblings, 0 replies; 8+ messages in thread
From: Karthikeyan Kathirvel @ 2022-03-29 15:02 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Karthikeyan Kathirvel
The maximum number of SSIDs in a for active probe requests is currently
reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
The scan_req_params structure only has the capacity to hold 10 SSIDs.
This leads to a buffer overflow which can be triggered from
wpa_supplicant in userspace. When copying the SSIDs into the
scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
overwrite the extraie pointer.
Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
request will be sent, so totally 64 probe requests supported. So
set both max ssid and bssid to 16 and 4 respectively. Remove the
redundant macros of ssid and bssid.
Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
---
drivers/net/wireless/ath/ath11k/wmi.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 587f42307250..b5b72483477d 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -3088,9 +3088,6 @@ enum scan_dwelltime_adaptive_mode {
SCAN_DWELL_MODE_STATIC = 4
};
-#define WLAN_SCAN_MAX_NUM_SSID 10
-#define WLAN_SCAN_MAX_NUM_BSSID 10
-
#define WLAN_SSID_MAX_LEN 32
struct element_info {
@@ -3105,7 +3102,6 @@ struct wlan_ssid {
#define WMI_IE_BITMAP_SIZE 8
-#define WMI_SCAN_MAX_NUM_SSID 0x0A
/* prefix used by scan requestor ids on the host */
#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
@@ -3113,10 +3109,6 @@ struct wlan_ssid {
/* host cycles through the lower 12 bits to generate ids */
#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
-#define WLAN_SCAN_PARAMS_MAX_SSID 16
-#define WLAN_SCAN_PARAMS_MAX_BSSID 4
-#define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
-
/* Values lower than this may be refused by some firmware revisions with a scan
* completion with a timedout reason.
*/
@@ -3312,8 +3304,8 @@ struct scan_req_params {
u32 n_probes;
u32 *chan_list;
u32 notify_scan_events;
- struct wlan_ssid ssid[WLAN_SCAN_MAX_NUM_SSID];
- struct wmi_mac_addr bssid_list[WLAN_SCAN_MAX_NUM_BSSID];
+ struct wlan_ssid ssid[WLAN_SCAN_PARAMS_MAX_SSID];
+ struct wmi_mac_addr bssid_list[WLAN_SCAN_PARAMS_MAX_BSSID];
struct element_info extraie;
struct element_info htcap;
struct element_info vhtcap;
base-commit: 1198cbe26aa57ebef7a5c4315260d2e93a93e9a6
--
2.23.0
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
@ 2022-03-29 15:02 ` Karthikeyan Kathirvel
0 siblings, 0 replies; 8+ messages in thread
From: Karthikeyan Kathirvel @ 2022-03-29 15:02 UTC (permalink / raw)
To: ath11k; +Cc: linux-wireless, Karthikeyan Kathirvel
The maximum number of SSIDs in a for active probe requests is currently
reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
The scan_req_params structure only has the capacity to hold 10 SSIDs.
This leads to a buffer overflow which can be triggered from
wpa_supplicant in userspace. When copying the SSIDs into the
scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
overwrite the extraie pointer.
Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
request will be sent, so totally 64 probe requests supported. So
set both max ssid and bssid to 16 and 4 respectively. Remove the
redundant macros of ssid and bssid.
Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
---
drivers/net/wireless/ath/ath11k/wmi.h | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index 587f42307250..b5b72483477d 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -3088,9 +3088,6 @@ enum scan_dwelltime_adaptive_mode {
SCAN_DWELL_MODE_STATIC = 4
};
-#define WLAN_SCAN_MAX_NUM_SSID 10
-#define WLAN_SCAN_MAX_NUM_BSSID 10
-
#define WLAN_SSID_MAX_LEN 32
struct element_info {
@@ -3105,7 +3102,6 @@ struct wlan_ssid {
#define WMI_IE_BITMAP_SIZE 8
-#define WMI_SCAN_MAX_NUM_SSID 0x0A
/* prefix used by scan requestor ids on the host */
#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
@@ -3113,10 +3109,6 @@ struct wlan_ssid {
/* host cycles through the lower 12 bits to generate ids */
#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
-#define WLAN_SCAN_PARAMS_MAX_SSID 16
-#define WLAN_SCAN_PARAMS_MAX_BSSID 4
-#define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
-
/* Values lower than this may be refused by some firmware revisions with a scan
* completion with a timedout reason.
*/
@@ -3312,8 +3304,8 @@ struct scan_req_params {
u32 n_probes;
u32 *chan_list;
u32 notify_scan_events;
- struct wlan_ssid ssid[WLAN_SCAN_MAX_NUM_SSID];
- struct wmi_mac_addr bssid_list[WLAN_SCAN_MAX_NUM_BSSID];
+ struct wlan_ssid ssid[WLAN_SCAN_PARAMS_MAX_SSID];
+ struct wmi_mac_addr bssid_list[WLAN_SCAN_PARAMS_MAX_BSSID];
struct element_info extraie;
struct element_info htcap;
struct element_info vhtcap;
base-commit: 1198cbe26aa57ebef7a5c4315260d2e93a93e9a6
--
2.23.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
2022-03-29 15:02 ` Karthikeyan Kathirvel
@ 2022-04-01 11:55 ` Kalle Valo
-1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-04-01 11:55 UTC (permalink / raw)
To: Karthikeyan Kathirvel; +Cc: ath11k, linux-wireless
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:
> The maximum number of SSIDs in a for active probe requests is currently
> reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So
> set both max ssid and bssid to 16 and 4 respectively. Remove the
> redundant macros of ssid and bssid.
>
> Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
This is not correct format:
https://wireless.wiki.kernel.org/en/users/drivers/ath11k/submittingpatches#tested-on_tag
On what hardware did you test this? I can then fix the tag.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
@ 2022-04-01 11:55 ` Kalle Valo
0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-04-01 11:55 UTC (permalink / raw)
To: Karthikeyan Kathirvel; +Cc: ath11k, linux-wireless
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:
> The maximum number of SSIDs in a for active probe requests is currently
> reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So
> set both max ssid and bssid to 16 and 4 respectively. Remove the
> redundant macros of ssid and bssid.
>
> Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
This is not correct format:
https://wireless.wiki.kernel.org/en/users/drivers/ath11k/submittingpatches#tested-on_tag
On what hardware did you test this? I can then fix the tag.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
2022-04-01 11:55 ` Kalle Valo
@ 2022-04-01 11:58 ` Karthikeyan Kathirvel
-1 siblings, 0 replies; 8+ messages in thread
From: Karthikeyan Kathirvel @ 2022-04-01 11:58 UTC (permalink / raw)
To: Kalle Valo, Karthikeyan Kathirvel (QUIC)
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Hi Kalle,
Sorry I missed to add the hw details, I tested on IPQ8074 hw2.0 AHB
Thanks
Karthikeyan
-----Original Message-----
From: Kalle Valo <kvalo@kernel.org>
Sent: Friday, April 1, 2022 5:25 PM
To: Karthikeyan Kathirvel (QUIC) <quic_kathirve@quicinc.com>
Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:
> The maximum number of SSIDs in a for active probe requests is
> currently reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So set
> both max ssid and bssid to 16 and 4 respectively. Remove the redundant
> macros of ssid and bssid.
>
> Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
This is not correct format:
https://wireless.wiki.kernel.org/en/users/drivers/ath11k/submittingpatches#tested-on_tag
On what hardware did you test this? I can then fix the tag.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
@ 2022-04-01 11:58 ` Karthikeyan Kathirvel
0 siblings, 0 replies; 8+ messages in thread
From: Karthikeyan Kathirvel @ 2022-04-01 11:58 UTC (permalink / raw)
To: Kalle Valo, Karthikeyan Kathirvel (QUIC)
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org
Hi Kalle,
Sorry I missed to add the hw details, I tested on IPQ8074 hw2.0 AHB
Thanks
Karthikeyan
-----Original Message-----
From: Kalle Valo <kvalo@kernel.org>
Sent: Friday, April 1, 2022 5:25 PM
To: Karthikeyan Kathirvel (QUIC) <quic_kathirve@quicinc.com>
Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> writes:
> The maximum number of SSIDs in a for active probe requests is
> currently reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So set
> both max ssid and bssid to 16 and 4 respectively. Remove the redundant
> macros of ssid and bssid.
>
> Tested-on : WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1 v1
This is not correct format:
https://wireless.wiki.kernel.org/en/users/drivers/ath11k/submittingpatches#tested-on_tag
On what hardware did you test this? I can then fix the tag.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
2022-03-29 15:02 ` Karthikeyan Kathirvel
@ 2022-04-05 8:09 ` Kalle Valo
-1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-04-05 8:09 UTC (permalink / raw)
To: Karthikeyan Kathirvel; +Cc: ath11k, linux-wireless, Karthikeyan Kathirvel
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> wrote:
> The maximum number of SSIDs in a for active probe requests is currently
> reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So
> set both max ssid and bssid to 16 and 4 respectively. Remove the
> redundant macros of ssid and bssid.
>
> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
50dc9ce9f805 ath11k: Change max no of active probe SSID and BSSID to fw capability
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220329150221.21907-1-quic_kathirve@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability
@ 2022-04-05 8:09 ` Kalle Valo
0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-04-05 8:09 UTC (permalink / raw)
To: Karthikeyan Kathirvel; +Cc: ath11k, linux-wireless, Karthikeyan Kathirvel
Karthikeyan Kathirvel <quic_kathirve@quicinc.com> wrote:
> The maximum number of SSIDs in a for active probe requests is currently
> reported as 16 (WLAN_SCAN_PARAMS_MAX_SSID) when registering the driver.
> The scan_req_params structure only has the capacity to hold 10 SSIDs.
> This leads to a buffer overflow which can be triggered from
> wpa_supplicant in userspace. When copying the SSIDs into the
> scan_req_params structure in the ath11k_mac_op_hw_scan route, it can
> overwrite the extraie pointer.
>
> Firmware supports 16 ssid * 4 bssid, for each ssid 4 bssid combo probe
> request will be sent, so totally 64 probe requests supported. So
> set both max ssid and bssid to 16 and 4 respectively. Remove the
> redundant macros of ssid and bssid.
>
> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01300-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
50dc9ce9f805 ath11k: Change max no of active probe SSID and BSSID to fw capability
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220329150221.21907-1-quic_kathirve@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-04-05 8:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29 15:02 [PATCH] ath11k: Change max no of active probe SSID and BSSID to fw capability Karthikeyan Kathirvel
2022-03-29 15:02 ` Karthikeyan Kathirvel
2022-04-01 11:55 ` Kalle Valo
2022-04-01 11:55 ` Kalle Valo
2022-04-01 11:58 ` Karthikeyan Kathirvel
2022-04-01 11:58 ` Karthikeyan Kathirvel
2022-04-05 8:09 ` Kalle Valo
2022-04-05 8:09 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.