Skip to content

Commit d6eb09f

Browse files
namjaejeonsmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent adc2186 commit d6eb09f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/server/smb_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static int smb_handle_negotiate(struct ksmbd_work *work)
576576

577577
ksmbd_debug(SMB, "Unsupported SMB1 protocol\n");
578578

579-
if (ksmbd_iov_pin_rsp(work, (void *)neg_rsp,
579+
if (ksmbd_iov_pin_rsp(work, (void *)neg_rsp + 4,
580580
sizeof(struct smb_negotiate_rsp) - 4))
581581
return -ENOMEM;
582582

0 commit comments

Comments
 (0)