News for hackers. Stuff that matters.
Re:Golang SSH Security by baby on Saturday April 15, 2017 @04:08PM (#14122574)
A few things:

1. how can an experimental library (x/) get a CVE?

2. what is "hostkey verification"? Probably the fingerprint check you usually get when you ssh into a machine + the blocking warning you get when the fingerprint of the machine suddenly changes.

3. if this is what "hostkey verification" is. How is it so hard to implement? create some sort of fingerprint out of the server's public key; prompt the user for input; cache the result.

Re:Golang SSH Security by lobster_johnson on Saturday April 15, 2017 @04:47PM (#14122774)
Every host has a public/private keypair that it stores locally. The client stores the last confirmed (or manually added) host key in ~/.ssh/known_hosts. Host key verification is checking the host key against this list.

A lot of people ignore the importance of this part. It is also a bootstrapping issue: At some point you need to get the key into known_hosts. Most people do this by confirming it the first time they connect. That's usually fine for new servers, but what about old servers, e.g. if you're a dev who just joined the company? Most companies don't seem to have a secure way of seeding clients with the initial host keys. I've never seen it.

We solve this with a script that gets them from Puppet (via PuppetDB, its repository of host "facts"). That script has to hard-code the host key of the Puppet host, of course.

Another solution is using the X.509-style certs to sign each host with your own CA, but I haven't looked into that workflow. Edit: It's actually a much nicer workflow. You can sign users, too.

Re:Golang SSH Security by uiri on Sunday April 16, 2017 @12:12PM (#14126256)
That's usually fine for new servers, but what about old servers, e.g. if you're a dev who just joined the company? Most companies don't seem to have a secure way of seeding clients with the initial host keys. I've never seen it.

One way to do this is via SSHFP (ssh fingerprint) records in DNS. Unfortunately they do not seem to be particularly widely supported nor widely used.

Re:Golang SSH Security by js2 on Saturday April 15, 2017 @05:29PM (#14122949)
X.509 certs are a nice workflow indeed. We recently started using it at $dayjob (combined with yubikeys) to authenticate users.
Re:Golang SSH Security by bradfitz on Saturday April 15, 2017 @10:03PM (#14123961)
The "x" in golang.org/x/* does not mean "experimental". It also doesn't mean "extension". It by definition has no definition.

We thought that was a good idea for a while, but we've recently decided we should figure out what the rules are for the x/* packages. That is https://github.com/golang/go/issues/17244.

Re:Golang SSH Security by tptacek on Saturday April 15, 2017 @04:09PM (#14122579)
What does a CVE number have to do with whether the target is experimental? A bug is a bug.
Re:Golang SSH Security by baby on Saturday April 15, 2017 @04:16PM (#14122602)
I'd expect an experimental library to possibly be filled with bugs and constantly evolve (in a breaking way) its API while having a "USE AT YOUR OWN RISK" message. Although that might not be how the namespace golang.org/x/ is defined.

Looking here: https://golang.org/doc/go1compat

> may be developed under looser compatibility requirements

looks like that might explain why it's a CVE. Also another good answer from Zaki: https://twitter.com/zmanian/status/853342150272008192

Re:Golang SSH Security by ymse on Saturday April 15, 2017 @04:43PM (#14122753)
CVEs can be thought of more as a public security advisory. Many vendors and distributions follow the CVE list. If there was no CVE, this issue might have gone unrecognised in your package manager or paid software product for a long time.
Re:Golang SSH Security by baby on Sunday April 16, 2017 @04:32AM (#14124964)
> your package manager or paid software product

I'd hope these don't use experimental libraries. Although as others pointed out to me, this is not an experimental library :) (which was the answer I was looking for)

Re:Golang SSH Security by majewsky on Saturday April 15, 2017 @06:43PM (#14123246)
> how can an experimental library (x/) get a CVE?

The golang.net/x/ libraries are widely used in production, so it's absolutely reasonable to use CVEs.

The word "experimental", in this context, means "not covered by Go's standard library's (rather strict) backwards-compatibility promise" (as can be observed in this case).

Re:Golang SSH Security by twic on Saturday April 15, 2017 @07:47PM (#14123490)
x doesn't mean experimental here. I think it's more like the x in javax, meaning extension or something. The compatibility document [1] isn't that illuminating:

"Code in sub-repositories of the main go tree, such as golang.org/x/net, may be developed under looser compatibility requirements."

[1] https://golang.org/doc/go1compat

Re:Golang SSH Security by syscomet on Saturday April 15, 2017 @06:24PM (#14123176)
blog-post author here, others are addressing the other points, but I wanted to answer Q1:

CVEs are for tracking response to issues, so that people can clearly communicate about what they are reacting to. Everyone using the library needs to update their code (unless they were already setting the callback) and so having a CVE lets them describe exactly what they're reacting to.