[BUG] Attribute deletion ignores shared and inline value-inode lifetimes #9
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#9
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
E2fsd's attribute cleanup frees each value inode referenced by a final external attribute block without reading the value inode's sharing count. It also returns immediately when no external attribute block exists, omitting inline value-inode references. Valid shared attribute values can therefore be disposed while another inode still references them, while inline references can remain allocated after owner deletion.
Reproduction
Use an EA_INODE-enabled image with two owning inodes sharing a value inode, then remove one owner whose external attribute block has its final reference. The current release_inode_xattr path calls free_inode_tree directly for the value inode. Separately, give an owner an inline value-inode reference and no external attribute block, then delete that owner: the current cleanup returns before inspecting the inline reference. These are source-derived deterministic fixture scenarios; no destructive or VM reproduction has been run under the testing waiver.
Expected and actual behavior
Expected: inspect all original inline/external attribute references; preserve unrelated/shared values, decrement the format-defined value reference count, and free storage only when its original final reference retires. Reject an ordinary inode substituted for a valid attribute-value object before mutation.
Actual source behavior: external value references reach unconditional tree disposal, independent of shared ownership, and inline-only references do not reach cleanup. The ordinary-file-kind check alone does not establish the referenced inode's attribute role or original lifetime.
Environment and identity
d019fc5d14.Evidence and prior checks
Ext value-inode acquisition and cleanup checkpoint — 29 September 2026: e2fsd
407efa3e, docs6d5da74b, integration328c153f.The original provider now streams complete access ACLs from local and EA-inode storage with exact size/role, original inode checksums, modern CRC32C binding or legacy owner/generation validation. One cached data block and fixed owned scratch admit large ACLs without a new total-size or entry-count cap. Failed or changed evidence clears staged pages and retires the matching original observation. No capability, endpoint or credential authority is added.
Shared and inline cleanup is implemented: both stores are preflighted, repeated references cannot undercount the original value, shared external tables retain their own value references, and only a final value reference disposes storage. Raw hash/count fields are distinct from timestamps, EA-only inodes refuse ordinary file selection, and uncertain nonjournaled writes retain provider fail-stop without replay. Seventeen new media/provider controls are authored and unrun, including actual retained dispatch and ACLs above 64 KiB/8191 entries.
The provider permission pass remains open for ACL-aware persistent mode changes and the remaining operation-specific effects. Native filesystem mediation, both complete EriX guest-build generations and the external Rust/LLVM guest rebuild remain unfinished. Canonical phase completion remains 16.23% weighted, 4.81% whole-item, 20/460 parents and 436/896 sub-items; no new small canonical completion item is added for this checkpoint. Reviews: provider, manual, Integration.
Source review of media/mutation/xattr_cleanup.rs, media/mutation/inode_meta.rs and media/xattr.rs. The official large extended-attribute format describes reference-counted sharing and attribute-only value inodes. Existing cleanup handles the external attribute block's sharing count but not the referenced value inode's count. Tests, builds and CI observation remain deferred; no passing or failing execution is claimed.
Tracking
Correct as part of the complete provider permission-lifetime pass and native permission enforcement. Retain separate positive, shared-owner, inline-only, malformed-role and failure cleanup controls in provider review. Keep phase completion consistent with implemented scope.
erikinkinen referenced this issue2026-09-29 14:07:01 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 14:17:05 +02:00
erikinkinen referenced this issue from erix/integration2026-09-29 14:17:06 +02:00