Skip to content

Commit

Permalink
cifs: spnego: add ';' in HOST_KEY_LEN
Browse files Browse the repository at this point in the history
[ Upstream commit ff31ba1 ]

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

Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Fixes: 7c9c376 ("[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>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Anastasia Belova authored and gregkh committed Nov 28, 2023
1 parent 95cd9b8 commit eeba3f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/smb/client/cifs_spnego.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eeba3f0

Please sign in to comment.