News for hackers. Stuff that matters.
Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @04:31PM (#20415507)
No, software written in C is and will continue to be replaced by software written in modern memory safe languages; the trend is strong and growing, to the point where we tend to look askance at (1) new software written in C and (2) popular software written in C that doesn't need to be written in C.

The opposite is the case for network connectivity: the trend is demonstrably and decisively towards increased connectivity, and "air-gapping" is not taken seriously in the industry. There is no indication of that changing.

The comparison you're making is invalid. I'm not trying to score points; I'm observing that the litany of "this should be air-gapped" complaints isn't productive, because things are not going to be air-gapped.

(My full-time job is assessing software security and my background is in C software vulnerability research, so it's less likely that I'd be "surprised" by a new C package than that I'd warn my clients to avoid it, and flunk it in vendorsec assessments.)

Re:Vulnerabilities found in GE anesthesia machines by ziddoap on Thursday July 11, 2019 @04:39PM (#20415591)
>I'm observing that the litany of "this should be air-gapped" complaints isn't productive, because things are not going to be air-gapped.

So, how would one be productive about it?

Your post seems to say, and please correct me if I am wrong, that because things aren't currently happening and there are some barriers to making it happen, we should all give up on pushing for it? To me, that seems like a rather fatalist attitude to have. Do we apply this line of thinking to everything? Or just air-gapping?

Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @04:44PM (#20415641)
Well, I guess I'm going to say something challenging here: give up on air-gapping, since it's not going to happen. Revise your premises to assume technology that can be connected will be connected, and proceed accordingly.

I am not, by the way, happy about this, but I've also spent essentially a lifetime (minus maybe 13-14 years at the beginning) having all the surprise on this particular issue knocked out of me.

Re:Vulnerabilities found in GE anesthesia machines by hackinthebochs on Thursday July 11, 2019 @04:59PM (#20415788)
Sure, companies won't air gap willingly. But legislation can fix that. I see no reason why this world (or this country) is one where such legislation necessarily cannot happen.
Re:Vulnerabilities found in GE anesthesia machines by ziddoap on Thursday July 11, 2019 @04:58PM (#20415779)
It's really a shame that a (relatively easy to implement) solution exists to a problem, that could potentially save lives in this case, should be left to the wayside and a new solution needs to be invented. Which, that solution may also not be implemented.

I guess I have a little bit of surprise left in me on this issue.

Re:Vulnerabilities found in GE anesthesia machines by closeparen on Thursday July 11, 2019 @10:24PM (#20417590)
It's not a solution, it's a layer. Vulnerabilities still matter behind an airgap. A hospital is a large, semi-public facility. Patients are left alone in their rooms with network drops. There are legitimate business needs to transfer records in from and out to other institutions; who's to say they can't contain exploit payloads? There are contractors, vendors, and high-turnover low-skilled staff circulating every day. And even if there weren't, if you've been thinking of the airgap as a "solution" and not keeping up with patches, the first person to cross will have a ridiculously easy time with whatever's inside.

It's good to raise the bar from drive-by internet strangers to people and organizations willing to take mild physical risks, but it's not a panacea.

Re:Vulnerabilities found in GE anesthesia machines by ziddoap on Friday July 12, 2019 @08:41AM (#20420239)
I suppose I could have been more precise in my wording, and clarified that I see it as a solution to a piece of the puzzle. Indeed, you do word it better in saying it is a layer. I agree. It is a solution to facet of a problem which exists at a certain layer.

I don't quite know how my comment led you to believe that I think airgapping is a pancea which solves all the existing computer woes in the world.

I certainly don't think, and didn't intend to imply, that airgapping removes the risk from contractors or a reason to not keep up on patches. Again, I'm confused how you reached that conclusion based on my comment.

Re:Vulnerabilities found in GE anesthesia machines by aptwebapps on Friday July 12, 2019 @03:31PM (#20423658)
Unless the person you're replying to thinks you are personally currently maintaining such equipment, that's a general 'you'.

"And even if there weren't, if you've been thinking of the airgap as a "solution" and not keeping up with patches, ..."

Nobody here is going to say airgap and done, but out in the wild they will certainly deprioritize updates on airgapped equipment.

Re:Vulnerabilities found in GE anesthesia machines by ziddoap on Friday July 12, 2019 @03:57PM (#20423916)
Well I mean, I said it's a solution. They said it is not a solution, a direct response to what I specifically had said, and followed by directly responding to the rest of my statement. The entire comment seems to be directed at what I said, hinging off my use of "solution".

Perhaps the 'you' was intended to be generalized. I interpreted as directed at me, since the entirety of the comment is directed at me. Maybe I'm mistaken.

The joys of trying to have meaningful conversations over text.

Re:Vulnerabilities found in GE anesthesia machines by closeparen on Friday July 12, 2019 @11:48PM (#20426383)
If it’s a solution, legislation should just require it. If it’s one of many possible security controls that will each help a bit, we might need more nuanced and local decision making.
Re:Vulnerabilities found in GE anesthesia machines by Spooky23 on Thursday July 11, 2019 @07:51PM (#20416956)
Think beyond your scope. IT is a tool.

The risks of compromise of an anesthesia machine are scary. It’s also scary that without EMR integration, a dosage might be misreported or an allergy missed.

It’s possible to securely segment a network to defend against these types of risks. The bigger problem here is that the professional practice of IT is such a garbage fire, it’s assumed that the LAN is compromised and airgapping is the responsible choice.

Re:Vulnerabilities found in GE anesthesia machines by Kalium on Thursday July 11, 2019 @04:53PM (#20415729)
> So, how would one be productive about it?

One might start by observing that there are reasons these things aren't air-gapped. A person could go on to note which of these reasons continue to apply and are considered compelling by those who make the relevant decisions, and thus that air-gapping is likely to persist.

Re:Vulnerabilities found in GE anesthesia machines by ziddoap on Thursday July 11, 2019 @05:01PM (#20415802)
I wasn't being facetious with my question, it was made in good faith. As I'm not familiar with hospital infrastructure, nor hospital equipment, could you explain to me what reason (other than updates, which is being debated here) an anesthesia machine should not be air-gapped?
Re:Vulnerabilities found in GE anesthesia machines by Kalium on Thursday July 11, 2019 @06:56PM (#20416657)
Updates, remote monitoring and remote management all come to mind. Further, integration with other instruments is something that is sometimes considered valuable and difficult to do when everything is airgapped from everything else.
Re:Vulnerabilities found in GE anesthesia machines by jacquesm on Friday July 12, 2019 @02:01AM (#20418601)
Updates should not happen while a patient is under treatment using the machine. Remote monitoring can be done through an airgap (one way optical bridge) that does not have the ability to influence the machine. Remote management while a patient is being treated sounds wildly irresponsible.

So maybe the system could be connected to the network except for when it is treating a patient. A big red slider with 'On Air/Isolated' could be present which would lock out the patient treating options as soon as the machine is networked. Now, this would still leave some gaps: an update could be faulty, a malicious actor could install something that triggers only after a while or when the machine is used to treat a patient. But it would remove a lot of the concern I have with equipment like this being online all the time.

Re:Vulnerabilities found in GE anesthesia machines by ska on Thursday July 11, 2019 @05:44PM (#20416171)
This is true, and important (air-gapping isn't, for the most part, going to happen)

Specifically speaking to medical devices, there is a bit of systemic bias. Early hospital networks were isolated, and this led to some naive thinking about security (e.g. DICOM protocol has no auth provisions). Many early machines weren't connected to anything at all, then they were but only "safe" networks so not much care taken. Development lifecycles on complicated devices is incremental over sometimes even decades. But now hospitals etc. have lots of pressure to connect all the things, for all kinds of good and productive reasons, and air-gapping just isn't a realistic solution.

It's not an easy problem to solve, especially quickly.

You are starting to see some partial hardening of devices, which will probably be the practical solution.

Re:Vulnerabilities found in GE anesthesia machines by jacquesm on Friday July 12, 2019 @02:02AM (#20418611)
More to the point: almost every safety device installed in medical systems can be over-ridden during emergencies.

So even if you can't normally access certain records or data, if you claim it is an emergency you suddenly can!

Re:Vulnerabilities found in GE anesthesia machines by ska on Friday July 12, 2019 @08:58PM (#20425838)
This isn't true of most hardware devices at least - there are emergency shutdown procedures etc. But, to the original question, there isn't an "emergency override" that would let me change the dose or override the interlocks on received dose.

There are sometimes calibration modes or research keys that let you do odd things to, say, imaging machines. But there are also processes in place to disallow clinical use.

Re:Vulnerabilities found in GE anesthesia machines by merlincorey on Thursday July 11, 2019 @05:01PM (#20415804)
> No, software written in C is and will continue to be replaced by software written in modern memory safe languages; the trend is strong and growing, to the point where we tend to look askance at (1) new software written in C and (2) popular software written in C that doesn't need to be written in C.

When will we get an ANSI standard for one of these new fangled languages?

Go is captive to Google, and Rust is more akin to C++ than C -- neither have an actual standard with competing compilers.

Until that changes, I think plenty of new software will be written in C, especially freestanding and embedded software.

Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @05:31PM (#20416061)
Rust will displace C in embedded applications, and Mozilla will gradually POC out its displacement in browser software as well. Swift is and will continue to displace C/ObjC in client application software on Apple platforms. Java is displacing C on other mobile platforms. Go is already displacing C in serverside software. And, of course, languages like Python have overwhelmingly replaced most of what C used to be used for in conventional CRUD applications.

C is on the way out. It's not gone, but it's going. There will not be a revitalization of the language. It'll be good to know, because some things (OS kernels and device drivers) will continue to be written in C for the foreseeable future. But that's a very small niche relative to the industry as a whole.

Nobody cares, and nobody should care, about ANSI standards.

Re:Vulnerabilities found in GE anesthesia machines by nsajko on Thursday July 11, 2019 @05:51PM (#20416216)
Why would you use Rust on embedded hardware? Seems like C is a better match for embedded considering it has no borrow checker to complicate things, and the borrow checker is less useful when you do not have a heap.
Re:Vulnerabilities found in GE anesthesia machines by arcticbull on Thursday July 11, 2019 @09:19PM (#20417336)
The borrow checker isn't nearly as big a deal as you make it out to be from a complexity perspective. You have to take some time to learn the paradigm but when you do it's easy. The challenge is people assume it writes like C because it looks like C, and are frustrated when it doesn't. After a couple of months, you'll realize the borrow checker is your friend, you just need to feed it stuff in a way it understands.

The borrow checker is great for all sorts of things, like ensuring that you only have a single mutable reference or an arbitrary number of immutable references to objects (to prevent corruption) and for the pseudo-threaded model interrupts entail. Memory safety matters in embedded systems, too. You can encode state cleanly with ADT enums [2] where the language can statically detect invalid state transitions.

It's also a much more expressive language, providing you with great abstractions with no added cost. The ergonomics are pretty great compared to dealing with C once your peripherals / register accesses are wrapped, as often are already. For instance, check out the stm32 package [1].

Being able to rely on the compiler more means you get correct code faster, and debugging on embedded systems can be absolute hell. Anything that helps me avoid it is a massive win in my books.

[1] https://github.com/stm32-rs/stm32-rs

[2] https://hoverbear.org/2016/10/12/rust-state-machine-pattern/

Re:Vulnerabilities found in GE anesthesia machines by 0815test on Thursday July 11, 2019 @06:00PM (#20416289)
First of all, the borrow checker is useful any time you have data that's potentially being accessed from multiple "places" in the code. At a bare minimum, it forces you to mark such data with type constructors such as Cell<> that make it clear where error-prone shared state can occur. Secondly, Rust is an appealing alternative to C++ as a "better C" language. C++ used to be quite acceptable as such, but recent C++ standards come with a huge amount of incidental complexity, so moving to something cleaner can make sense at least for "greenfield" projects.
Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @05:54PM (#20416240)
Because Rust is memory-safe and C isn't. I agree that C is easier to write on embedded platforms and kind of enjoy writing that kind of code myself. But shipping a product requires more than just writing the code; it also entails all the verification work you have to do after the code is working to keep the product in the market, and the verification burdens on embedded software are only going to increase as people generally get more clueful about security. Memory-safe languages will (if they aren't already) be a less expensive way to get a product to market.
Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Thursday July 11, 2019 @06:15PM (#20416399)
Protip: look at the tooling requirements for safety critical software (aviation, automotive, industrial, medical...). Nobody is going to allow you to use tools that are not certified for these use cases. Certification of compilers, static checkers etc. Is a huge undertaking that only a few commercial vendors perform on their offerings. Open source is out because nobody even attempts yo run them through that process. What you are left with is highly priced toolchains for Ada, C or C++. The cheapest offerings I know start at high four figures per developer. Validating a new toolchain would likely be to the tune of high 6 up to 7 figures. Don't hold your breath.
Re:Vulnerabilities found in GE anesthesia machines by steveklabnik on Thursday July 11, 2019 @07:21PM (#20416790)
Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @06:14AM (#20419539)
Interesting. This is indeed a massive undertaking as it implicitly covers a lot of LLVM as well. It might take a couple of years until a core language is certified.
Re:Vulnerabilities found in GE anesthesia machines by Argorak on Wednesday July 17, 2019 @05:22AM (#20457775)
The LLVM got covered as part of ARM switching their toolchain to clang. (FWIW, I'm part of Ferrous Systems)
Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @06:25PM (#20416448)
I've done professional validation work in automotive, industrial (and utilities), and medical (I'm a low-level C vulnerability researcher and have been since 1995), and believe you are simply wrong.

There are, no doubt, a number of niche systems that require specific toolchains. There are, in our fallen world, systems that require Ada or even particular variants of C. If you want to tell me that aviation flight control systems are such a niche, I will believe you --- I've never had to assess one.

But it is not the case that industrial computing or medical device software are locked into memory-unsafe languages due to industry-wide certificational requirements; in fact, that's something I know not to be true from specific experience. And virtually all of the embedded systems I've had to assess over the years would have benefited, commercially, from a memory-safe implementation language.

Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @05:16AM (#20419366)
You surely must be aware of IEC 61508 and ISO 26262 if you work in that field. These govern automotive software and industrial automation (the later has no domain specific standard). It is easily verified that these standards are adhered to in practice. I worked on IEC 61508 compliant systems. And all these standards require that the tools used for compiling, verifying and testing the software is tested and certified to be correct. This certification is performed by a Notified Body. This is mandated by law for medical systems and the standard procedure for the rest.

This is a major barrier to entry for new programming languages in these markets. Note that I am not saying that improved memory safety wouldn't be useful in embedded software. But the market is so conservative in parts that real uptake is at least a decade or two away.

Re:Vulnerabilities found in GE anesthesia machines by littlestymaar on Monday July 15, 2019 @03:42AM (#20438877)
You would be very disappointed if you knew how medical software is made. For instance most of it can crash without issue (and in practice, it does a lot!): all you need is to assess the risks that could result from a crash and mitigate it (for instance: the device should be designed in a way that stops doing anything as soon as its software crashes).

I've been a contractor for a medical devices company for one year, and the process where really lightyears away from what you are describing. Nothing even forces you to write and run unit tests…

Yes, that's scary.

Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Monday July 15, 2019 @04:35PM (#20444979)
Sounds like one of my previous employers.

The next company I worked at was industry, not medical, and this one did it right. So while there's black sheep out there, not all of them are.

Side note: whether a device can fall back to becoming inert on a failure depends on the type of device and the specific risks involved with that failure mode. It may be that stopping to do anything is the wrong thing to do, e.g. in a blood pump.

Re:Vulnerabilities found in GE anesthesia machines by adrianN on Friday July 12, 2019 @01:33AM (#20418471)
All those standards have loopholes that allow you to use tools without certification provided you do the due diligence necessary. I know because I used to develop safety critical software using tools whose only merit was that they were in use before the standards required certification. Basically you run a standardized testsuite and write a document. You don't even have to pass all the tests, you just have to document why test failures don't affect the safety of your product.

Since many people are interested in using Rust for such applications, there are efforts underway to stabilize the compiler and do the necessary paperwork so that not every company needs to do it themselves.

Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @04:56AM (#20419286)
These loopholes are slowly but surely being removed. DO-178 for aviation is the first standard to do that. I am certain that the others will follow.

What test suite are you talking about? I am really curious because this would completely upset the whole industry if what you ssid was true for the toolchain.

Re:Vulnerabilities found in GE anesthesia machines by adrianN on Friday July 12, 2019 @05:07AM (#20419329)
I unfortunately don't remember where we got that testsuite, but it was a fairly basic set of C++ standards compliance tests that mainly checked that the standard library was implemented correctly. We developed according to EN-50128.
Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Thursday July 11, 2019 @06:08PM (#20416351)
I fail to see how a borrow checker can even be remotely useful when there is only one kind of lifetime for everything: until the power to the device is shut off. The only memory-related issues you can have then are out of bounds accesses and using uninitialized or stale data.
Re:Vulnerabilities found in GE anesthesia machines by dralley on Thursday July 11, 2019 @07:36PM (#20416868)
Session types. Managing hardware state via the type itself, such that it is not possible to create code that does something with (e.g. an IO pin) unless it has first been properly set up, and it's guaranteed at compile time with no runtime checks.

Guarding against mutable aliasing with respect to hardware state could be enormously valuable.

Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @06:55AM (#20419708)
How is a solution using a session type different from what you get with a C++ object with a constructor?

I don't quite understand what you are saying in your second paragraph.

Re:Vulnerabilities found in GE anesthesia machines by cortesoft on Thursday July 11, 2019 @07:35PM (#20416862)
What are you talking about? You can certainly have memory related errors on an embedded system.... and the lifetime of memory can often be shorter than the full on cycle of the device.... you can use memory within a function that is not needed outside of it, etc.

Borrow checking is unrelated to whether you are on an embedded device or not.

Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @05:26AM (#20419394)
If you need reliability and long uptime in an embedded device, dynamic memory management is shunned because it is detrimental to both. The probability of fatal memory fragmentation from bad allocation patterns is too high.
Re:Vulnerabilities found in GE anesthesia machines by pcwalton on Sunday July 14, 2019 @03:16PM (#20435327)
This is a misunderstanding of how Rust's borrow check works. It is necessary for avoiding numerous memory safety issues, not just use after free. For example:

    let mut x: Result<i32,f32> = Ok(1);
    let y = x.as_ref().unwrap();
    x = Err(1.0);
    println!("{}", y); // unsafe cast of float to int
This issue was first described to my knowledge by Dan Grossman in "Existential Types for Imperative Languages". The context was trying to make unions work in a safe dialect of C (Cyclone).
Re:Vulnerabilities found in GE anesthesia machines by tptacek on Thursday July 11, 2019 @06:29PM (#20416473)
I don't know why we're arguing about the utility of the borrow checker in static memory systems since the borrow checker is obviously not the only difference between Rust and C in that setting; we talk about Rust in embedded systems because it doesn't have a heavyweight runtime that requires (in practice) garbage collection to function, and so is suitable for environments where Java and Go aren't tenable.
Re:Vulnerabilities found in GE anesthesia machines by gmueckl on Friday July 12, 2019 @05:21AM (#20419380)
We are not arguing these points because they were not brought up and do not really distinguish rust from other system languages.
Re:Vulnerabilities found in GE anesthesia machines by nsajko on Thursday July 11, 2019 @05:48PM (#20416192)
Go has a battle-tested specification and multiple implementations.
Re:Vulnerabilities found in GE anesthesia machines by arcticbull on Thursday July 11, 2019 @09:27PM (#20417366)
There's llgo [1] too, which in my opinion is how Go should have been developed in the first place, instead of on the decrepit plan 9 toolchain, but hey, at least we have it haha.

[1] https://github.com/llvm-mirror/llgo

Re:Vulnerabilities found in GE anesthesia machines by AnimalMuppet on Thursday July 11, 2019 @05:29PM (#20416049)
> Rust is more akin to C++ than C -- neither have an actual standard with competing compilers.

C++ doesn't have an actual standard? Are you sure about that?

Re:Vulnerabilities found in GE anesthesia machines by merlincorey on Thursday July 11, 2019 @05:42PM (#20416155)
Rust and Go is what I was referring to in that case -- sorry for the confusion.

Yes both C and C++ have standards, and I consider that to be a good thing, though apparently tptacek says I shouldn't care.

Re:Vulnerabilities found in GE anesthesia machines by AnimalMuppet on Thursday July 11, 2019 @06:08PM (#20416355)
Ah, I see. My error.