Document a sudoers caveat for madtea update in SECURITY.md (as-root arbitrary read via --apply) #269
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#269
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?
madtea update --apply <path> --sha256 <hex>(internal/cmd/update/update.goaround L538) reads an arbitrary path and writes attacker-chosen bytes to the resolved binary path if the sha256 matches the supplied hex. Under generalsudothis is no escalation (the caller is already root). It only becomes an escalation under a NARROWNOPASSWDsudoers rule scoped tomadtea update:got %spath inverify.go:58), leaking hashes of files like/etc/shadow.gosec
G304(file inclusion) is intentionally excluded (gosec.sh:53) because CLI file-path args are by design, so SAST won't flag this. The privilege-split itself is sound - root never fetches or resolves credentials, and--applyre-verifies the staged sha256 fail-closed before the swap. The only gap is the deployment footgun.Fix: add a one-line hardening caveat to SECURITY.md (or the install/update docs) warning operators NOT to whitelist
madtea updatein a NOPASSWD sudoers rule - the update flow already prompts for sudo interactively when it needs it, so a NOPASSWD carve-out is never required.Acceptance: SECURITY.md (or update docs) carries the sudoers caveat.