Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anastasia Belova and committed by
Steve French
ff31ba19 b85ea95d

+2 -2
+2 -2
fs/smb/client/cifs_spnego.c
··· 64 64 * strlen(";sec=ntlmsspi") */ 65 65 #define MAX_MECH_STR_LEN 13 66 66 67 - /* strlen of "host=" */ 68 - #define HOST_KEY_LEN 5 67 + /* strlen of ";host=" */ 68 + #define HOST_KEY_LEN 6 69 69 70 70 /* strlen of ";ip4=" or ";ip6=" */ 71 71 #define IP_KEY_LEN 5