summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorAnastasia Belova <abelova@astralinux.ru>2023-11-13 17:52:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 16:46:33 +0000
commit8263db0c64871e9ba342e2e9928802af54a2d53a (patch)
treed1551e59a815cce0f76a03b829bb1ab4ba56515b /fs/cifs
parent5df0c8e7e2b2ba58f971b6b20247e27e09fe4583 (diff)
downloadlinux-stable-8263db0c64871e9ba342e2e9928802af54a2d53a.tar.gz
linux-stable-8263db0c64871e9ba342e2e9928802af54a2d53a.tar.bz2
linux-stable-8263db0c64871e9ba342e2e9928802af54a2d53a.zip
cifs: spnego: add ';' in HOST_KEY_LEN
[ Upstream commit ff31ba19d732efb9aca3633935d71085e68d5076 ] "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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifs_spnego.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c
index 7f01c6e60791..6eb65988321f 100644
--- a/fs/cifs/cifs_spnego.c
+++ b/fs/cifs/cifs_spnego.c
@@ -76,8 +76,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