diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-08-07 23:09:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-07 23:09:20 -0400 |
commit | 8b5cc5ef40c83c6ea4c90b203bb2c8b17edfa11b (patch) | |
tree | 35b76d98988aabfc78a57342291b4be63bb04f99 /net/ipx | |
parent | d14cc9a342a8004b0ecfe66f1f12120962b61d8c (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>
Diffstat (limited to 'net/ipx')
-rw-r--r-- | net/ipx/af_ipx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index aa34ff4b707c..c13e86b14f69 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
@@ -1646,7 +1646,8 @@ static int ipx_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_ty | |||
1646 | ipx_pktsize = ntohs(ipx->ipx_pktsize); | 1646 | ipx_pktsize = ntohs(ipx->ipx_pktsize); |
1647 | 1647 | ||
1648 | /* Too small or invalid header? */ | 1648 | /* Too small or invalid header? */ |
1649 | if (ipx_pktsize < sizeof(struct ipxhdr) || ipx_pktsize > skb->len) | 1649 | if (ipx_pktsize < sizeof(struct ipxhdr) || |
1650 | !pskb_may_pull(skb, ipx_pktsize)) | ||
1650 | goto drop; | 1651 | goto drop; |
1651 | 1652 | ||
1652 | if (ipx->ipx_checksum != IPX_NO_CHECKSUM && | 1653 | if (ipx->ipx_checksum != IPX_NO_CHECKSUM && |