🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Qingfang Deng Fri, 23 Oct 2026 08:00
[PATCH net] pppoe: drop discovery frames with no MAC header
#6724
Author: Qingfang Deng
Date: Fri, 23 Oct 2026 08:00
33 lines
8787 bytes
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
Re: [PATCH net] pppoe: drop discovery frames with no MAC header
#7592
Author: Simon Horman
Date: Mon, 26 Oct 2026 17:34
16 lines
8431 bytes
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>
Re: [PATCH net] pppoe: drop discovery frames with no MAC header
#7687
Author: patchwork-bot+netdevbpf
Date: Tue, 27 Oct 2026 00:00
24 lines
8598 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads