CIFS: fix uninitialized ptr deref in smb2 signing
authorAurelien Aptel <aaptel@suse.com>
Thu, 2 Aug 2018 14:39:52 +0000 (16:39 +0200)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Aug 2018 19:30:59 +0000 (14:30 -0500)
commita5c62f4833c2c8e6e0f35367b99b717b78f5c029
tree7b8f0ea7136d3aabdeaf5d9e3c723c0c5d55dc5c
parentfd09b7d3b352105f08b8e02f7afecf7e816380ef
CIFS: fix uninitialized ptr deref in smb2 signing

server->secmech.sdeschmacsha256 is not properly initialized before
smb2_shash_allocate(), set shash after that call.

also fix typo in error message

Fixes: 8de8c4608fe9 ("cifs: Fix validation of signed data in smb2")

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Paulo Alcantara <palcantara@suse.com>
Reported-by: Xiaoli Feng <xifeng@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2transport.c