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

Bug in SOCKS5 connections - port written to wire incorrect #447

Closed
chrismasters opened this issue Jul 23, 2018 · 2 comments
Closed

Bug in SOCKS5 connections - port written to wire incorrect #447

chrismasters opened this issue Jul 23, 2018 · 2 comments
Assignees
Labels

Comments

@chrismasters
Copy link

I was trying to connect to a host on port 10022 and this was consistently not working.

When I looked in our SOCKS logs, I saw the connection was being attempted on port 10061

I believe the code in question is
https://github.com/sshnet/SSH.NET/blob/develop/src/Renci.SshNet/Session.cs#L2150

10022 / 255 = 0x27
10022 % 255 = 0x4D

0x274D == 10061 != 10022

If I change the port to 9983, then I can trick it into working

@drieseng drieseng added this to the 2017.0.0-beta1 milestone Jul 29, 2018
@drieseng drieseng self-assigned this Jul 29, 2018
@drieseng drieseng added the bug label Jul 29, 2018
@chrismasters
Copy link
Author

👍

@drieseng drieseng modified the milestones: 2017.0.0-beta1, 2020.0.0-beta1 Mar 5, 2020
@drieseng
Copy link
Member

drieseng commented Jun 7, 2020

@chrismasters 2020.0.0-beta1 is now available, and includes this fix.

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