ATM: Check IP header validity in mpc_send_packet
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 11 Jan 2008 09:10:42 +0000 (01:10 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 20:01:22 +0000 (12:01 -0800)
commita745dba38eb58bf95ddab73121a7f44116a9f5b3
treec7e685f5199688b9895eb81e5a25e00e34c08891
parent57a0a0d2c27d63176040b0a0f5c8a73f4f62ec99
ATM: Check IP header validity in mpc_send_packet

[ATM]: Check IP header validity in mpc_send_packet

[ Upstream commit: 1c9b7aa1eb40ab708ef3242f74b9a61487623168 ]

Al went through the ip_fast_csum callers and found this piece of code
that did not validate the IP header.  While root crashing the machine
by sending bogus packets through raw or AF_PACKET sockets isn't that
serious, it is still nice to react gracefully.

This patch ensures that the skb has enough data for an IP header and
that the header length field is valid.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/atm/mpc.c