Pure-Rust asynchronous SSH library, both client and server

#28 Server signal handling is broken

Closed on March 27, 2021
jgrund on March 9, 2021

In https://tools.ietf.org/html/rfc4254#section-5.4 The following layout is described for Channel-Specific Requests:

      byte      SSH_MSG_CHANNEL_REQUEST
      uint32    recipient channel
      string    request type in US-ASCII characters only
      boolean   want reply
      ....      type-specific data follows

We take the want reply byte within server_read_authenticated when matching msg::CHANNEL_REQUEST, but then we take it again after matching the signal req_type. This is causing an error as the positioning of the buffer is then off by one.

wjohnson added a change on March 9, 2021
ZIFY4CIHVDGCBG25RJXMIQGEDL5WM32AFKZRV3HGPTDXJHRTDEAQC
wjohnson added a change on March 9, 2021
XZI3DUAWQGVBGLOSFNXGAUHUH2SROOAZKVFIFP3JBMKH6RAQFVQQC
main
pmeunier on March 9, 2021

Thanks for the report, and for the patch! @wjohnson, it seems your patch has no author, do you want to amend that, or shall I apply it as is?

wjohnson added a change on March 9, 2021
WQ4ASZK2RI3WEL4L2JDPTUAXYNWOUC6HEFZ7LAKQXPTMPEGQR4YAC
main
wjohnson on March 9, 2021

Hi @pmeunier, sorry about the author section missing. This is my first time using Pijul so I missed that part :) This should now be fixed and ready to go.

jgrund on March 27, 2021

Hi, would it be possible to land this change?

pmeunier on March 27, 2021

Yes of course. Note that you can pull it from here (pijul pull [email protected]/pijul/thrussh --from-channel :28).

pmeunier closed this discussion on March 27, 2021