De Raadt: Important SSH patch coming soon
From: | Theo de Raadt <deraadt-AT-openbsd.org> | |
To: | misc-AT-openbsd.org, tech-AT-openbsd.org | |
Subject: | Important SSH patch coming soon | |
Date: | Thu, 14 Jan 2016 07:05:36 -0700 | |
Message-ID: | <29041.1452780336@cvs.openbsd.org> | |
Archive‑link: | Article |
Important SSH patch coming soon. For now, every on all operating systems, please do the following: Add undocumented "UseRoaming no" to ssh_config or use "-oUseRoaming=no" to prevent upcoming #openssh client bug CVE-2016-0777. More later.
Posted Jan 14, 2016 15:56 UTC (Thu)
by dougg (guest, #1894)
[Link] (5 responses)
sshd_config: line 30: Bad configuration option: UseRoaming
So is this really a client side interim fix?
Posted Jan 14, 2016 15:59 UTC (Thu)
by rsidd (subscriber, #2582)
[Link] (3 responses)
Yes. Did you read the full message?
Posted Jan 14, 2016 16:01 UTC (Thu)
by rsidd (subscriber, #2582)
[Link] (2 responses)
Posted Jan 14, 2016 18:41 UTC (Thu)
by bronson (subscriber, #4806)
[Link] (1 responses)
Posted Jan 14, 2016 19:06 UTC (Thu)
by bronson (subscriber, #4806)
[Link]
Posted Jan 14, 2016 16:25 UTC (Thu)
by compudj (subscriber, #43335)
[Link]
Posted Jan 14, 2016 17:13 UTC (Thu)
by nye (subscriber, #51576)
[Link] (9 responses)
Anyway, it's weird that this option is supported and enabled by default in OpenSSH clients, but not supported at all in OpenSSH servers. Is it there because it's supported by other servers, or because it's planned for the future and they wanted to start getting supporting versions out there in advance, or what? Anyone know anything about SSH roaming?
Posted Jan 14, 2016 17:20 UTC (Thu)
by sytoka (guest, #38525)
[Link]
Posted Jan 14, 2016 18:03 UTC (Thu)
by Lennie (subscriber, #49641)
[Link] (7 responses)
The OpenSSH client did get an implementation, the OpenSSH server code wasn't made yet.
Posted Jan 14, 2016 19:26 UTC (Thu)
by bronson (subscriber, #4806)
[Link] (6 responses)
"Disable experimental client-side roaming support. Server side was
Sounds like the server code was written but never shipped, or shipped and then backed out.
Shipping useless code on the client is an uncharacteristic slipup.
Posted Jan 16, 2016 10:13 UTC (Sat)
by epa (subscriber, #39769)
[Link] (5 responses)
Posted Jan 16, 2016 10:30 UTC (Sat)
by karkhaz (subscriber, #99844)
[Link] (1 responses)
Even if this feature were working, I'm not sure how it could have been handled by a test case, thus I don't see that one could be written for it...looking at [1], it seems to be a combination of unit tests and black-box tests where the actual command-line programs are run to try out various aspects of the protocol.
To test roaming, one of these black box tests would presumably have to disconnect from the network and then reconnect to a different network...this arguably goes beyond the scope of what a test script should be doing :)
So given a complex protocol like SSH, I don't see how you could cover 100% of the codebase with black-box tests that exercise the _protocol_ (as opposed to unit tests for individual functions, which would be useless for detecting this problem anyway).
[1] https://github.com/openssh/openssh-portable/tree/master/r...
Posted Jan 18, 2016 17:06 UTC (Mon)
by epa (subscriber, #39769)
[Link]
Posted Jan 16, 2016 10:41 UTC (Sat)
by JGR (subscriber, #93631)
[Link] (1 responses)
Posted Jan 18, 2016 14:34 UTC (Mon)
by epa (subscriber, #39769)
[Link]
Posted Jan 17, 2016 16:40 UTC (Sun)
by dezgeg (subscriber, #92243)
[Link]
Posted Jan 14, 2016 18:04 UTC (Thu)
by Lennie (subscriber, #49641)
[Link]
This applies to these OpenSSH client versions: 5.4 up to 7.1
Posted Jan 14, 2016 18:40 UTC (Thu)
by bronson (subscriber, #4806)
[Link] (2 responses)
Sounds like OpenBSD is having a Heartbleed moment.
Posted Jan 14, 2016 19:07 UTC (Thu)
by bronson (subscriber, #4806)
[Link]
Posted Jan 18, 2016 11:24 UTC (Mon)
by nye (subscriber, #51576)
[Link]
Because SSH is not used exclusively (or perhaps even predominantly) for interactive terminal sessions.
Posted Jan 15, 2016 1:07 UTC (Fri)
by alkadim (guest, #104623)
[Link] (2 responses)
Both vulnerabilities prevented or mitigated by further non-security bugs. :V
Posted Jan 15, 2016 13:28 UTC (Fri)
by welinder (guest, #4699)
[Link] (1 responses)
That does not read like any kind of mitigation to me.
Posted Jan 15, 2016 14:22 UTC (Fri)
by alkadim (guest, #104623)
[Link]
For example, they had to use openssh 6.4 for the POC to work (for comparison,
Sure some versions and configurations are effectively exploitable and with work
Posted Jan 16, 2016 10:01 UTC (Sat)
by aggelos (subscriber, #41752)
[Link] (17 responses)
Honest question, not necessarily implying that it needs to be rewritten.
Posted Jan 16, 2016 22:09 UTC (Sat)
by khim (subscriber, #9252)
[Link] (2 responses)
We could probably have two different "canonical implementations", but few guys care to support another one given the fact that OpenSSH exists...
Posted Jan 17, 2016 11:16 UTC (Sun)
by aggelos (subscriber, #41752)
[Link]
I.e. the issues that you mention apply to most systems software written in C and an SSH implementation seems like an ideal case for using a language in which space and time memory safety violations are inexpressible...
Posted Jan 17, 2016 13:43 UTC (Sun)
by roblucid (guest, #48964)
[Link]
Something like SSH, could dynamically link in performance critical parts to allow good throughput on encrypted file copies and such with the runtime getting out the way, but most code processing options/sockets/files would be easier to write correctly and be more compact with higher level common operations, shared between many servers and system processes which do similar things. Reducing executable load sizes, page faults & cache misses, would actually improve not reduce performance.
The problem is this kind of re-architecting the system and design, is difficult by small evolutionary steps; most ppl "KNOW"object code is faster as benchmarks operate with narrow focus and warm caches rather than a more hollistic system wide approach.
Posted Jan 18, 2016 17:24 UTC (Mon)
by ballombe (subscriber, #9523)
[Link] (10 responses)
Posted Jan 19, 2016 16:48 UTC (Tue)
by pkern (subscriber, #32883)
[Link]
Posted Jan 21, 2016 13:03 UTC (Thu)
by aggelos (subscriber, #41752)
[Link] (8 responses)
Posted Jan 21, 2016 15:05 UTC (Thu)
by nybble41 (subscriber, #55106)
[Link] (7 responses)
Posted Jan 21, 2016 19:07 UTC (Thu)
by aggelos (subscriber, #41752)
[Link] (6 responses)
Leaks to swap are a different thing; my personal strategy so far is to disable swap in all systems where the drives might be sent out to be repaired, etc. But I agree that mlock'ing is desirable, of course.
Posted Jan 21, 2016 19:44 UTC (Thu)
by nybble41 (subscriber, #55106)
[Link] (5 responses)
Are they? I read the original "leaked to the address space" comment to mean that higher-level languages make it much more difficult to keep data confined to a specific area of memory; for example, a reserved area that had been mlock()'d to prevent it from being written to swap. However, I'll admit that I've never seen this "leaked to the address space" phrase used anywhere else, so it could mean something else entirely.
Posted Jan 23, 2016 12:37 UTC (Sat)
by aggelos (subscriber, #41752)
[Link] (4 responses)
Ah, unless the argument is that one would read the key data into a managed byte buffer (equivalent to using fread(), I guess :)). In that case it takes a bit of care not to do that, yes. Is that really such a big deal?
Posted Jan 23, 2016 18:39 UTC (Sat)
by nybble41 (subscriber, #55106)
[Link] (3 responses)
I considered that, but unless you intend to only manipulate the data through FFI calls and never access it with native code, there is a risk that the data will be copied outside the locked memory region. This isn't just a matter of garbage collection, either; the native code may make copies for its own use at the compiler's discretion. Limiting the high-level code to treating the data as an opaque reference and accessing it only through FFI calls is a viable option, but it implies that all the security-relevant code has been written in a separate low-level language.
Posted Jan 24, 2016 1:59 UTC (Sun)
by aggelos (subscriber, #41752)
[Link] (2 responses)
All the security-relevant code? I don't see why. AFAIU, it's all the crypto-code that would be written in a non-GC'd language. This is an important distinction (exhibit A: TLS (example: ocaml-tls)). I'm not sure what you mean by "the native code may make copies for its own use at the compiler's discretion", could you explain? Are you talking about object code or native as in "in the language that is calling the foreign code"?
Posted Jan 24, 2016 3:40 UTC (Sun)
by nybble41 (subscriber, #55106)
[Link] (1 responses)
By "security-relevant code" I meant the code which is relevant to the security of the specific data in question (private keys and sensitive cleartext) from the sort of attacks we were discussing. There are, of course, other aspects of security which can be managed by high-level code, and the use of safer languages for certain portions of the code, like parsers, offers security benefits in its own right.
Posted Jan 24, 2016 12:37 UTC (Sun)
by aggelos (subscriber, #41752)
[Link]
So, IMHO any code written in an unsafe language which is exposed to potentially malicious input is relevant to the security of the sensitive data (whether it resides in the same address space or not, depending on the specifics).
Posted Jan 20, 2016 10:46 UTC (Wed)
by Sesse (subscriber, #53779)
[Link] (2 responses)
Posted Jan 20, 2016 12:13 UTC (Wed)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
I know that people are looking at LLVM to fix this. It turns out that it's not as impossible as thought of earlier.
Posted Jan 20, 2016 12:46 UTC (Wed)
by Sesse (subscriber, #53779)
[Link]
De Raadt: Important SSH patch coming soon
"UseRoaming no" to ssh_config. I was hoping that would be to sshd_config
but when I tried with "openssh-server 1:6.0p1-4+deb7u2" (Debian 7)
I got:
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
disabled/gutted for years already, but this aspect was surprisingly
forgotten. Thanks for report from Qualys"
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
> we were able to partially or completely retrieve the OpenSSH client's
> private keys through this information leak (depending on the client's
> version, compiler, operating system, heap layout, and private keys):
De Raadt: Important SSH patch coming soon
Debian stable is on 6.7).
others could probably be too. I was not trying to belittle the importance of
the vulnerability, just reflect at the sorry state of software engineering in
general when it comes to security: bugs saving us from bugs and such, and this
from the OpenBSD guys who exercise outstanding coding practices.
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
On runtime no no's
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
By "security-relevant code" I meant the code which is relevant to the security of the specific data in question (private keys and sensitive cleartext) from the sort of attacks we were discussing.
Can I draw attention back to the fact that the private data in question was not put in danger by the code directly manipulating it? It was made accessible by a memory safety vulnerability in unrelated code which invalidated any programmer intentions on which code will be accessing the data.
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon
De Raadt: Important SSH patch coming soon