EErik LarssonACLs: size inherited ACLs generically
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Defined the request argument of ioctl() as unsigned long On linux the request argument of ioctl() is defined as an unsigned long, but the fuse protocol squashes it into a signed int. As a consequence the value received by ntfs-3g may appear as negative and different from the value defined by the corresponding macro. So define the request argument as unsigned long in ntfs-3g. It has however to be fed as unsigned from fuse until the fuse protocol is updated. | 6 年前 | |
ACLs: size inherited ACLs generically The previous commit targets the overflow bug report directly: count DENY ACEs with CONTAINER_INHERIT_ACE that reference CREATOR_OWNER and reserve per match slack. But it doesn't cover all cases. An ACE has an 8-byte fixed part plus a variable-length SID. ntfs_inherit_acl() replaces creator placeholders (the 12-byte CREATOR_OWNER and CREATOR_GROUP SIDs) with the real owner or group SID, often larger, so substituted ACEs grow. That substitution runs in more shapes than the previous counter recognises: for both ACCESS_ALLOWED and ACCESS_DENIED ACEs, for both CREATOR_OWNER and CREATOR_GROUP, and regardless of any inheritance flag whenever the parent descriptor's auto-inherited bit is clear. And when the resolved owner SID happens to equal the static creator-group SID (S-1-3-1), a single ACE is substituted twice in the same pass — once as owner, once as group — doubling its growth. Each of those uncovered shapes can under-allocate at the same write site as the originally reported issue. Replace the counter with ntfs_inherit_acl_extra_size(), which covers all four ALLOW/DENY x OWNER/GROUP combinations, reserves slack for the double-substitution case, validates each ACE's SID structurally before matching, and returns bytes directly so build_inherited_id() no longer encodes the per-ACE growth formula. Thanks to Alexandro Calo' from Nozomi Networks Labs. | 2 个月前 | |
Moved list.h into ntfsprogs and got rid of include/ntfs completely. | 15 年前 |