Thread (35 messages) 35 messages, 6 authors, 2020-06-01

Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier

From: Kees Cook <hidden>
Date: 2020-05-30 16:09:35
Also in: lkml

On Sat, May 30, 2020 at 03:58:27PM +0200, Christian Brauner wrote:
On Sat, May 30, 2020 at 05:17:24AM +0200, Jann Horn wrote:
quoted
On Sat, May 30, 2020 at 4:43 AM Kees Cook [off-list ref] wrote:
quoted
I mean, yes, that's certainly better, but it just seems a shame that
everyone has to do the get_unused/put_unused dance just because of how
SCM_RIGHTS does this weird put_user() in the middle.

Can anyone clarify the expected failure mode from SCM_RIGHTS? Can we
move the put_user() after instead?
Honestly, I think trying to remove file descriptors and such after
-EFAULT is a waste of time. If userspace runs into -EFAULT, userspace
[...]

There's really no point in trying to save a broken scm message imho.
Right -- my concern is about stuffing a fd into a process without it
knowing (this is likely an overly paranoid concern, given that if the
process is getting EFAULT at the end of a list of fds, all the prior
ones will be installed too..)

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help