projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[IPX]: Header length validation needed
[powerpc.git]
/
net
/
ipx
/
af_ipx.c
diff --git
a/net/ipx/af_ipx.c
b/net/ipx/af_ipx.c
index
aa34ff4
..
c13e86b
100644
(file)
--- 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
ipx_pktsize = ntohs(ipx->ipx_pktsize);
/* Too small or invalid header? */
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 &&
goto drop;
if (ipx->ipx_checksum != IPX_NO_CHECKSUM &&