This is a note to let you know that I've just added the patch titled cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: cifs-fix-the-error-length-of-validate_negotiate_info-message.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e98ecc6e94f4e6d21c06660b0f336df02836694f Mon Sep 17 00:00:00 2001 From: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx> Date: Mon, 26 Sep 2022 11:36:29 +0800 Subject: cifs: Fix the error length of VALIDATE_NEGOTIATE_INFO message From: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx> commit e98ecc6e94f4e6d21c06660b0f336df02836694f upstream. Commit d5c7076b772a ("smb3: add smb3.1.1 to default dialect list") extend the dialects from 3 to 4, but forget to decrease the extended length when specific the dialect, then the message length is larger than expected. This maybe leak some info through network because not initialize the message body. After apply this patch, the VALIDATE_NEGOTIATE_INFO message length is reduced from 28 bytes to 26 bytes. Fixes: d5c7076b772a ("smb3: add smb3.1.1 to default dialect list") Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Acked-by: Paulo Alcantara (SUSE) <pc@xxxxxx> Reviewed-by: Tom Talpey <tom@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/cifs/smb2pdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -1137,9 +1137,9 @@ int smb3_validate_negotiate(const unsign pneg_inbuf->Dialects[0] = cpu_to_le16(server->vals->protocol_id); pneg_inbuf->DialectCount = cpu_to_le16(1); - /* structure is big enough for 3 dialects, sending only 1 */ + /* structure is big enough for 4 dialects, sending only 1 */ inbuflen = sizeof(*pneg_inbuf) - - sizeof(pneg_inbuf->Dialects[0]) * 2; + sizeof(pneg_inbuf->Dialects[0]) * 3; } rc = SMB2_ioctl(xid, tcon, NO_FILE_ID, NO_FILE_ID, Patches currently in stable-queue which might be from zhangxiaoxu5@xxxxxxxxxx are queue-5.15/cifs-fix-the-error-length-of-validate_negotiate_info-message.patch