* [PATCH V2] ext4 crypto: exit cleanly if ext4_derive_key_aes() fails
@ 2015-07-09 20:07 Laurent Navet
2015-07-22 4:09 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2015-07-09 20:07 UTC (permalink / raw)
To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Laurent Navet
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>
---
fs/ext4/crypto_key.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/crypto_key.c b/fs/ext4/crypto_key.c
index 442d24e..ce75bc8 100644
--- a/fs/ext4/crypto_key.c
+++ b/fs/ext4/crypto_key.c
@@ -220,6 +220,8 @@ retry:
BUG_ON(master_key->size != EXT4_AES_256_XTS_KEY_SIZE);
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)) {
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] ext4 crypto: exit cleanly if ext4_derive_key_aes() fails
2015-07-09 20:07 [PATCH V2] ext4 crypto: exit cleanly if ext4_derive_key_aes() fails Laurent Navet
@ 2015-07-22 4:09 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2015-07-22 4:09 UTC (permalink / raw)
To: Laurent Navet; +Cc: adilger.kernel, linux-ext4, linux-kernel
On Thu, Jul 09, 2015 at 10:07:14PM +0200, Laurent Navet wrote:
> 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>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-22 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 20:07 [PATCH V2] ext4 crypto: exit cleanly if ext4_derive_key_aes() fails Laurent Navet
2015-07-22 4:09 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).