Patch "target/iscsi: avoid NULL dereference in CHAP auth error path" has been added to the 4.15-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
target/iscsi: avoid NULL dereference in CHAP auth error path
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
target-iscsi-avoid-null-dereference-in-chap-auth-error-path.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ce512d79d0466a604793addb6b769d12ee326822Mon Sep 17 00:00:00 2001
From: David Disseldorp <[email protected]>
Date: Wed, 13 Dec 2017 18:22:30 +0100
Subject: target/iscsi: avoid NULL dereference in CHAP auth error path
From: David Disseldorp <[email protected]>
commit ce512d79d0466a604793addb6b769d12ee326822 upstream.
If chap_server_compute_md5() fails early, e.g. via CHAP_N mismatch, then crypto_free_shash() is called with a NULL pointer which gets dereferenced in crypto_shash_tfm().
--- drivers/target/iscsi/iscsi_target_auth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target_auth.c +2 -1
@@ -421,7 +421,8 @@ static int chap_server_compute_md5( auth_ret =0 ; out:kzfree (desc); -crypto_free_shash (tfm); +if (tfm) +crypto_free_shash (tfm);kfree (challenge);kfree (challenge_binhex);return auth_ret;
Patches currently in stable-queue which might be from [email protected] are
queue-4.15/target-iscsi-avoid-null-dereference-in-chap-auth-error-path.patch