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 <CAKYAXd9UzvYgjrOWe1QFe5HBXta3aeGwpksaDFZCwKHhkNtLeg@mail.gmail.com>
On Tue, Aug 18, 2026 at 3:27 PM Thomas Huth <[email protected]> wrote:
>
> On 18/08/2026 07.47, Namjae Jeon wrote:
> >>   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.
>   Hi!
>
> The cmac_key and cmac_ctx have just been handled via the new __cleanup()
> functions, that's why I did not add these to this patch here. The patch has
> just been merged:
>
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2b240733f27c8dd7e192f36540a10dcb88339222
Okay. I will apply this patch-set to #for-next.
Thanks!
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.