Re: [PATCH 1/2] compat_ioctl: don't look up the fd twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx>
> > 
> > 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux