Patch "SMB3: GUIDs should be constructed as random but valid uuids" has been added to the 4.4-stable tree
This is a note to let you know that I've just added the patch titled
SMB3: GUIDs should be constructed as random but valid uuids
to the 4.4-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:
smb3-guids-should-be-constructed-as-random-but-valid-uuids.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
fa70b87cc6641978b20e12cc5d517e9ffc0086d4Mon Sep 17 00:00:00 2001
From: Steve French <[email protected]>
Date: Thu, 22 Sep 2016 00:39:34 -0500
Subject: SMB3: GUIDs should be constructed as random but valid uuids
From: Steve French <[email protected]>
commit fa70b87cc6641978b20e12cc5d517e9ffc0086d4 upstream.
GUIDs although random, and 16 bytes, need to be generated as proper uuids.
--- fs/cifs/cifsfs.c | 2 +- fs/cifs/connect.c | 2 +- fs/cifs/smb2ops.c | 2 +- fs/cifs/smb2pdu.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
fs/cifs/cifsfs.c +1 -1
@@ -268,7 +268,7 @@ cifs_alloc_inode(struct super_block *sb) cifs_inode->createtime =0 ; cifs_inode->epoch =0 ;#ifdef CONFIG_CIFS_SMB2 -get_random_bytes (cifs_inode->lease_key,SMB2_LEASE_KEY_SIZE ); +generate_random_uuid (cifs_inode->lease_key);#endif /* * Can not set i_flags here - they get immediately overwritten to zero
fs/cifs/connect.c +1 -1
@@ -2200,7 +2200,7 @@ cifs_get_tcp_session(struct smb_vol *volmemcpy (&tcp_ses->dstaddr, &volume_info->dstaddr,sizeof (tcp_ses->dstaddr));#ifdef CONFIG_CIFS_SMB2 -get_random_bytes (tcp_ses->client_guid,SMB2_CLIENT_GUID_SIZE ); +generate_random_uuid (tcp_ses->client_guid);#endif /* * at this point we are the only ones with the pointer
fs/cifs/smb2ops.c +1 -1
@@ -1037,7 +1037,7 @@ smb2_set_lease_key(struct inode *inode,static void smb2_new_lease_key (struct cifs_fid *fid) { -get_random_bytes (fid->lease_key,SMB2_LEASE_KEY_SIZE ); +generate_random_uuid (fid->lease_key); }#define SMB2_SYMLINK_STRUCT_SIZE \
fs/cifs/smb2pdu.c +1 -1
@@ -1186,7 +1186,7 @@ create_durable_v2_buf(struct cifs_fid *p buf->dcontext.Timeout =0 ;/* Should this be configurable by workload */ buf->dcontext.Flags =cpu_to_le32 (SMB2_DHANDLE_FLAG_PERSISTENT ); -get_random_bytes (buf->dcontext.CreateGuid,16 ); +generate_random_uuid (buf->dcontext.CreateGuid);memcpy (pfid->create_guid, buf->dcontext.CreateGuid,16 );/* SMB2_CREATE_DURABLE_HANDLE_REQUEST is "DH2Q" */
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/fix-regression-which-breaks-dfs-mounting.patch queue-4.4/cleanup-missing-frees-on-some-ioctls.patch queue-4.4/smb3-guids-should-be-constructed-as-random-but-valid-uuids.patch queue-4.4/clarify-locking-of-cifs-file-and-tcon-structures-and-make-more-granular.patch queue-4.4/do-not-send-smb3-set_info-request-if-nothing-is-changing.patch queue-4.4/set-previous-session-id-correctly-on-smb3-reconnect.patch queue-4.4/cifs-limit-the-overall-credit-acquired.patch queue-4.4/fs-cifs-keep-guid-when-assigning-fid-to-fileinfo.patch queue-4.4/display-number-of-credits-available.patch