]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: default permissions
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 15:11:44 +0000 (17:11 +0200)
committerSomasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Tue, 1 Aug 2017 15:52:07 +0000 (08:52 -0700)
commitcb5efc127ad5e35ec9956773816c0739d2893f59
tree2c38562828658786052f187d32676c6c09cd2877
parent566c3b2e194689fb7e48a9bac90b28b83f9cb108
ovl: default permissions

Orabug: 2654637926540706
CVE-2016-1575
CVE-2016-1576

Add mount option "default_permissions" to alter the way permissions are
calculated.

Without this option and prior to this patch permissions were calculated by
underlying lower or upper filesystem.

With this option the permissions are calculated by overlayfs based on the
file owner, group and mode bits.

This has significance for example when a read-only exported NFS filesystem
is used as a lower layer.  In this case the underlying NFS filesystem will
reply with EROFS, in which case all we know is that the filesystem is
read-only.  But that's not what we are interested in, we are interested in
whether the access would be allowed if the filesystem wasn't read-only; the
server doesn't tell us that, and would need updating at various levels,
which doesn't seem practicable.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
(cherry picked from commit 8d3095f4ad47ac409440a0ba1c80e13519ff867d)
Signed-off-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/super.c