From: Kees Cook Date: Tue, 17 Feb 2015 21:48:00 +0000 (-0800) Subject: seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~62^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=580c57f1076872ebc2427f898b927944ce170f2d;p=pandora-kernel.git seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO The value resulting from the SECCOMP_RET_DATA mask could exceed MAX_ERRNO when setting errno during a SECCOMP_RET_ERRNO filter action. This makes sure we have a reliable value being set, so that an invalid errno will not be ignored by userspace. Signed-off-by: Kees Cook Reported-by: Dmitry V. Levin Cc: Andy Lutomirski Cc: Will Drewry Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed