lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251016175433.GB1575@sol>
Date: Thu, 16 Oct 2025 10:54:33 -0700
From: Eric Biggers <ebiggers@...nel.org>
To: Namjae Jeon <linkinjeon@...nel.org>
Cc: linux-cifs@...r.kernel.org, Steve French <smfrench@...il.com>,
	Sergey Senozhatsky <senozhatsky@...omium.org>,
	Tom Talpey <tom@...pey.com>, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] ksmbd: Use HMAC-SHA256 library for message signing
 and key generation

On Thu, Oct 16, 2025 at 02:00:37PM +0900, Namjae Jeon wrote:
> [snip]
> > @@ -8876,22 +8865,21 @@ void smb2_set_sign_rsp(struct ksmbd_work *work)
> >         struct kvec *iov;
> >         int n_vec = 1;
> >
> >         hdr = ksmbd_resp_buf_curr(work);
> >         hdr->Flags |= SMB2_FLAGS_SIGNED;
> > -       memset(hdr->Signature, 0, SMB2_SIGNATURE_SIZE);
> By deleting this line, the following error occurs.
> 
> [162118.260693] CIFS: VFS: sign fail cmd 0x3 message id 0x3
> [162118.260707] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.261473] CIFS: VFS: sign fail cmd 0xb message id 0x4
> [162118.261482] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.262437] CIFS: VFS: sign fail cmd 0x3 message id 0x5
> [162118.262449] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.262892] CIFS: VFS: sign fail cmd 0x5 message id 0x6
> [162118.262900] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.263301] CIFS: VFS: sign fail cmd 0x10 message id 0x7
> [162118.263314] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.263724] CIFS: VFS: sign fail cmd 0x10 message id 0x8
> [162118.263736] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.264142] CIFS: VFS: sign fail cmd 0x6 message id 0x9
> [162118.264154] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.264591] CIFS: VFS: sign fail cmd 0x5 message id 0xa
> [162118.264603] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.264912] CIFS: VFS: sign fail cmd 0x6 message id 0xb
> [162118.264925] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162118.265244] CIFS: VFS: sign fail cmd 0x5 message id 0xc
> [162118.265257] CIFS: VFS: \\10.177.110.57 SMB signature verification
> returned error = -13
> [162119.831575] CIFS: VFS: \\10.177.110.57\homes2 SMB signature
> verification returned error = -13
> 
> I have directly restored this line manually and then applied this
> patch to #ksmbd-for-next-next.
> Thanks!

Thanks for catching that!  It looked like zeroizing 'hdr->Signature' was
only needed for when ksmbd_sign_smb2_pdu() failed.  But it must be part
of the HMAC input data as well, i.e. 'hdr' must point to the same memory
as one of the iovecs.  So restoring the line is fine.  Thanks,

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ