From 4a414456986611eadd79cd796db70f406db3cc4e Mon Sep 17 00:00:00 2001 From: jpandre Date: Tue, 4 Dec 2007 07:55:59 +0000 Subject: [PATCH] Added alignment checks in ACL sanity checking --- libntfs-3g/security.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libntfs-3g/security.c b/libntfs-3g/security.c index 8869b7e5..3f341cf1 100644 --- a/libntfs-3g/security.c +++ b/libntfs-3g/security.c @@ -668,6 +668,10 @@ static BOOL valid_securattr(const char *securattr, unsigned int attrsz) && (phead->revision == SECURITY_DESCRIPTOR_REVISION) && phead->owner && phead->group + && !(phead->owner & cpu_to_le32(3)) + && !(phead->group & cpu_to_le32(3)) + && !(phead->dacl & cpu_to_le32(3)) + && !(phead->sacl & cpu_to_le32(3)) && valid_sid((const SID*)&securattr[le32_to_cpu(phead->owner)]) && valid_sid((const SID*)&securattr[le32_to_cpu(phead->group)]) /*