From: Thomas Huth <thuth@redhat.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Steve French <sfrench@samba.org>,
Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] smb: client: Clear sensitive stack data in smb2transport.c
Date: Tue, 18 Aug 2026 08:27:44 +0200 [thread overview]
Message-ID: <621b2dd4-fd61-4af8-b855-be6c82065acd@redhat.com> (raw)
In-Reply-To: <CAKYAXd-0RLf6uYZO+yFnF8+gvDX_2AyMMPF75B8XcKL_qSaKzg@mail.gmail.com>
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
Thomas
next prev parent reply other threads:[~2026-08-18 6:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 13:01 [PATCH 0/5] smb: client: Avoid leaking of sensitive data to the stack or heap Thomas Huth
2026-08-12 13:01 ` [PATCH 1/5] smb: client: Clear sensitive stack data in smb2transport.c Thomas Huth
2026-08-18 5:47 ` Namjae Jeon
2026-08-18 6:27 ` Thomas Huth [this message]
2026-08-18 7:48 ` Namjae Jeon
2026-08-12 13:01 ` [PATCH 2/5] smb: client: Clear sensitive stack and heap data in smb2ops.c Thomas Huth
2026-08-12 13:01 ` [PATCH 3/5] smb: client: Clear sensitive stack data in cifsencrypt.c Thomas Huth
2026-08-12 13:01 ` [PATCH 4/5] smb: client: Clear sensitive stack data in smb1encrypt.c Thomas Huth
2026-08-18 5:58 ` Namjae Jeon
2026-08-18 6:33 ` Thomas Huth
2026-08-18 7:47 ` Namjae Jeon
2026-08-12 13:01 ` [PATCH 5/5] smb: client: Avoid leaking sensitive data to the heap in connect.c Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=621b2dd4-fd61-4af8-b855-be6c82065acd@redhat.com \
--to=thuth@redhat.com \
--cc=bharathsm@microsoft.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox