Re: [PATCH] umount: Do not allow unmounting rootfs.

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

 



Andrew Vagin <avagin@xxxxxxxxxxxxx> writes:

> On Tue, Oct 07, 2014 at 12:27:06PM -0700, Eric W. Biederman wrote:
>> 
>> Which in practice is totally uninteresting.  Only the global root user can
>> do it, and it is just a stupid thing to do.
>> 
>> However that is no excuse to allow a silly way to oops the kernel.
>> 
>> We can avoid this silly problem by setting MNT_LOCKED on the rootfs
>> mount point and thus avoid needing any special cases in the unmount
>> code.
>
> I had this idea too, but it doesn't work.
>
> MNT_LOCKED isn't inherited, if the privileged user creates a new mount
> namespace.
>
> So "unshame -m ./nsenter" reproduces the same BUG.

Which broken tree do you have where MNT_LOCKED is not inherited?

That case fails to reproduce the BUG for me.

The semantics of MNT_LOCKED are that you aren't allowed to see what is
beneath.  So if you can get under there even by unsharing the mount
namespace it is an implementation bug in MNT_LOCKED.

Eric
--
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