Files
sshcrypt/tests
lotherk 6851364ccb
ci / build (push) Successful in 1m7s
bound the public blob copied out of a key container
Review found a stack-buffer-overflow in scr_openssh_load: the public blob
length came straight from the file and was memcpy'd into struct scr_priv's
4096-byte field. A crafted RSA key file (the ed25519 path cross-checks first)
overwrote the stack: ASan reported a 6000-byte write.

Also reject p or q <= 1 before BN_mod, arm the temp-file cleanup before the
write rather than after, clear the active flag on the conversion-failure path,
and block INT/TERM/HUP across ssh-keygen so a signalled child cannot rename a
fresh copy back after the handler unlinked it.

The new case crafts an oversized blob and asserts a clean exit 1, not a crash.
2026-11-21 18:38:46 +00:00
..