linux/drivers/net/slip
Ben Hutchings a50a93cc99 ppp, slip: Validate VJ compression slot parameters completely
[ Upstream commit 4ab42d78e3 ]

Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).

Add a range-check at the top of the function and make it return an
ERR_PTR() on error instead of NULL.  Change the callers accordingly.

Compile-tested only.

Reported-by: 郭永刚 <guoyonggang@360.cn>
References: http://article.gmane.org/gmane.comp.security.oss.general/17908
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2016-01-31 11:23:37 -08:00
..
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile slip: Move the SLIP drivers 2011-08-27 00:58:36 -07:00
slhc.c ppp, slip: Validate VJ compression slot parameters completely 2016-01-31 11:23:37 -08:00
slip.c ppp, slip: Validate VJ compression slot parameters completely 2016-01-31 11:23:37 -08:00
slip.h slip: Fix deadlock in write_wakeup 2014-06-16 21:29:12 -07:00