aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-11-24 02:57:28 +0100
committerAdrian Bunk <bunk@stusta.de>2006-11-24 02:57:28 +0100
commit20e121b94529b4880c2ce0bd0b56d1d0c001db63 (patch)
tree59d05944f119c67da7b884fa902b4cbb2e5f0955 /net
parenta06ee75aa0005026f27609e7b656ca738b5153d8 (diff)
[IPX]: Header length validation needed
This patch will linearize and check there is enough data. It handles the pprop case as well as avoiding a whole audit of the routing code. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'net')
-rw-r--r--net/ipx/af_ipx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 2b72248022d8..30eaeb2b33a4 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1647,7 +1647,8 @@ static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty
ipx_pktsize = ntohs(ipx->ipx_pktsize);
/* Too small or invalid header? */
- if (ipx_pktsize < sizeof(struct ipxhdr) || ipx_pktsize > skb->len)
+ if (ipx_pktsize < sizeof(struct ipxhdr) ||
+ !pskb_may_pull(skb, ipx_pktsize))
goto drop;
if (ipx->ipx_checksum != IPX_NO_CHECKSUM &&