]> 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)
commit4f445b23b8d1b6eb242fa3dcba3d5eaae69faf54
tree45513cee94669dca19d662a2c35aa410ef9924ac
parentb220d155fdbaa51b4ee2e8bdc20140e6ee7c2d83
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