summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsencrypt.c
diff options
context:
space:
mode:
authorAurelien Aptel <aaptel@suse.com>2018-02-16 19:19:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-24 09:36:27 +0200
commit7a55d160b730da05a7ea82c6c78b8e8d012a74cc (patch)
treec061c0ccfbc9f41c0fa8797094c4e2c0f2cee7ba /fs/cifs/cifsencrypt.c
parent0910e2804f2ecb081bd87c26cdb8f4ff502c39f2 (diff)
downloadlinux-stable-7a55d160b730da05a7ea82c6c78b8e8d012a74cc.tar.gz
linux-stable-7a55d160b730da05a7ea82c6c78b8e8d012a74cc.tar.bz2
linux-stable-7a55d160b730da05a7ea82c6c78b8e8d012a74cc.zip
CIFS: add sha512 secmech
commit 5fcd7f3f966f37f3f9a215af4cc1597fe338d0d5 upstream. * prepare for SMB3.11 pre-auth integrity * enable sha512 when SMB311 is enabled in Kconfig * add sha512 as a soft dependency Signed-off-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <smfrench@gmail.com> CC: Stable <stable@vger.kernel.org> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs/cifsencrypt.c')
-rw-r--r--fs/cifs/cifsencrypt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 478a145aa4d0..6fa6d459678e 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -829,6 +829,11 @@ cifs_crypto_secmech_release(struct TCP_Server_Info *server)
server->secmech.md5 = NULL;
}
+ if (server->secmech.md5) {
+ crypto_free_shash(server->secmech.sha512);
+ server->secmech.sha512 = NULL;
+ }
+
if (server->secmech.hmacmd5) {
crypto_free_shash(server->secmech.hmacmd5);
server->secmech.hmacmd5 = NULL;
@@ -852,4 +857,6 @@ cifs_crypto_secmech_release(struct TCP_Server_Info *server)
server->secmech.sdeschmacmd5 = NULL;
kfree(server->secmech.sdescmd5);
server->secmech.sdescmd5 = NULL;
+ kfree(server->secmech.sdescsha512);
+ server->secmech.sdescsha512 = NULL;
}