lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 17 Nov 2021 01:58:06 +0000
From:   David Anderson <dvander@...gle.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     David Anderson <dvander@...gle.com>,
        John Stultz <john.stultz@...aro.org>,
        Mark Salyzyn <salyzyn@...roid.com>,
        linux-fsdevel@...r.kernel.org, linux-unionfs@...r.kernel.org,
        Stephen Smalley <sds@...ho.nsa.gov>,
        linux-kernel@...r.kernel.org,
        linux-security-module@...r.kernel.org, kernel-team@...roid.com,
        selinux@...r.kernel.org, paulmoore@...rosoft.com,
        Luca.Boccassi@...rosoft.com
Subject: [PATCH v19 4/4] overlayfs: inode_owner_or_capable called during execv

From: John Stultz <john.stultz@...aro.org>

Using old_creds as an indication that we are not overriding the
credentials, bypass call to inode_owner_or_capable.  This solves
a problem with all execv calls being blocked when using the caller's
credentials.

Signed-off-by: John Stultz <john.stultz@...aro.org>
Signed-off-by: Mark Salyzyn <salyzyn@...roid.com>
Signed-off-by: David Anderson <dvander@...gle.com>
Fixes: 05acefb4872da ("ovl: check permission to open real file")
Cc: linux-fsdevel@...r.kernel.org
Cc: linux-unionfs@...r.kernel.org
Cc: Stephen Smalley <sds@...ho.nsa.gov>
Cc: linux-kernel@...r.kernel.org
Cc: linux-security-module@...r.kernel.org
Cc: kernel-team@...roid.com
Cc: selinux@...r.kernel.org
Cc: paulmoore@...rosoft.com
Cc: Luca.Boccassi@...rosoft.com

v19 - rebase

v18 - rebase

v17 - rebase

v16 - introduced fix over rebased series
---
 fs/overlayfs/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 11d8277c94cd..586de55bba79 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -55,7 +55,8 @@ static struct file *ovl_open_realfile(const struct file *file,
 	if (err) {
 		realfile = ERR_PTR(err);
 	} else {
-		if (!inode_owner_or_capable(&init_user_ns, realinode))
+		if (old_cred && !inode_owner_or_capable(&init_user_ns,
+							realinode))
 			flags &= ~O_NOATIME;
 
 		realfile = open_with_fake_path(&file->f_path, flags, realinode,
-- 
2.34.0.rc1.387.gb447b232ab-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ