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-next>] [day] [month] [year] [list]
Message-Id: <20221207105430.248613-1-roberto.sassu@huaweicloud.com>
Date:   Wed,  7 Dec 2022 11:54:30 +0100
From:   Roberto Sassu <roberto.sassu@...weicloud.com>
To:     dhowells@...hat.com, herbert@...dor.apana.org.au,
        davem@...emloft.net
Cc:     zohar@...ux.ibm.com, dmitry.kasatkin@...il.com,
        paul@...l-moore.com, jmorris@...ei.org, serge@...lyn.com,
        ebiggers@...nel.org, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Roberto Sassu <roberto.sassu@...wei.com>
Subject: [PATCH] public_key: Add a comment to public_key_signature struct definition

From: Roberto Sassu <roberto.sassu@...wei.com>

public_key_verify_signature() calls sg_set_buf() to set the signature and
digest for the signature verification.

As sg_set_buf() requires the buffer to be in physically contiguous memory,
see commit ac4e97abce9b8 ("scatterlist: sg_set_buf() argument must be in
linear mapping"), mention that in a comment for the signature and digest
fields of the public_key_signature structure.

Link: https://lore.kernel.org/linux-integrity/Y4pIpxbjBdajymBJ@sol.localdomain/
Suggested-by: Eric Biggers <ebiggers@...nel.org>
Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
---
 include/crypto/public_key.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h
index 68f7aa2a7e55..6d623e063034 100644
--- a/include/crypto/public_key.h
+++ b/include/crypto/public_key.h
@@ -37,8 +37,8 @@ extern void public_key_free(struct public_key *key);
  */
 struct public_key_signature {
 	struct asymmetric_key_id *auth_ids[3];
-	u8 *s;			/* Signature */
-	u8 *digest;
+	u8 *s;			/* Signature (in physically contiguous mem) */
+	u8 *digest;		/* Digest (in physically contiguous mem) */
 	u32 s_size;		/* Number of bytes in signature */
 	u32 digest_size;	/* Number of bytes in digest */
 	const char *pkey_algo;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ