diff mbox

[4.2.y-ckt,stable] Patch "ext4 crypto: exit cleanly if ext4_derive_key_aes() fails" has been added to the 4.2.y-ckt tree

Message ID 1453853380-14820-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Jan. 27, 2016, 12:09 a.m. UTC
This is a note to let you know that I have just added a patch titled

    ext4 crypto: exit cleanly if ext4_derive_key_aes() fails

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt3.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

From d5d7ed70c52b5dc5b6a98cf7c076b67356ce4153 Mon Sep 17 00:00:00 2001
From: Laurent Navet <laurent.navet@gmail.com>
Date: Wed, 22 Jul 2015 00:08:08 -0400
Subject: ext4 crypto: exit cleanly if ext4_derive_key_aes() fails

commit d76d99b219e1a233a720775c0451c310d34594e8 upstream.

Return value of ext4_derive_key_aes() is stored but not used.
Add test to exit cleanly if ext4_derive_key_aes() fail.
Also fix coverity CID 1309760.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/ext4/crypto_key.c | 2 ++
 1 file changed, 2 insertions(+)

--
1.9.1
diff mbox

Patch

diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c
index 9bad113..dde261b 100644
--- a/fs/ext4/crypto_key.c
+++ b/fs/ext4/crypto_key.c
@@ -230,6 +230,8 @@  retry:
 	}
 	res = ext4_derive_key_aes(ctx.nonce, master_key->raw,
 				  raw_key);
+	if (res)
+		goto out;
 got_key:
 	ctfm = crypto_alloc_ablkcipher(cipher_str, 0, 0);
 	if (!ctfm || IS_ERR(ctfm)) {