Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERL-822: SFTP server implementation could be more liberal #3961

Closed
OTP-Maintainer opened this issue Jan 3, 2019 · 2 comments
Closed

ERL-822: SFTP server implementation could be more liberal #3961

OTP-Maintainer opened this issue Jan 3, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@OTP-Maintainer
Copy link

Original reporter: kryostoffer
Affected version: OTP-21.2.1
Fixed in version: OTP-21.3
Component: ssh
Migrated from: https://bugs.erlang.org/browse/ERL-822


I have some networking equipment with a partly broken SFTP client implementation.

Everything with crypt, authentication, subsystem and channel is working fine. But the problem lies withing the SFTP protocol. The equipment is claiming to run SFTP client protocol version 3 but are sending a message with format introduced in version 4.

In attached trace at 18:08:29.454331 client is sending a SSH_FXP_STAT request, but as pr. https://tools.ietf.org/html/draft-ietf-secsh-filexfer-02 this message is incorrect as it contains what could be the flags fields, from a later versions of the protocol.

In the spirit of Postel's law I feel that the SFTP server implementation, could somewhat more liberal. When looking at the code, SFTP server does nothing with the flags anyway.

When I apply the attached patch, witch removes the strict version check for stat, the SFTP client can successfully communicate with the server.
@OTP-Maintainer
Copy link
Author

hans said:

Please submit patches as Pull Requests in [github|https://github.com/erlang/otp/]

See [Contributing to Erlang/OTP|https://github.com/erlang/otp/wiki#contributing-to-erlangotp].  This patch could be based on the maint branch.

@OTP-Maintainer
Copy link
Author

hans said:

See [PR-2077|https://github.com/erlang/otp/pull/2077] instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants