Linux Kernels

PKCS#7: fix unitialized boolean 'want'

This change “PKCS#7: fix unitialized boolean 'want'” (commit 06aae59) in Linux kernel is authored by Colin Ian King <colin.king [at] canonical.com> on Sat Feb 27 12:45:26 2016 +0000.

Description of "PKCS#7: fix unitialized boolean 'want'"

The change “PKCS#7: fix unitialized boolean 'want'” introduces changes as follows.

PKCS#7: fix unitialized boolean 'want'

The boolean want is not initialized and hence garbage. The default should
be false (later it is only set to true on tne sinfo->authattrs check).

Found with static analysis using CoverityScan

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>

Linux kernel releases containing commit 06aae59

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "PKCS#7: fix unitialized boolean 'want'"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 crypto/asymmetric_keys/pkcs7_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
index 3ef62dac9771..cbbd03fd94f8 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(pkcs7_free_message);
 static int pkcs7_check_authattrs(struct pkcs7_message *msg)
 {
 	struct pkcs7_signed_info *sinfo;
-	bool want;
+	bool want = false;
 
 	sinfo = msg->signed_infos;
 	if (sinfo->authattrs) {

The commit for this change in Linux stable tree is 06aae59 (patch).

Last modified: 2020/01/11 09:26