seccomp: always propagate NO_NEW_PRIVS on tsync
Orabug:
23330789
[ Upstream commit
103502a35cfce0710909da874f092cb44823ca03 ]
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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit
988590966531b9ab4d7c6101f02a6f065c5df7a5)
Signed-off-by: Dan Duval <dan.duval@oracle.com>