]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: ignore permissions on underlying lookup
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 10 May 2016 23:16:37 +0000 (01:16 +0200)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:46:32 +0000 (13:46 +0800)
commite2936cfa70ed9af228526267d1c359f780f6f6e2
treec98628ad2b6c72b2b78fe2b727b7113f19ace176
parent5405d272d81c9fc2fc825262f471124af09f44c6
ovl: ignore permissions on underlying lookup

Generally permission checking is not necessary when overlayfs looks up a
dentry on one of the underlying layers, since search permission on base
directory was already checked in ovl_permission().

More specifically using lookup_one_len() causes a problem when the lower
directory lacks search permission for a specific user while the upper
directory does have search permission.  Since lookups are cached, this
causes inconsistency in behavior: success depends on who did the first
lookup.

So instead use lookup_hash() which doesn't do the permission check.

Reported-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Orabug: 26401569

(backport upstream commit 38b78a5f18584db6fa7441e0f4531b283b0e6725)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/super.c