Re: [PATCH 1/5] smb: client: Clear sensitive stack data in smb2transport.c

Namjae Jeon <[email protected]>
Newsgroups org.kernel.vger.linux-cifs,org.kernel.vger.linux-kernel
Message-ID <CAKYAXd-0RLf6uYZO+yFnF8+gvDX_2AyMMPF75B8XcKL_qSaKzg@mail.gmail.com>
>  struct derivation {
> @@ -482,6 +485,7 @@ smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server)
>         memset(shdr->Signature, 0x0, SMB2_SIGNATURE_SIZE);
>
>         rc = aes_cmac_preparekey(&cmac_key, key, SMB2_CMACAES_SIZE);
> +       memzero_explicit(key, sizeof(key));
cmac_key is not zeroized, and cmac_ctx  is not zeroized on error paths
in smb3_calc_signature(). Please zeroize both on all exit paths,
taking care not to clear an uninitialized context.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.