From: Ben Hutchings Date: Sun, 1 Nov 2015 16:22:53 +0000 (+0000) Subject: ppp, slip: Validate VJ compression slot parameters completely X-Git-Tag: v3.2.75~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df085f1cb3acd3d75408ff94f366983873bce7d2;p=pandora-kernel.git ppp, slip: Validate VJ compression slot parameters completely commit 4ab42d78e37a294ac7bc56901d563c642e03c4ae 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: 郭永刚 References: http://article.gmane.org/gmane.comp.security.oss.general/17908 Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller [bwh: Backported to 3.2: adjust indentation] --- Reading git-diff-tree failed