Skip to contentSkip to conversation

SMB3: Fix persistent handles reconnect

PATCH New Pavel Shilovsky 1 participant 1 message Nov 7, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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, the server doesn't allow to reconnect handles and returns 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.

---
 fs/cifs/smb2pdu.h | 1 +
 1 file changed, 1 insertion(+)
fs/cifs/smb2pdu.h +1 -0
index ea735d59c36e..0abfde6d0b05 100644
@@ -838,6 +838,7 @@ struct create_durable_handle_reconnect_v2 {
 	struct create_context ccontext;
 	__u8   Name[8];
 	struct durable_reconnect_context_v2 dcontext;
+	__u8   Pad[4];
 } __packed;
 
 /* See MS-SMB2 2.2.13.2.5 */
Signature · 1 line
2.17.1