Re: [PATCH] seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO

2015-02-06 Thread Dmitry V. Levin
On Fri, Feb 06, 2015 at 01:03:09PM -0800, Kees Cook wrote: > 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

[PATCH] seccomp: cap SECCOMP_RET_ERRNO data to MAX_ERRNO

2015-02-06 Thread Kees Cook
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. Reported-by: Dmitry V. Levin Signed-off-by: Kees Co