-
Notifications
You must be signed in to change notification settings - Fork 18k
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
net/http, x/net/proxy: Panic triggerable by SOCKS5 server #21333
Comments
/cc @mikioh |
See https://go-review.googlesource.com/c/38278; it also fixes this issue. |
Not sure why packages in x/net repo need to have Go1.10 label, though. |
@mikioh, it gets a Go1.x label if it's vendored into std. |
If the server sends It looks like the code at https://go-review.googlesource.com/c/38278 does avoid this issue. |
Thanks for the information. Looks like it's better to add a few test cases on corrupted TLV-style data into CL 38378. |
Change https://golang.org/cl/38278 mentions this issue: |
Change https://golang.org/cl/41031 mentions this issue: |
@rsc marked CL 38278 and 41931 with Go 1.11. |
This change replaces the vendored socks client implementation with the bundle of golang.org/x/net/internal/socks package which contains fixes for 19354 and 11682. golang.org/x/net/internal/socks becomes socks_bundle.go. At git rev 61147c4. (golang.org/cl/38278) Updates #11682. Updates #18508. Updates #19354. Fixes #19688. Updates #21333. Change-Id: I8cf6c3f5eb87c24685a7592be015729f84fbed77 Reviewed-on: https://go-review.googlesource.com/41031 Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
x/net/proxy's SOCKS5 implementation has a logic error that allows the SOCKS server to trigger a client-side panic:
From https://github.com/golang/net/blob/master/proxy/socks5.go and reduced for clarity:
The length of
buf
is determined by the server here and may be less than 2.The text was updated successfully, but these errors were encountered: