lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 8 Jun 2008 16:29:13 +1000
From:	Herbert Xu <>
To:	"David S. Miller" <>,
Subject: pppoe: Unshare skb before anything else

Hi Dave:

I noticed that my last patch to move the unshare in pppoe missed
the other spot which did the same thing:

pppoe: Unshare skb before anything else

We need to unshare the skb first as otherwise pskb_may_pull may
write to a shared skb which could be bad.

Signed-off-by: Herbert Xu <>

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <>
Home Page:
PGP Key:
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 58a26a4..3586d4a 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -427,12 +427,12 @@ static int pppoe_disc_rcv(struct sk_buff *skb,
 	if (dev_net(dev) != &init_net)
 		goto abort;
-	if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
-		goto abort;
 	if (!(skb = skb_share_check(skb, GFP_ATOMIC)))
 		goto out;
+	if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
+		goto abort;
 	ph = pppoe_hdr(skb);
 	if (ph->code != PADT_CODE)
 		goto abort;
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists