]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: refactor create_sd_buf() and and avoid corrupting the buffer
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 30 Nov 2020 01:29:20 +0000 (11:29 +1000)
committerSteve French <stfrench@microsoft.com>
Thu, 3 Dec 2020 23:12:14 +0000 (17:12 -0600)
commit47f4d165060efb8bc07f6498f804cbf43303870f
tree45513cee94669dca19d662a2c35aa410ef9924ac
parent71daa27d92192b1fc1984bbee12038529a0da79d
cifs: refactor create_sd_buf() and and avoid corrupting the buffer

When mounting with "idsfromsid" mount option, Azure
corrupted the owner SIDs due to excessive padding
caused by placing the owner fields at the end of the
security descriptor on create.  Placing owners at the
front of the security descriptor (rather than the end)
is also safer, as the number of ACEs (that follow it)
are variable.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Suggested-by: Rohith Surabattula <rohiths@microsoft.com>
CC: Stable <stable@vger.kernel.org> # v5.8
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c
fs/cifs/smb2pdu.h