DD-469 follow-on: check Darwin extended ACLs in recovery_crypto key custody #45
Labels
No labels
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/attention-mind-mcp#45
Loading…
Add table
Add a link
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?
Problem
On Darwin, the key-custody code in
src/attention_mind_mcp/recovery_crypto.pydoes not check extended ACLs. An extended ACL can grant access that the mode bits do not show. For example, an inheritedeveryone allow readentry makes a 0600 key file readable by other users._check_custody(lines 236-240 at main35d15ff3) checks the file type, the mode (0700 for the directory, 0600 for a key file) and the owner. It does not check ACLs. Three paths use it:_custody_directory(line 242), which opens the key directory;write_key_copy(line 258), which creates a key file;_read_key_file(line 300), which reads a key file.Background
recovery_cryptounchanged for now (#30, comment 43725). The PR #44 body records the residual.recovery_staging.py(_no_acl). It reads the extended ACL through the pinned descriptor withacl_get_fd_np. A failure to load or bind the checker, or a query error other thanENOENT, counts as an ACL present, so the check fails closed. Other platforms skip it.recovery_crypto.pyto #31 only (open risk 1, "Downstream API freeze"). #32 to #35 cannot change it without expanding a write set. That is why this gap was not fixed with #30.Acceptance criteria
recovery_crypto.Human act
ruling: the operator authorizes
recovery_crypto.pyinto a write set past the #31 downstream API freeze and picks when this runs (DD-469)Refs #6, #30, #31.
Filed under: operator-word-d982c2768589