All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] pppoe: only process PADT targeted at local interfaces
@ 2020-05-14 10:15 Guillaume Nault
  2020-05-14 20:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Nault @ 2020-05-14 10:15 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski; +Cc: netdev, David Balažic

We don't want to disconnect a session because of a stray PADT arriving
while the interface is in promiscuous mode.
Furthermore, multicast and broadcast packets make no sense here, so
only PACKET_HOST is accepted.

Reported-by: David Balažic <xerces9@gmail.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 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 d760a36db28c..beedaad08255 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -490,6 +490,9 @@ static int pppoe_disc_rcv(struct sk_buff *skb, struct net_device *dev,
 	if (!skb)
 		goto out;
 
+	if (skb->pkt_type != PACKET_HOST)
+		goto abort;
+
 	if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
 		goto abort;
 
-- 
2.21.1


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

* Re: [PATCH net] pppoe: only process PADT targeted at local interfaces
  2020-05-14 10:15 [PATCH net] pppoe: only process PADT targeted at local interfaces Guillaume Nault
@ 2020-05-14 20:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-14 20:03 UTC (permalink / raw)
  To: gnault; +Cc: kuba, netdev, xerces9

From: Guillaume Nault <gnault@redhat.com>
Date: Thu, 14 May 2020 12:15:39 +0200

> We don't want to disconnect a session because of a stray PADT arriving
> while the interface is in promiscuous mode.
> Furthermore, multicast and broadcast packets make no sense here, so
> only PACKET_HOST is accepted.
> 
> Reported-by: David Balažic <xerces9@gmail.com>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Guillaume Nault <gnault@redhat.com>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2020-05-14 20:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 10:15 [PATCH net] pppoe: only process PADT targeted at local interfaces Guillaume Nault
2020-05-14 20:03 ` David Miller

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.