You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 381e4ca
Browse filesBrowse the repository at this point in the historyBrowse files
acme/store: create key temp file with O_EXCL + target mode (no world-readable race)
Fixes [HIGH] finding: atomic_write created the temp file world-readable
(mode ~0644 by umask) and only chmod'd it to 0600 afterward, leaving a race
window where private keys were readable, and used a fixed non-O_EXCL temp
name (symlink-clobber hazard). Now create the temp with create_new(true)
(O_EXCL) + .mode(mode) on Unix, force exact bits via set_mode, use a
per-call unique name (pid + atomic counter) in the target directory, and
remove the temp on error. Preserves sync_all + rename and the 0644/0600
split for chain/key files.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments