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

unsafe stripping of port from hostname in http.c (incompatibility SNI sniffing with IPv6) #1945

Closed
starter48 opened this issue Feb 26, 2018 · 2 comments

Comments

@starter48
Copy link

What version of shadowsocks-libev are you using?

Latest

What operating system are you using?

Linux

What did you do?

I've send the following request to [2001:470:1:18::119]:
GET /ip/?callback=?&testdomain=test-ipv6.com&testname=test_ipv6 HTTP/1.1\r\nHost: [2001:470:1:18::119]\r\n\r\n
with atyp=4 (IPv6)

What did you expect to see?

INFO connect to [2001:470:1:18::119]:80

What did you see instead?

Pure IPv6 address truncated:
INFO connect to [2001:470:1:18::80

What is your config in detail (with all sensitive info masked)?

No matter. Problem in SNI sniffing (parse_http_header() func in http.c).
IPv6 address without port has been truncated by the last colon.
I've described it and proposed a patch here

@madeye
Copy link

madeye commented Feb 26, 2018

Please open a pull request instead.

@starter48
Copy link
Author

@dlundquist has fixed it:
https://github.com/dlundquist/sniproxy/blob/master/src/http.c
please update your repo

@madeye madeye closed this as completed in fb22adc Feb 27, 2018
madeye added a commit that referenced this issue Feb 27, 2018
leesah pushed a commit to leesah/shadowsocks-libev that referenced this issue Mar 14, 2018
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

No branches or pull requests

2 participants