summaryrefslogtreecommitdiff
path: root/fs
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:50:17 +0000
commit6d028ade9db7fdc5dc0058f88279baf47d87c0d4 (patch)
tree2aab344f6d15eb14ae453ed97b0477fbee3ddfa9 /fs
parent26415e35f6699d2e33f9342bebcd149ab9725989 (diff)
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')
-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