Skip to content

Conversation

@shunf4
Copy link

@shunf4 shunf4 commented Apr 15, 2022

openssh 8.9 introduces feature "SSH agent restriction", which
means protocol extension (SSH_AGENTC_EXTENSION) will be used
(https://www.openssh.com/agent-restrict.html#limitations).

When connecting to older pageant with openssh 8.9 client,
the message with type SSH_AGENTC_EXTENSION can't be processed
by pageant, thus SendMessage returns 0, in which case
psd and usersid is likely to be freed twice in the code,
causing crash.

This commit fixes this.

openssh 8.9 introduces feature "SSH agent restriction", which
means protocol extension (SSH_AGENTC_EXTENSION) will be used
(https://www.openssh.com/agent-restrict.html#limitations).

When connecting to older pageant with openssh 8.9 client,
the message with type SSH_AGENTC_EXTENSION can't be processed
by pageant, thus SendMessage returns 0, in which case
`psd` and `usersid` is likely to be freed twice in the code,
causing crash.

This commit fixes this.
Copy link
Owner

@cuviper cuviper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that was a clear oversight. 😬

While we're here (or perhaps another PR), do you want to increase AGENT_MAX_MSGLEN? Putty has been using 256kB for a while now:
https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=98528db25a9df211141b8711a3756ee2b6ea26e9

@shunf4
Copy link
Author

shunf4 commented Apr 28, 2022

While we're here (or perhaps another PR), do you want to increase AGENT_MAX_MSGLEN? Putty has been using 256kB for a while now: https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=98528db25a9df211141b8711a3756ee2b6ea26e9

@cuviper I've created #64.

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