All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.14] mac80211: fix memory corruption in EAPOL handling
@ 2021-07-10 18:38 Davis Mosenkovs
  2021-07-15 11:55 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Davis Mosenkovs @ 2021-07-10 18:38 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, stable, Davis Mosenkovs

Commit 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL
frames") uses skb_mac_header() before eth_type_trans() is called
leading to incorrect pointer, the pointer gets written to. This issue
has appeared during backporting to 4.4, 4.9 and 4.14.

Fixes: 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL frames")
Link: https://lore.kernel.org/r/CAHQn7pKcyC_jYmGyTcPCdk9xxATwW5QPNph=bsZV8d-HPwNsyA@mail.gmail.com
Cc: <stable@vger.kernel.org> # 4.14.x
Signed-off-by: Davis Mosenkovs <davis@mosenkovs.lv>
---
 net/mac80211/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index ac2c52709e1c..87926c6fe0bf 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2404,7 +2404,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
 #endif
 
 	if (skb) {
-		struct ethhdr *ehdr = (void *)skb_mac_header(skb);
+		struct ethhdr *ehdr = (struct ethhdr *)skb->data;
 
 		/* deliver to local stack */
 		skb->protocol = eth_type_trans(skb, dev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.14] mac80211: fix memory corruption in EAPOL handling
  2021-07-10 18:38 [PATCH 4.14] mac80211: fix memory corruption in EAPOL handling Davis Mosenkovs
@ 2021-07-15 11:55 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-07-15 11:55 UTC (permalink / raw)
  To: Davis Mosenkovs; +Cc: johannes, linux-wireless, stable

On Sat, Jul 10, 2021 at 09:38:07PM +0300, Davis Mosenkovs wrote:
> Commit 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL
> frames") uses skb_mac_header() before eth_type_trans() is called
> leading to incorrect pointer, the pointer gets written to. This issue
> has appeared during backporting to 4.4, 4.9 and 4.14.
> 
> Fixes: 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL frames")
> Link: https://lore.kernel.org/r/CAHQn7pKcyC_jYmGyTcPCdk9xxATwW5QPNph=bsZV8d-HPwNsyA@mail.gmail.com
> Cc: <stable@vger.kernel.org> # 4.14.x
> Signed-off-by: Davis Mosenkovs <davis@mosenkovs.lv>
> ---
>  net/mac80211/rx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Ah, see your other backports now, nice, all now is good.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 4.14] mac80211: fix memory corruption in EAPOL handling
@ 2021-07-07 21:38 Davis Mosenkovs
  0 siblings, 0 replies; 3+ messages in thread
From: Davis Mosenkovs @ 2021-07-07 21:38 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Davis Mosenkovs

Commit 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL
frames") uses skb_mac_header() before eth_type_trans() is called
leading to incorrect pointer, the pointer gets written to. This issue
has appeared during backporting to 4.4, 4.9 and 4.14.

Fixes: 557bb37533a3 ("mac80211: do not accept/forward invalid EAPOL frames")
Link: https://lore.kernel.org/r/CAHQn7pKcyC_jYmGyTcPCdk9xxATwW5QPNph=bsZV8d-HPwNsyA@mail.gmail.com
Signed-off-by: Davis Mosenkovs <davis@mosenkovs.lv>
---
 net/mac80211/rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index ac2c52709e1c..87926c6fe0bf 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2404,7 +2404,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
 #endif
 
 	if (skb) {
-		struct ethhdr *ehdr = (void *)skb_mac_header(skb);
+		struct ethhdr *ehdr = (struct ethhdr *)skb->data;
 
 		/* deliver to local stack */
 		skb->protocol = eth_type_trans(skb, dev);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-15 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-10 18:38 [PATCH 4.14] mac80211: fix memory corruption in EAPOL handling Davis Mosenkovs
2021-07-15 11:55 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2021-07-07 21:38 Davis Mosenkovs

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.