Files
linux/net/ipv4
Stefan Nuernberger 1d982ccf0e net/ipv4: defensive cipso option parsing
commit 076ed3da0c upstream.

commit 40413955ee ("Cipso: cipso_v4_optptr enter infinite loop") fixed
a possible infinite loop in the IP option parsing of CIPSO. The fix
assumes that ip_options_compile filtered out all zero length options and
that no other one-byte options beside IPOPT_END and IPOPT_NOOP exist.
While this assumption currently holds true, add explicit checks for zero
length and invalid length options to be safe for the future. Even though
ip_options_compile should have validated the options, the introduction of
new one-byte options can still confuse this code without the additional
checks.

Signed-off-by: Stefan Nuernberger <snu@amazon.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Simon Veith <sveith@amazon.de>
Cc: stable@vger.kernel.org
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:15:04 -08:00
..
2018-04-12 12:32:22 +02:00
2018-07-22 14:28:44 +02:00
2018-07-28 07:55:41 +02:00
2018-11-04 14:52:50 +01:00
2017-10-12 22:57:11 -07:00
2017-10-21 01:33:19 +01:00
2013-05-31 17:19:05 -07:00