* [PATCH] mac80211: fail authentication when AP denied authentication
@ 2012-05-13 15:07 Eliad Peller
2012-05-29 7:18 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Eliad Peller @ 2012-05-13 15:07 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
ieee80211_rx_mgmt_auth() doesn't handle denied authentication
properly - it authenticates the station and waits for association
(for 5 seconds) instead of failing the authentication.
Fix it by destroying auth_data and bailing out instead.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
net/mac80211/mlme.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index dbd4bd9..2b5235e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1790,7 +1790,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
if (status_code != WLAN_STATUS_SUCCESS) {
printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n",
sdata->name, mgmt->sa, status_code);
- goto out;
+ ieee80211_destroy_auth_data(sdata, false);
+ return RX_MGMT_CFG80211_RX_AUTH;
}
switch (ifmgd->auth_data->algorithm) {
@@ -1812,7 +1813,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
}
printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
- out:
ifmgd->auth_data->done = true;
ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
run_again(ifmgd, ifmgd->auth_data->timeout);
--
1.7.6.401.g6a319
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fail authentication when AP denied authentication
2012-05-13 15:07 [PATCH] mac80211: fail authentication when AP denied authentication Eliad Peller
@ 2012-05-29 7:18 ` Johannes Berg
2012-05-29 8:39 ` Eliad Peller
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-05-29 7:18 UTC (permalink / raw)
To: Eliad Peller; +Cc: linux-wireless
On Sun, 2012-05-13 at 18:07 +0300, Eliad Peller wrote:
> ieee80211_rx_mgmt_auth() doesn't handle denied authentication
> properly - it authenticates the station and waits for association
> (for 5 seconds) instead of failing the authentication.
>
> Fix it by destroying auth_data and bailing out instead.
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable now that this code shipped in 3.4? (or didn't it?)
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
> net/mac80211/mlme.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index dbd4bd9..2b5235e 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1790,7 +1790,8 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
> if (status_code != WLAN_STATUS_SUCCESS) {
> printk(KERN_DEBUG "%s: %pM denied authentication (status %d)\n",
> sdata->name, mgmt->sa, status_code);
> - goto out;
> + ieee80211_destroy_auth_data(sdata, false);
> + return RX_MGMT_CFG80211_RX_AUTH;
> }
>
> switch (ifmgd->auth_data->algorithm) {
> @@ -1812,7 +1813,6 @@ ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
> }
>
> printk(KERN_DEBUG "%s: authenticated\n", sdata->name);
> - out:
> ifmgd->auth_data->done = true;
> ifmgd->auth_data->timeout = jiffies + IEEE80211_AUTH_WAIT_ASSOC;
> run_again(ifmgd, ifmgd->auth_data->timeout);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fail authentication when AP denied authentication
2012-05-29 7:18 ` Johannes Berg
@ 2012-05-29 8:39 ` Eliad Peller
0 siblings, 0 replies; 3+ messages in thread
From: Eliad Peller @ 2012-05-29 8:39 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, John Linville
On Tue, May 29, 2012 at 10:18 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Sun, 2012-05-13 at 18:07 +0300, Eliad Peller wrote:
>> ieee80211_rx_mgmt_auth() doesn't handle denied authentication
>> properly - it authenticates the station and waits for association
>> (for 5 seconds) instead of failing the authentication.
>>
>> Fix it by destroying auth_data and bailing out instead.
>
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
>
> Cc: stable now that this code shipped in 3.4? (or didn't it?)
>
yep.
Cc: stable@vger.kernel.org #3.4
(John - i can resend if you prefer)
Eliad.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-29 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 15:07 [PATCH] mac80211: fail authentication when AP denied authentication Eliad Peller
2012-05-29 7:18 ` Johannes Berg
2012-05-29 8:39 ` Eliad Peller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).