Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 674d6c2a authored by Kees Cook's avatar Kees Cook Committed by alexax66
Browse files

UPSTREAM: 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: default avatarKees Cook <keescook@chromium.org>
Reported-by: default avatarDmitry V. Levin <ldv@altlinux.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Drewry <wad@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit 580c57f1076872ebc2427f898b927944ce170f2d)
Signed-off-by: default avatarKees Cook <keescook@google.com>
Change-Id: If82aa1b5f4be6375e8ca301d317d3d2db88a66dd
Signed-off-by: default avatarChetan C R <cravin@codeaurora.org>
parent 018618c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment