From: Giuseppe Scrivano <gscrivan@redhat.com>
To: Sargun Dhillon <sargun@sargun.me>
Cc: keescook@chromium.org, rsesek@google.com, palmer@google.com,
jannh@google.com, jeffv@google.com,
containers@lists.linux-foundation.org,
Kees Cook <keescook@google.com>,
linux-kernel@vger.kernel.org, Matt Denton <mpdenton@google.com>,
linux-api@vger.kernel.org, christian.brauner@ubuntu.com
Subject: Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier
Date: Fri, 29 May 2020 11:24:33 +0200 [thread overview]
Message-ID: <87wo4vt7ou.fsf@redhat.com> (raw)
In-Reply-To: <20200528110858.3265-3-sargun@sargun.me> (Sargun Dhillon's message of "Thu, 28 May 2020 04:08:57 -0700")
Sargun Dhillon <sargun@sargun.me> writes:
> This adds a seccomp notifier ioctl which allows for the listener to "add"
> file descriptors to a process which originated a seccomp user
> notification. This allows calls like mount, and mknod to be "implemented",
> as the return value, and the arguments are data in memory. On the other
> hand, calls like connect can be "implemented" using pidfd_getfd.
>
> Unfortunately, there are calls which return file descriptors, like
> open, which are vulnerable to TOC-TOU attacks, and require that the
> more privileged supervisor can inspect the argument, and perform the
> syscall on behalf of the process generating the notifiation. This
> allows the file descriptor generated from that open call to be
> returned to the calling process.
>
> In addition, there is funcitonality to allow for replacement of
> specific file descriptors, following dup2-like semantics.
>
> Signed-off-by: Sargun Dhillon <sargun@sargun.me>
> Suggested-by: Matt Denton <mpdenton@google.com>
> Cc: Kees Cook <keescook@google.com>,
> Cc: Jann Horn <jannh@google.com>,
> Cc: Robert Sesek <rsesek@google.com>,
> Cc: Chris Palmer <palmer@google.com>
> Cc: Christian Brauner <christian.brauner@ubuntu.com>
> Cc: Tycho Andersen <tycho@tycho.ws>
> ---
Thanks, this is a really useful feature.
Tested-by: Giuseppe Scrivano <gscrivan@redhat.com>
next prev parent reply other threads:[~2020-05-29 9:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-28 11:08 [PATCH v2 0/3] Add seccomp notifier ioctl that enables adding fds Sargun Dhillon
2020-05-28 11:08 ` [PATCH v2 1/3] seccomp: Add find_notification helper Sargun Dhillon
2020-05-29 6:23 ` Kees Cook
2020-05-29 17:40 ` Sargun Dhillon
2020-05-29 20:14 ` Kees Cook
2020-05-29 9:57 ` Christian Brauner
2020-05-28 11:08 ` [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier Sargun Dhillon
2020-05-29 7:31 ` Kees Cook
2020-05-29 7:38 ` Christian Brauner
2020-05-29 7:45 ` Kees Cook
2020-05-30 1:10 ` Sargun Dhillon
2020-05-30 2:43 ` Kees Cook
2020-05-30 3:17 ` Jann Horn
2020-05-30 5:22 ` Kees Cook
2020-05-30 13:58 ` Christian Brauner
2020-05-30 16:09 ` Kees Cook
2020-05-30 3:58 ` Sargun Dhillon
2020-05-30 5:47 ` Kees Cook
2020-05-30 14:13 ` Christian Brauner
2020-05-30 16:14 ` Kees Cook
2020-05-30 16:21 ` Christian Brauner
2020-05-30 14:08 ` Al Viro
2020-05-30 16:07 ` Kees Cook
2020-06-01 19:02 ` Sargun Dhillon
2020-06-01 19:59 ` Kees Cook
2020-05-29 9:24 ` Giuseppe Scrivano [this message]
2020-05-29 10:32 ` Christian Brauner
2020-05-29 13:31 ` Christian Brauner
2020-05-29 22:35 ` Sargun Dhillon
2020-05-28 11:08 ` [PATCH v2 3/3] selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD Sargun Dhillon
2020-05-29 7:41 ` Kees Cook
2020-05-29 13:29 ` Tycho Andersen
2020-05-29 18:46 ` Sargun Dhillon
2020-05-29 19:12 ` Tycho Andersen
2020-05-29 20:09 ` Kees Cook
2020-05-29 13:30 ` [PATCH v2 0/3] Add seccomp notifier ioctl that enables adding fds Tycho Andersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wo4vt7ou.fsf@redhat.com \
--to=gscrivan@redhat.com \
--cc=christian.brauner@ubuntu.com \
--cc=containers@lists.linux-foundation.org \
--cc=jannh@google.com \
--cc=jeffv@google.com \
--cc=keescook@chromium.org \
--cc=keescook@google.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpdenton@google.com \
--cc=palmer@google.com \
--cc=rsesek@google.com \
--cc=sargun@sargun.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).