PPPOE skb leak

flat view

From: David S. Miller <hidden>
Date: 2003-11-25 03:54:53

PPPOE packet reception does not check the return value of
sock_queue_rcv_skb() and therefore can leak packets.

Here is the fix I've installed.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1486  -> 1.1487 
#	 drivers/net/pppoe.c	1.35    -> 1.36   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/24	davem@nuts.ninka.net	1.1487
# [PPPOE]: Do not leak SKB if sock_queue_rcv_skb() fails.
# --------------------------------------------
#
diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c
--- a/drivers/net/pppoe.c	Mon Nov 24 19:50:44 2003
+++ b/drivers/net/pppoe.c	Mon Nov 24 19:50:44 2003
@@ -352,7 +352,8 @@
 		if (!__pppoe_xmit( relay_po->sk, skb))
 			goto abort_put;
 	} else {
-		sock_queue_rcv_skb(sk, skb);
+		if (sock_queue_rcv_skb(sk, skb))
+			goto abort_kfree;
 	}
 
 	return NET_RX_SUCCESS;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help