-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net: requires an older x/crypto version without security fix #35798
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
Comments
The x/net module has only one package that imports something from x/crypto module. It's the https://github.com/golang/net/blob/fc4aabc6c91483155dade6fbb627cc953a723260/http2/h2i/h2i.go#L38 The fix for CVE-2019-11840 affected only the Still, it's probably a good idea for x/net to require a newer version, in case someone does use that package indirectly. |
@dmitshur you've rephrased it perfectly. I'm requiring Cheers, |
Vulnerability tracking is an open ecosystem question we are working on, but I don't think it should be x/net's responsibility to pull up the version of x/crypto past a vulnerability in a component that x/net doesn't depend on. How MVS works is that each module specifies the minimum version of its dependencies it needs to work correctly, and then the go tool will pick the highest in the graph, which is expected to work for everyone thanks to semantic versioning (and the versioned import paths). I think requiring a security fix is akin to requiring a new API: the module that needs it must specify an explicit dependency in its go.mod. Relying on you transitive dependencies to pull it up is brittle: if tomorrow you remove your dependency on x/net, you'll be silently dropping back to an insecure version of salsa20! In summary, if your module is using golang.org/x/crypto/salsa20, you need to specify a recent version of x/crypto in your go.mod, for example by running
This is not how it's supposed to work, so if that's happening please open a cmd/go issue with reproduction instructions. You can check the actual final selected version with |
@FiloSottile Thanks for your time, I overlooked it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Indeed.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go get -u golang.org/x/net/
What did you expect to see?
Getting a version of x/crypto that is not vulnerable to CVE-2019-11840
What did you see instead?
The text was updated successfully, but these errors were encountered: