All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] run seccomp after ptrace
@ 2016-06-09 21:01 ` Kees Cook
  0 siblings, 0 replies; 96+ messages in thread
From: Kees Cook @ 2016-06-09 21:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kees Cook, Andy Lutomirski, Benjamin Herrenschmidt,
	Catalin Marinas, Chris Metcalf, Heiko Carstens, Helge Deller,
	James E.J. Bottomley, James Hogan, Jeff Dike, linux-arch,
	linux-arm-kernel, linux-mips, linux-parisc, linuxppc-dev,
	linux-s390, Maciej W. Rozycki, Mark Rutland, Martin Schwidefsky,
	Michael Ellerman, Paul Mackerras, Ralf Baechle,
	Richard Weinberger, Russell King

There has been a long-standing (and documented) issue with seccomp
where ptrace can be used to change a syscall out from under seccomp.
This is a problem for containers and other wider seccomp filtered
environments where ptrace needs to remain available, as it allows
for an escape of the seccomp filter.

Since the ptrace attack surface is available for any allowed syscall,
moving seccomp after ptrace doesn't increase the actually available
attack surface. And this actually improves tracing since, for
example, tracers will be notified of syscall entry before seccomp
sends a SIGSYS, which makes debugging filters much easier.

The per-architecture changes do make one (hopefully small)
semantic change, which is that since ptrace comes first, it may
request a syscall be skipped. Running seccomp after this doesn't
make sense, so if ptrace wants to skip a syscall, it will bail
out early similarly to how seccomp was. This means that skipped
syscalls will not be fed through audit, though that likely means
we're actually avoiding noise this way.

This series first cleans up seccomp to remove the now unneeded
two-phase entry, fixes the SECCOMP_RET_TRACE hole (same as the
ptrace hole above), and then reorders seccomp after ptrace on
each architecture.

Thanks,

-Kees

^ permalink raw reply	[flat|nested] 96+ messages in thread

end of thread, other threads:[~2016-06-14  2:28 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 21:01 [PATCH 00/14] run seccomp after ptrace Kees Cook
2016-06-09 21:01 ` Kees Cook
2016-06-09 21:01 ` Kees Cook
2016-06-09 21:01 ` Kees Cook
2016-06-09 21:01 ` [PATCH 01/14] seccomp: add tests for ptrace hole Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 02/14] seccomp: Add a seccomp_data parameter secure_computing() Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 03/14] x86/entry: Get rid of two-phase syscall entry work Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 04/14] seccomp: remove 2-phase API Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 05/14] seccomp: recheck the syscall after RET_TRACE Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 22:46   ` Andy Lutomirski
2016-06-09 22:46     ` Andy Lutomirski
2016-06-09 22:46     ` Andy Lutomirski
2016-06-09 22:46     ` Andy Lutomirski
2016-06-09 22:46     ` Andy Lutomirski
2016-06-09 21:01 ` [PATCH 06/14] x86/ptrace: run seccomp after ptrace Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 22:52   ` Andy Lutomirski
2016-06-09 22:52     ` Andy Lutomirski
2016-06-09 22:52     ` Andy Lutomirski
2016-06-09 22:52     ` Andy Lutomirski
2016-06-09 22:52     ` Andy Lutomirski
2016-06-10  2:01     ` Kees Cook
2016-06-10  2:01       ` Kees Cook
2016-06-10  2:01       ` Kees Cook
2016-06-10  2:01       ` Kees Cook
2016-06-10  2:01       ` Kees Cook
2016-06-14  2:27     ` Andy Lutomirski
2016-06-14  2:27       ` Andy Lutomirski
2016-06-14  2:27       ` Andy Lutomirski
2016-06-14  2:27       ` Andy Lutomirski
2016-06-14  2:27       ` Andy Lutomirski
2016-06-09 21:01 ` [PATCH 07/14] arm/ptrace: " Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 08/14] arm64/ptrace: " Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01 ` [PATCH 09/14] MIPS/ptrace: " Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:01   ` Kees Cook
2016-06-09 21:02 ` [PATCH 10/14] parisc/ptrace: " Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02 ` [PATCH 11/14] s390/ptrace: " Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-10 10:51   ` Martin Schwidefsky
2016-06-10 10:51     ` Martin Schwidefsky
2016-06-10 10:51     ` Martin Schwidefsky
2016-06-09 21:02 ` [PATCH 12/14] powerpc/ptrace: " Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02 ` [PATCH 13/14] tile/ptrace: " Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02 ` [PATCH 14/14] um/ptrace: " Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-09 21:02   ` Kees Cook
2016-06-13 20:50 ` [PATCH 00/14] " Kees Cook
2016-06-13 20:50   ` Kees Cook
2016-06-13 20:50   ` Kees Cook
2016-06-13 20:50   ` Kees Cook
2016-06-13 20:50   ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.