pppoe: drop discovery frames with no MAC header
Subsystems (3)
PATCH 1/1 pppoe: drop discovery frames with no MAC header
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.
--- drivers/net/ppp/pppoe.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ppp/pppoe.c +3 -0
@@ -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;
Signature · 1 line
2.43.0
Quoted 4 lines · Qingfang Deng
Commit
8540827ebac6("pppoe: fix reception of frames with no mac header") drops PPPoE session frames with no MAC header to avoid reading uninitialized memory.
Quoted 8 lines
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 <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html