mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
[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>
This commit is contained in:
parent
d14cc9a342
commit
8b5cc5ef40
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
ipx_pktsize = ntohs(ipx->ipx_pktsize);
|
||||||
|
|
||||||
/* Too small or invalid header? */
|
/* 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;
|
goto drop;
|
||||||
|
|
||||||
if (ipx->ipx_checksum != IPX_NO_CHECKSUM &&
|
if (ipx->ipx_checksum != IPX_NO_CHECKSUM &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue