diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2024-11-13 08:49:44 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-11-17 16:29:09 -0600 |
commit | d6eb09fb46707a060209f077abede8c0e2c21b73 (patch) | |
tree | 3db6267eb4d0f0ce2bdd89cd0d05636460682da9 /fs/smb/server | |
parent | adc218676eef25575469234709c2d87185ca223a (diff) |
ksmbd: fix malformed unsupported smb1 negotiate response
When mounting with vers=1.0, ksmbd should return unsupported smb1
negotiate response. But this response is malformed.
[ 6010.586702] CIFS: VFS: Bad protocol string signature header 0x25000000
[ 6010.586708] 00000000: 25000000 25000000 424d53ff 00000072 ...%...%.SMBr...
[ 6010.586711] 00000010: c8408000 00000000 00000000 00000000 ..@.............
[ 6010.586713] 00000020: 00 00 b9 32 00 00 01 00 01 ...2.....
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server')
-rw-r--r-- | fs/smb/server/smb_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/server/smb_common.c b/fs/smb/server/smb_common.c index 75b4eb856d32..c3e4e0e95492 100644 --- a/fs/smb/server/smb_common.c +++ b/fs/smb/server/smb_common.c @@ -576,7 +576,7 @@ static int smb_handle_negotiate(struct ksmbd_work *work) ksmbd_debug(SMB, "Unsupported SMB1 protocol\n"); - if (ksmbd_iov_pin_rsp(work, (void *)neg_rsp, + if (ksmbd_iov_pin_rsp(work, (void *)neg_rsp + 4, sizeof(struct smb_negotiate_rsp) - 4)) return -ENOMEM; |