Skip to content

Harden FIDO2 setup against cached sudo reuse - #11037

Closed
ErikMelton wants to merge 7 commits into
quattrofrom
fix/fido2-sudo-authorization
Closed

ErikMelton wants to merge 7 commits into
quattrofrom
fix/fido2-sudo-authorization

Conversation

@ErikMelton

@ErikMelton ErikMelton commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • invalidate cached sudo credentials before user-process FIDO2 callbacks and when setup exits
  • resolve sensitive utilities and presentation callbacks through trusted fixed paths
  • preserve atomic root-owned credential staging with cleanup across failure paths

Tests

  • ./test/shell.d/security-fido2-test.sh
  • bash test/shell.d/floating-terminal-test.sh
  • ./test/shell.d/plymouth-set-test.sh
  • ./test/cli
  • bash syntax checks and git diff --check

Reported-by: Sean https://github.com/shuber Huber

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Pre-setup presentation helpers can still execute binaries from a user-controlled PATH while cached sudo credentials remain live.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Hardens FIDO2 enrollment by isolating privileged credentials and using trusted executable paths.

Changes:

  • Invalidates cached sudo credentials around FIDO2 operations.
  • Preserves atomic credential staging and failure cleanup.
  • Adds PATH-poisoning and presentation callback tests.
File summaries
File Description
bin/omarchy-setup-security-fido2 Hardens FIDO2 setup and credential staging.
bin/omarchy-launch-floating-terminal-with-presentation Resolves presentation scripts through Omarchy paths.
test/shell.d/security-fido2-test.sh Tests sudo invalidation, PATH isolation, and cleanup.
test/shell.d/floating-terminal-test.sh Tests fixed presentation callback paths.
test/shell.d/plymouth-set-test.sh Adapts presentation-wrapper fixtures.
Review details
  • Files reviewed: 3/5 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@omarchybot

Copy link
Copy Markdown
Collaborator

#9873 has merged into quattro and changes the FIDO2 polkit-stack heredoc this PR also edits. The security-isolation work remains separate and stays open. Rebase onto the landed stack, preserving include system-auth for auth/account/password/session along with the FIDO2 lines; the earlier bare pam_unix fallback must not return when the sudo/path changes are reconciled.

Scope checked by GPT-6 in Codex and Codex Medium against the current diffs and landed fix; independence is not guaranteed. No runtime tests were rerun for this reconciliation.

@jandrusk

Copy link
Copy Markdown

Thanks for the cold-sudo / fixed-path hardening — direction looks right for FIDO2 setup.

Two blockers before review can finish:

  1. PATH before cold sudo — Copilot's note still holds: presentation helpers can resolve from a user-controlled PATH while a cached sudo timestamp may still be live. Please invalidate sudo (or force absolute /usr/bin/… paths) before any helper lookup.
  2. Rebase — Defer to system-auth in the polkit stack written by fingerprint/FIDO2 setup #9873 merged and changed the FIDO2 polkit-stack heredoc this PR also edits; please rebase onto current quattro and keep the include system-auth bits omarchybot called out.

Happy to re-review after those land.

@ErikMelton

Copy link
Copy Markdown
Member Author

Superceded by #16810

@ErikMelton ErikMelton closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants