Skip to content

fix(vfs,syscall): bound ACL entry-count and xattr name/value copies#129

Merged
kernalix7 merged 1 commit into
mainfrom
fix/xattr-acl-count-bounds
Jun 11, 2026
Merged

fix(vfs,syscall): bound ACL entry-count and xattr name/value copies#129
kernalix7 merged 1 commit into
mainfrom
fix/xattr-acl-count-bounds

Conversation

@kernalix7

Copy link
Copy Markdown
Owner

Latent (unwired exported helpers): posix_acl/nfs_acl entries[..count] + count*ENTRY_SIZE uncapped -> .min(MAX); listxattr name-length .sum() -> saturating fold; removexattr insert_attr name/value copy_from_slice -> clamp to buffer. Gate: clippy -p {vfs,syscall} ✓ + builds ✓ + fmt ✓. Conservative.

Exported helpers sliced/multiplied attacker-influenced counts/lengths
without a cap (latent — pub APIs, no wired dispatch reaches them today):

- posix_acl as_slice / posix_acl_to_xattr: entries[..count] and
  count*ACL_ENTRY_SIZE with count uncapped -> .min(MAX_ACL_ENTRIES).
- nfs_acl lookup / encode_nfsacl: entries[..count] uncapped ->
  .min(NFSACL_MAX_ENTRIES).
- listxattr list(): sum of name lengths -> saturating fold.
- removexattr insert_attr: name/value copy_from_slice into fixed buffers
  without a length bound -> clamp both sides to the buffer length.

All conservative; no behaviour change for in-range counts/lengths.
@kernalix7 kernalix7 merged commit af2b218 into main Jun 11, 2026
2 checks passed
@kernalix7 kernalix7 deleted the fix/xattr-acl-count-bounds branch June 11, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant