UPSTREAM: seccomp: always propagate NO_NEW_PRIVS on tsync

Before this patch, a process with some permissive seccomp filter
that was applied by root without NO_NEW_PRIVS was able to add
more filters to itself without setting NO_NEW_PRIVS by setting
the new filter from a throwaway thread with NO_NEW_PRIVS.

Signed-off-by: Jann Horn <jann@thejh.net>
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>

Bug: 27892194
Patchset: seccomp

(cherry picked from commit 103502a35cfce0710909da874f092cb44823ca03)
Signed-off-by: Kees Cook <keescook@google.com>
Change-Id: I5a7290daff95794a1d67e0e7f5659a7ca8bfe91c
1 file changed