From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jann Horn <jann@thejh.net>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Kees Cook <keescook@google.com>,
Andy Lutomirski <luto@amacapital.net>,
security@kernel.org
Subject: Re: [PATCH 1/2] compat_ioctl: don't look up the fd twice
Date: Wed, 6 Jan 2016 20:25:17 +0000 [thread overview]
Message-ID: <20160106202517.GA18143@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160106145008.GU9938@ZenIV.linux.org.uk>
On Wed, Jan 06, 2016 at 02:50:08PM +0000, Al Viro wrote:
> On Tue, Jan 05, 2016 at 11:33:53AM -0800, Linus Torvalds wrote:
> > On Jan 5, 2016 9:27 AM, "Jann Horn" <jann@thejh.net> wrote:
> > >
> > > This change mitigates potential security issues by
> > > preventing a race that permits invocation of
> > > unlocked_ioctl handlers under KERNEL_DS through compat
> > > code even if a corresponding compat_ioctl handler exists.
> >
> > Yeah, these two patches are much more legible now. Thanks.
> >
> > Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
> >
> > Al, I'm assuming I'll get these through the vfs tree during the 4.5 merge
> > window. Correct?
>
> I'll need to finish reviewing, but yes, that's 4.5 vfs.git fodder.
> So far it looks sane...
Said that, I'm not sure it's the best approach. E.g. I2C_* stuff is
defined only in one driver and if we are touching that code at all,
we might as well take it out of fs/compat_ioctl.c and be done with
that - just add ->compat_ioctl() to drivers/i2c/i2c-dev.c and move
that crap over there (and to hell with compat_alloc_user_space(), while
we are at it).
Oh, well - that can be done in followups, anyway. Applied, with s/filp/file/
through the entire thing - I really don't like that naming convention.
BTW, am I right assuming that it had been adopted from OS Design and
Implementation way back when?
next prev parent reply other threads:[~2016-01-06 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 17:27 [PATCH 1/2] compat_ioctl: don't look up the fd twice Jann Horn
2016-01-05 17:27 ` [PATCH 2/2] compat_ioctl: don't call do_ioctl under set_fs(KERNEL_DS) Jann Horn
2016-01-05 19:35 ` Kees Cook
2016-01-05 19:27 ` [PATCH 1/2] compat_ioctl: don't look up the fd twice Kees Cook
[not found] ` <CA+55aFzX9Gm=t=0HSnMxDeZmHkiZDMRKrBBvBw4CwPK1EbNbUQ@mail.gmail.com>
2016-01-06 14:50 ` Al Viro
2016-01-06 20:25 ` Al Viro [this message]
2016-01-07 0:13 ` Linus Torvalds
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=20160106202517.GA18143@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jann@thejh.net \
--cc=keescook@google.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=security@kernel.org \
--cc=torvalds@linux-foundation.org \
/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).