fix(askpass): a SIGKILL can leave the 0700 GIT_ASKPASS helper in TMPDIR until reboot #847
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#847
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?
What happens
madtea writes its
GIT_ASKPASShelper as a 0700 file in$TMPDIRand removes it with a signal handler on exit. An uncatchable kill (SIGKILL, a crash, a power loss) bypasses that handler, so the helper stays in$TMPDIRuntil the OS clears it, often not until reboot. It is owner-only readable, so the exposure is small, but orphaned helpers accumulate across such deaths.Why it matters
The helper is part of the credential-passing path (ADR 0013): the token reaches git through
GIT_ASKPASS, never on argv. The on-exit cleanup covers the normal case, but an uncatchable signal leaves a predictable, owner-owned artifact behind. It is hygiene, not a token on disk, but a leftover that outlives the process is worth clearing.Fix
Sweep stale madtea askpass helpers before writing a new one: on startup, or at the point the next helper is created, remove the owner-owned madtea askpass files a prior run left behind. Keep the on-exit signal-handler cleanup as the primary path; the sweep only covers the uncatchable-kill case.
Acceptance criteria
Related