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

From: Namjae Jeon

Date: Tue Aug 18 2026 - 01:47:38 EST


> 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.