* [PATCH net] pppoe: drop discovery frames with no MAC header
@ 2026-10-23 8:00 Qingfang Deng
2026-10-26 17:34 ` Simon Horman
2026-10-27 0:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Qingfang Deng @ 2026-10-23 8:00 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Qingfang Deng, Simon Horman, Eric Woudstra,
Felix Fietkau, Asim Viladi Oglu Manizada, Guillaume Nault,
netdev, linux-kernel
Commit 8540827ebac6 ("pppoe: fix reception of frames with no mac
header") drops PPPoE session frames with no MAC header to avoid reading
uninitialized memory.
Apply the same to PPPoE discovery frames, as both functions read
eth_hdr(skb)->h_source.
Found by LLM static analysis, and reproduced using the same TUN
injection as described in the mentioned commit.
Fixes: 8540827ebac6 ("pppoe: fix reception of frames with no mac header")
Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
---
drivers/net/ppp/pppoe.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index ee0e318d6a2a..bdaa8cf8404b 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -460,6 +460,9 @@ static int pppoe_disc_rcv(struct sk_buff *skb, struct net_device *dev,
if (skb->pkt_type != PACKET_HOST)
goto abort;
+ if (skb_mac_header_len(skb) < ETH_HLEN)
+ goto abort;
+
if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
goto abort;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] pppoe: drop discovery frames with no MAC header
2026-10-23 8:00 [PATCH net] pppoe: drop discovery frames with no MAC header Qingfang Deng
@ 2026-10-26 17:34 ` Simon Horman
2026-10-27 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2026-10-26 17:34 UTC (permalink / raw)
To: Qingfang Deng
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Eric Woudstra, Felix Fietkau,
Asim Viladi Oglu Manizada, Guillaume Nault, netdev, linux-kernel
On Fri, Oct 23, 2026 at 04:00:00PM +0800, Qingfang Deng wrote:
> Commit 8540827ebac6 ("pppoe: fix reception of frames with no mac
> header") drops PPPoE session frames with no MAC header to avoid reading
> uninitialized memory.
>
> Apply the same to PPPoE discovery frames, as both functions read
> eth_hdr(skb)->h_source.
>
> Found by LLM static analysis, and reproduced using the same TUN
> injection as described in the mentioned commit.
>
> Fixes: 8540827ebac6 ("pppoe: fix reception of frames with no mac header")
> Signed-off-by: Qingfang Deng <qingfang.deng@linux.dev>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] pppoe: drop discovery frames with no MAC header
2026-10-23 8:00 [PATCH net] pppoe: drop discovery frames with no MAC header Qingfang Deng
2026-10-26 17:34 ` Simon Horman
@ 2026-10-27 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-27 0:00 UTC (permalink / raw)
To: Qingfang Deng
Cc: andrew+netdev, davem, edumazet, kuba, pabeni, horms, ericwouds,
nbd, manizada, gnault, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 23 Oct 2026 16:00:00 +0800 you wrote:
> Commit 8540827ebac6 ("pppoe: fix reception of frames with no mac
> header") drops PPPoE session frames with no MAC header to avoid reading
> uninitialized memory.
>
> Apply the same to PPPoE discovery frames, as both functions read
> eth_hdr(skb)->h_source.
>
> [...]
Here is the summary with links:
- [net] pppoe: drop discovery frames with no MAC header
https://git.kernel.org/netdev/net/c/406bf2dc8d6d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-27 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 8:00 [PATCH net] pppoe: drop discovery frames with no MAC header Qingfang Deng
2026-10-26 17:34 ` Simon Horman
2026-10-27 0:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®