Skip to content

fix(xanmod): reject unterminated ownership proof tails - #48

Merged
LucaLin233 merged 5 commits into
mainfrom
luno/fix-xanmod-proof-tail
Sep 8, 2026
Merged

LucaLin233 merged 5 commits into
mainfrom
luno/fix-xanmod-proof-tail

Conversation

@LucaLin233

@LucaLin233 LucaLin233 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Reject nonempty unterminated third-line ownership-proof tails in both XanMod implementations. Bash read returns nonzero at EOF even after consuming tail bytes.

Scope

Only tools/xanmod-install.sh, modules/system-customize.sh, tests/test-xanmod.sh. Independent of #47. Baseline main: 44acbd5. No workflow or deployment changes.

Validation

Tests cover valid two lines, complete/empty third line and unterminated text tails. The real cleanup dispatcher is exercised with a deletion spy for candidate state and PROOF_OWNED=false, both with candidate present and absent. Assert all six allocation-state fields reset, no deletion call, and untrusted objects retained. Prior-ownership/residue cleanup is a distinct existing contract; this test does not claim it prevents deletion in every state.
Old-parser counterexample copies the old EOF logic into an inert fixture; it is not execution of a historical checkout. Existing tests compare shared module/tool functions. Previous HEAD 944e17b passed both environments; latest state-assertion commit requires fresh CI. Expected suites: MOTD and XanMod.

Risks and rollback

Intentional stricter rejection of malformed text proofs; no arbitrary-deletion exploit claim or byte-exact binary-parser claim. Revert this PR to roll back. No production configuration/SSH/APT/services operated, no credentials supplied to tests. Draft, no merge; explicit user merge confirmation remains required.

@LucaLin233
LucaLin233 marked this pull request as ready for review September 8, 2026 10:51
@LucaLin233
LucaLin233 merged commit 597fce3 into main Sep 8, 2026
2 checks passed
@LucaLin233
LucaLin233 deleted the luno/fix-xanmod-proof-tail branch September 8, 2026 10:51
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