Commit 0892ba69 authored by Aurelien Aptel's avatar Aurelien Aptel Committed by Steve French

cifs: modefromsid: make room for 4 ACE

when mounting with modefromsid, we end up writing 4 ACE in a security
descriptor that only has room for 3, thus triggering an out-of-bounds
write. fix this by changing the min size of a security descriptor.
Signed-off-by: default avatarAurelien Aptel <aaptel@suse.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 2255397c
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
*/ */
#define DEFAULT_SEC_DESC_LEN (sizeof(struct cifs_ntsd) + \ #define DEFAULT_SEC_DESC_LEN (sizeof(struct cifs_ntsd) + \
sizeof(struct cifs_acl) + \ sizeof(struct cifs_acl) + \
(sizeof(struct cifs_ace) * 3)) (sizeof(struct cifs_ace) * 4))
/* /*
* Maximum size of a string representation of a SID: * Maximum size of a string representation of a SID:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment