Commit 42fc5124 authored by Ben Hutchings's avatar Ben Hutchings Committed by Willy Tarreau
Browse files

ppp, slip: Validate VJ compression slot parameters completely



commit 4ab42d78 upstream.

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: default avatar郭永刚 <guoyonggang@360.cn>
References: http://article.gmane.org/gmane.comp.security.oss.general/17908


Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
[bwh: Backported to 2.6.32: adjust filenames, context, indentation]
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 1debe900
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment