[BUG] Preserve empty-suffix attributes through ext lookup and rewrite #6
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/e2fsd#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The ext attribute parser treats a zero-length name suffix as the table terminator. Complete-name namespace entries, including access/default ACL keys, legitimately have empty suffixes. Validation, lookup, value-inode traversal and inline-data rewriting can consequently stop before those attributes and later entries. This violates the existing opaque-attribute preservation contract.
Reproduction
Source-audited finding; no test execution or guest reproduction is claimed. Construct an original ext inode-body table containing namespace index 2 with an empty suffix, a local value and a following ordinary key, then replace
system.datathrough the existing inline-data rewrite. The old parser returns end-of-list at the first entry. The new authoredmedia::xattr::contract_testscontrols include preservation, selected-key lookup across both tables and malformed-input refusal. A control inread_snapshot_testsexercises the actual file-read boundary before data copy.Expected and actual behavior
Expected: only the four-zero-byte terminator ends the list. Empty-suffix keys and subsequent attributes remain visible. Complete table bounds and terminator storage are validated. Exact shared values remain valid and need no duplicate storage during rewrite. A selected inline match cannot hide external corruption or a duplicate selected key; refused lookup staging is cleared.
Before the fix: the name-length byte alone ends traversal; selected inline lookup returns early; body detection treats the
extra_isizehint as an absence predicate. These shortcuts can omit legitimate metadata. Parsing and preservation remain separate from ACL policy and native authority.Environment and identity
4fe6cc68f087d4d71ce0eb82c66c5c75f81a8cb4,feature/posix-compat.c010965a9126073a2eda15fb2e79fabc97db2346.Evidence and prior checks
Implemented in signed E2fsd d586bf51 and selected by signed Integration a0e6a61a. Closing as fixed under the user's testing waiver. All thirteen new controls are authored but unrun; closure is not test/CI pass evidence. Complete ACL decoding and native permission enforcement remain separately unfinished.
Original code and fixtures are derived from the ext4 attribute layout, ext2 attribute tables, and e2fsprogs filesystem manual. No external implementation is copied or translated.
Thirteen new controls are authored but unrun. The change splits format rules and fixtures into documented modules, shares inode-body geometry, validates before rewrite publication, and retains shared values. Tests, builds, lint checks, VM/manual/profiler runs and CI observation remain deferred by user instruction. No passing result, warning-free build, full ACL decoding or native permission-enforcement acceptance is claimed.
Tracking
erikinkinen referenced this issue2026-09-29 09:43:39 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 09:43:40 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 09:43:41 +02:00