* [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling
@ 2021-07-10 18:37 Davis Mosenkovs
2021-07-15 11:55 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Davis Mosenkovs @ 2021-07-10 18:37 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, stable, Davis Mosenkovs
Commit e3d4030498c3 ("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: e3d4030498c3 ("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.4.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 bde924968cd2..b5848bcc09eb 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2234,7 +2234,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] 4+ messages in thread
* Re: [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling
2021-07-10 18:37 [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling Davis Mosenkovs
@ 2021-07-15 11:55 ` Greg KH
2021-07-15 22:02 ` Davis
0 siblings, 1 reply; 4+ 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:37:10PM +0300, Davis Mosenkovs wrote:
> Commit e3d4030498c3 ("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.
So this is also needed in 4.9 and 4.14, right? If so, now queued up
everywhere. If not, please let me know so I can drop it from the other
trees.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling
2021-07-15 11:55 ` Greg KH
@ 2021-07-15 22:02 ` Davis
2021-07-19 12:40 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Davis @ 2021-07-15 22:02 UTC (permalink / raw)
To: Greg KH; +Cc: Johannes Berg, linux-wireless, stable
On 2021-07-15 at 15:36 Greg KH (<greg@kroah.com>) wrote:
>
> On Sat, Jul 10, 2021 at 09:37:10PM +0300, Davis Mosenkovs wrote:
> > Commit e3d4030498c3 ("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.
>
> So this is also needed in 4.9 and 4.14, right? If so, now queued up
> everywhere. If not, please let me know so I can drop it from the other
> trees.
>
> thanks,
>
> greg k-h
Thank you! Yes - this is needed in 4.4, 4.9 and 4.14.
Only line offsets and commit messages (they contain references to
backport commits introducing the issue) differ between kernel versions
and I see the patches are queued with correct line offsets.
Patches for 4.9
(https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.9/mac80211-fix-memory-corruption-in-eapol-handling.patch)
and 4.14 (https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.14/mac80211-fix-memory-corruption-in-eapol-handling.patch)
still contain 4.4 in the cc line in sign-off section. Also these
patches contain reference to commit e3d4030498c3 that is from 4.4
branch. Is this OK?
Br,
Davis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling
2021-07-15 22:02 ` Davis
@ 2021-07-19 12:40 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-07-19 12:40 UTC (permalink / raw)
To: Davis; +Cc: Johannes Berg, linux-wireless, stable
On Fri, Jul 16, 2021 at 01:02:06AM +0300, Davis wrote:
> On 2021-07-15 at 15:36 Greg KH (<greg@kroah.com>) wrote:
> >
> > On Sat, Jul 10, 2021 at 09:37:10PM +0300, Davis Mosenkovs wrote:
> > > Commit e3d4030498c3 ("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.
> >
> > So this is also needed in 4.9 and 4.14, right? If so, now queued up
> > everywhere. If not, please let me know so I can drop it from the other
> > trees.
> >
> > thanks,
> >
> > greg k-h
>
> Thank you! Yes - this is needed in 4.4, 4.9 and 4.14.
> Only line offsets and commit messages (they contain references to
> backport commits introducing the issue) differ between kernel versions
> and I see the patches are queued with correct line offsets.
> Patches for 4.9
> (https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.9/mac80211-fix-memory-corruption-in-eapol-handling.patch)
> and 4.14 (https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-4.14/mac80211-fix-memory-corruption-in-eapol-handling.patch)
> still contain 4.4 in the cc line in sign-off section. Also these
> patches contain reference to commit e3d4030498c3 that is from 4.4
> branch. Is this OK?
It's fine :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-19 12:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-10 18:37 [PATCH 4.4] mac80211: fix memory corruption in EAPOL handling Davis Mosenkovs
2021-07-15 11:55 ` Greg KH
2021-07-15 22:02 ` Davis
2021-07-19 12:40 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox