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]
Message-Id: <1309175148-6651-2-git-send-email-roberto.sassu@polito.it>
Date:	Mon, 27 Jun 2011 13:45:39 +0200
From:	Roberto Sassu <roberto.sassu@...ito.it>
To:	linux-security-module@...r.kernel.org
Cc:	keyrings@...ux-nfs.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, dhowells@...hat.com,
	jmorris@...ei.org, zohar@...ux.vnet.ibm.com,
	safford@...son.ibm.com, ramunno@...ito.it,
	tyhicks@...ux.vnet.ibm.com, kirkland@...onical.com,
	ecryptfs-devel@...ts.launchpad.net,
	Roberto Sassu <roberto.sassu@...ito.it>
Subject: [PATCH v5 1/7] encrypted_keys: avoid dumping the master key if the request fails

Do not dump the master key if an error is encountered during the request.

Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>
Acked-by: Gianluca Ramunno <ramunno@...ito.it>
---
 security/keys/encrypted.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/security/keys/encrypted.c b/security/keys/encrypted.c
index b1cba5b..37cd913 100644
--- a/security/keys/encrypted.c
+++ b/security/keys/encrypted.c
@@ -378,11 +378,13 @@ static struct key *request_master_key(struct encrypted_key_payload *epayload,
 	} else
 		goto out;
 
-	if (IS_ERR(mkey))
+	if (IS_ERR(mkey)) {
 		pr_info("encrypted_key: key %s not found",
 			epayload->master_desc);
-	if (mkey)
-		dump_master_key(*master_key, *master_keylen);
+		goto out;
+	}
+
+	dump_master_key(*master_key, *master_keylen);
 out:
 	return mkey;
 }
-- 
1.7.4.4


Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (2061 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ