linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* seccomp: Delay filter activation
@ 2021-02-20  9:31 Sargun Dhillon
  2021-03-01 11:09 ` Christian Brauner
  0 siblings, 1 reply; 8+ messages in thread
From: Sargun Dhillon @ 2021-02-20  9:31 UTC (permalink / raw)
  To: Kees Cook
  Cc: LKML, Giuseppe Scrivano, Christian Brauner, Tycho Andersen,
	Hariharan Ananthakrishnan, Keerti Lakshminarayan, Kyle Anderson

We've run into a problem where attaching a filter can be quite messy
business because the filter itself intercepts sendmsg, and other
syscalls related to exfiltrating the listener FD. I believe that this
problem set has been brought up before, and although there are
"simpler" methods of exfiltrating the listener, like clone3 or
pidfd_getfd, but these are still less than ideal.

One of the ideas that's been talked about (I want to say back at LSS
NA) is the idea of "delayed activation". I was thinking that it might
be nice to have a mechanism to do delayed attach, either activated on
execve / fork, or an ioctl on the listenerfd to activate the filter
and have a flag like SECCOMP_FILTER_FLAG_NEW_LISTENER_INACTIVE, which
indicates that the listener should be setup, but not enforcing, and
another ioctl to activate it.

The later approach is preferred due to simplicity, but I can see a
situation where you could accidentally get into a state where the
filter is not being enforced. Additionally, this may have unforeseen
implications with CRIU.

I'm curious whether this is a problem others share, and whether any of
the aforementioned approaches seem reasonable.

-Thanks,
Sargun

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

end of thread, other threads:[~2021-03-19 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-20  9:31 seccomp: Delay filter activation Sargun Dhillon
2021-03-01 11:09 ` Christian Brauner
2021-03-01 13:21   ` Christian Brauner
2021-03-01 23:44     ` Kees Cook
2021-03-18 14:54       ` Christian Brauner
2021-03-18 20:39         ` Sargun Dhillon
2021-03-19 10:06           ` Rodrigo Campos
2021-03-19 11:03           ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).