Skip to content

Commit d243af7

Browse files
piastrysmfrench
authored andcommitted
SMB3: Fix persistent handles reconnect
When the client hits a network reconnect, it re-opens every open file with a create context to reconnect a persistent handle. All create context types should be 8-bytes aligned but the padding was missed for that one. As a result, some servers don't allow us to reconnect handles and return an error. The problem occurs when the problematic context is not at the end of the create request packet. Fix this by adding a proper padding at the end of the reconnect persistent handle context. Cc: Stable <[email protected]> # 4.19.x Signed-off-by: Pavel Shilovsky <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent a99d808 commit d243af7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/cifs/smb2pdu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,7 @@ struct create_durable_handle_reconnect_v2 {
838838
struct create_context ccontext;
839839
__u8 Name[8];
840840
struct durable_reconnect_context_v2 dcontext;
841+
__u8 Pad[4];
841842
} __packed;
842843

843844
/* See MS-SMB2 2.2.13.2.5 */

0 commit comments

Comments
 (0)