public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: spnego: add ';' in HOST_KEY_LEN
@ 2023-11-13 14:52 Anastasia Belova
  2023-11-13 18:11 ` Paulo Alcantara
  0 siblings, 1 reply; 3+ messages in thread
From: Anastasia Belova @ 2023-11-13 14:52 UTC (permalink / raw)
  To: Steve French
  Cc: Anastasia Belova, Paulo Alcantara, Ronnie Sahlberg,
	Shyam Prasad N, Tom Talpey, Jeff Layton, linux-cifs,
	samba-technical, linux-kernel, lvc-project, Ekaterina Esina

"host=" should start with ';' (as in cifs_get_spnego_key)
So its length should be 6.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 7c9c3760b3a5 ("[CIFS] add constants for string lengths of keynames in SPNEGO upcall string")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Co-developed-by: Ekaterina Esina <eesina@astralinux.ru>
Signed-off-by: Ekaterina Esina <eesina@astralinux.ru>
---
 fs/smb/client/cifs_spnego.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/smb/client/cifs_spnego.c b/fs/smb/client/cifs_spnego.c
index 6f3285f1dfee..af7849e5974f 100644
--- a/fs/smb/client/cifs_spnego.c
+++ b/fs/smb/client/cifs_spnego.c
@@ -64,8 +64,8 @@ struct key_type cifs_spnego_key_type = {
  * strlen(";sec=ntlmsspi") */
 #define MAX_MECH_STR_LEN	13
 
-/* strlen of "host=" */
-#define HOST_KEY_LEN		5
+/* strlen of ";host=" */
+#define HOST_KEY_LEN		6
 
 /* strlen of ";ip4=" or ";ip6=" */
 #define IP_KEY_LEN		5
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: spnego: add ';' in HOST_KEY_LEN
  2023-11-13 14:52 [PATCH] cifs: spnego: add ';' in HOST_KEY_LEN Anastasia Belova
@ 2023-11-13 18:11 ` Paulo Alcantara
  2023-11-13 22:23   ` Steve French
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Alcantara @ 2023-11-13 18:11 UTC (permalink / raw)
  To: Anastasia Belova, Steve French
  Cc: Anastasia Belova, Ronnie Sahlberg, Shyam Prasad N, Tom Talpey,
	Jeff Layton, linux-cifs, samba-technical, linux-kernel,
	lvc-project, Ekaterina Esina

Anastasia Belova <abelova@astralinux.ru> writes:

> "host=" should start with ';' (as in cifs_get_spnego_key)
> So its length should be 6.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 7c9c3760b3a5 ("[CIFS] add constants for string lengths of keynames in SPNEGO upcall string")
> Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> Co-developed-by: Ekaterina Esina <eesina@astralinux.ru>
> Signed-off-by: Ekaterina Esina <eesina@astralinux.ru>
> ---
>  fs/smb/client/cifs_spnego.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cifs: spnego: add ';' in HOST_KEY_LEN
  2023-11-13 18:11 ` Paulo Alcantara
@ 2023-11-13 22:23   ` Steve French
  0 siblings, 0 replies; 3+ messages in thread
From: Steve French @ 2023-11-13 22:23 UTC (permalink / raw)
  To: Paulo Alcantara
  Cc: Anastasia Belova, Steve French, Ronnie Sahlberg, Shyam Prasad N,
	Tom Talpey, Jeff Layton, linux-cifs, samba-technical,
	linux-kernel, lvc-project, Ekaterina Esina

Tentatively merged into cifs-2.6.git for-next pending testing

On Mon, Nov 13, 2023 at 12:11 PM Paulo Alcantara <pc@manguebit.com> wrote:
>
> Anastasia Belova <abelova@astralinux.ru> writes:
>
> > "host=" should start with ';' (as in cifs_get_spnego_key)
> > So its length should be 6.
> >
> > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> >
> > Fixes: 7c9c3760b3a5 ("[CIFS] add constants for string lengths of keynames in SPNEGO upcall string")
> > Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
> > Co-developed-by: Ekaterina Esina <eesina@astralinux.ru>
> > Signed-off-by: Ekaterina Esina <eesina@astralinux.ru>
> > ---
> >  fs/smb/client/cifs_spnego.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
>
> Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
>


-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-13 22:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-13 14:52 [PATCH] cifs: spnego: add ';' in HOST_KEY_LEN Anastasia Belova
2023-11-13 18:11 ` Paulo Alcantara
2023-11-13 22:23   ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox