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:   Thu, 27 Jan 2022 19:46:12 +0100
From:   Roberto Sassu <roberto.sassu@...wei.com>
To:     <linux-integrity@...r.kernel.org>
CC:     <zohar@...ux.ibm.com>, <ebiggers@...nel.org>,
        <stefanb@...ux.ibm.com>, <linux-fscrypt@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Roberto Sassu <roberto.sassu@...wei.com>
Subject: [RFC][PATCH v3a 08/11] fsverity: Completely disable signature verification if not requested

Currently, fsverity verifies the signature, if supplied, regardless of
whether signature verification is requested or not.

Completely disable signature verification, if not requested, so that other
users of fsverity can do their own verification without relying on the
fsverity-specific verification to work.

Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
---
 fs/verity/signature.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/verity/signature.c b/fs/verity/signature.c
index 143a530a8008..b45a2cea6c59 100644
--- a/fs/verity/signature.c
+++ b/fs/verity/signature.c
@@ -45,13 +45,13 @@ int fsverity_verify_signature(const struct fsverity_info *vi,
 	struct fsverity_formatted_digest *d;
 	int err;
 
-	if (sig_size == 0) {
-		if (fsverity_require_signatures) {
-			fsverity_err(inode,
-				     "require_signatures=1, rejecting unsigned file!");
-			return -EPERM;
-		}
+	if (!fsverity_require_signatures)
 		return 0;
+
+	if (sig_size == 0) {
+		fsverity_err(inode,
+			     "require_signatures=1, rejecting unsigned file!");
+		return -EPERM;
 	}
 
 	d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL);
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ