diff options
author | Anastasia Belova <abelova@astralinux.ru> | 2023-11-13 17:52:32 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-11-13 16:21:34 -0600 |
commit | ff31ba19d732efb9aca3633935d71085e68d5076 (patch) | |
tree | 44c5431f38bc154e1489aabc4c6a96c1afba14f4 /fs | |
parent | b85ea95d086471afb4ad062012a4d73cd328fa86 (diff) |
cifs: spnego: add ';' in HOST_KEY_LEN
"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: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/smb/client/cifs_spnego.c | 4 |
1 files 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 |