Skip to content

Adjust error code paths.#286

Closed
stoeckmann wants to merge 2 commits into
openssh:masterfrom
stoeckmann:errorpath
Closed

Adjust error code paths.#286
stoeckmann wants to merge 2 commits into
openssh:masterfrom
stoeckmann:errorpath

Conversation

@stoeckmann

Copy link
Copy Markdown
  • Always clear password in RAM, even in error path
  • Do not call kill with -1 argument by mistake

Shoutout to @c3h2_ctf

If sshpkt functions fail, then password is not cleared with freezero.
Unconditionally call freezero to guarantee that password is removed
from RAM.
The out_ctx label can be reached before fork has been called. If this
happens, then kill -1 would be called, sending SIGTERM to all processes
reachable by the current process.

This is definitely not intended behavior.
@daztucker

Copy link
Copy Markdown
Contributor

Applied upstream, thanks.

@daztucker daztucker closed this May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants