Live data from Hacker News

Learn how to design and defend an embedded Linux device

embeddedbits.org

21–30 of 36 posts

Re: Learn how to design and defend an embedded Linux device

#21

A question very marginally related to embedded Linux, but is there any way to do hard real time on Linux? I'm working on an embedded project that requires it, and while its achievable with microcontrollers and embedded Rust, it would just be so much easier if I had an actual OS.

Have you looked into Nuttx?

Re: Learn how to design and defend an embedded Linux device

#22
post #5

This article recommends that manufacturers put the Secure Boot public key in OTP memory, where the eventual owner of the device will be unable to change it, and also warns that the GPLv3 will prevent you from following some of its advice. It isn't about legitimate security at all, but rather about DRM that it tries to make sound like a good thing by pretending it's security.

I had a similar reaction to this. I don't see what the use is in ensuring the hardware is running software from "trustworthy" persons, especially when the device's owner is not usually considered to be part of that group. This feels like something we aught to question, why is it acceptable that even after buying some electronic device there's a part of it that the owner isn't allowed to touch? Embedded devices are ju…

Outside of consumer electronics, the relationship between hardware and software is more tight. Customers don't just buy an electronic device, they also do want the software that's inside.

Furthermore, in this context, systems are often sold and setup by a third party company. End users value more the fact that they can be sure that the software run by the device has not been tampered with, than the possibility of changing the software.

Even for desktop PCs in companies, it is not uncommon that a rather rigid management policy is enforced, so in a way in this case PCs are just general-purpose and locked down embedded systems.

Re: Learn how to design and defend an embedded Linux device

#23
post #20
post #13

Earlier quoted context omitted.

A random third party owning the trust root doesn't help you in any of those situations.

Yes it does, because it's not a random third party. It's the device manufacturer. Everyone is already dependent on some level of integrity by the device manufacturer, whether they're happy with this or not, because there is no other option. That integrity might be checked. The manufacturer may be audited. Their processes and people may be background checked. Their hiring practices subject to a standard. Some of their…

>That integrity might be checked

It might also be broken and they don't care for you and you're screwed.

Also, as was shown many a time, the manufacturer will prevent you from doing whatever you please with your own hardware, if you chose to do so. In that case, their integrity is broken by design.

Re: Learn how to design and defend an embedded Linux device

#24

Earlier quoted context omitted.

Please use the AGPL (3), which also defends against SaaSS. (Legitimate SaaS providers can still use it.)

It doesn't stop providers from hosting it unmodified, or with modifications that they don't care about releasing—that's why Mongo switched from it, because other providers just provided hosting for it unmodified.

They're providing a service to people – and giving back their improvements, so you can then use them (though not in your proprietary version, if you have one, unless you negotiate that). Unless your business is in hosting versions of (the free version of) your program, problem solved.

Re: Learn how to design and defend an embedded Linux device

#25

This article recommends that manufacturers put the Secure Boot public key in OTP memory, where the eventual owner of the device will be unable to change it, and also warns that the GPLv3 will prevent you from following some of its advice. It isn't about legitimate security at all, but rather about DRM that it tries to make sound like a good thing by pretending it's security.

Is there a way to implement secure boot for embedded devices in another way? I've been racking my brain and the only way I can think of is to have a flash of an image verification key also result in an on device regeneration of a private key. Then require the device to sign something with that private key to verify the boot. All of that would require a complicated boot process and probably an embedded controller to f…

Raptor Engineering's FlexVer is specifically working to provide trusted root without burning-in keys.

The problem is that it essentially requires an extra FPGA and few other components that provide the necessary secure key storage and attestation.

Re: Learn how to design and defend an embedded Linux device

#26

Earlier quoted context omitted.

ive not done hard real time for a number of years (usually I have foubd its not needed), but Xenomai would be one option for real hard realtime. The other option is to use the rtlinux patches, however that is not true hard real time, but for most use-cases works ok.

Interesting, thank you! I'll take a look at Xemomai, but it seems like the options are very limited. I'm building a TVC rocket, so hard real time is unfortunately a strict requirement.

Xenomai might be fast enough with some coprocessing added if necessary. It makes your RT threads have essentially "normal" POSIX RT api, but runs them on separate kernel that can respond to things like interrupts much, much faster (including stable timeslicing)

Re: Learn how to design and defend an embedded Linux device

#27
post #23
post #20

Earlier quoted context omitted.

Yes it does, because it's not a random third party. It's the device manufacturer. Everyone is already dependent on some level of integrity by the device manufacturer, whether they're happy with this or not, because there is no other option. That integrity might be checked. The manufacturer may be audited. Their processes and people may be background checked. Their hiring practices subject to a standard. Some of their…

>That integrity might be checked It might also be broken and they don't care for you and you're screwed. Also, as was shown many a time, the manufacturer will prevent you from doing whatever you please with your own hardware, if you chose to do so. In that case, their integrity is broken by design.

That's all true, but the context here is things like payment terminals, ticket machines and energy charging meters, and whether it makes sense for third parties to easily modify the software running on them.

That hardware is not "your own". It is deployed to facilitate and protect a transaction between you and someone else.

The certainly exists a possibility that the manufacturer of those devices doesn't care about protecting them, with the result that you the user get over-charged, have your card details stolen etc.

But it's hard to see how making it easy for "anyone" to modify the software on those kinds of devices in an unconstrained way doesn't pose strictly greater risks of the above kind to you the user (being over-charged etc).

Surely you would rather have to trust just a few entities in control of the device, who have some kind of quality control legal obligation through the usual network of contracts and liabilities, than trust the 100s of entities that have had some contact at some point with the device, any of whom could have modified the software on it?

Any ideas on how to solve this problem which don't involve trusted roots?

Re: Learn how to design and defend an embedded Linux device

#28

A question very marginally related to embedded Linux, but is there any way to do hard real time on Linux? I'm working on an embedded project that requires it, and while its achievable with microcontrollers and embedded Rust, it would just be so much easier if I had an actual OS.

> A question very marginally related to embedded Linux, but is there any way to do hard real time on Linux?

Go look at the Beaglebone Black/Green/Blue/AI.

The microprocessors in those run Linux but have at least two PRUs (programmable real-time unit). Those PRU units are bare-metal, hard real-time but can communicate out to the Linux system which can do the "soft" real time stuff.

Re: Learn how to design and defend an embedded Linux device

#29
post #5

This article recommends that manufacturers put the Secure Boot public key in OTP memory, where the eventual owner of the device will be unable to change it, and also warns that the GPLv3 will prevent you from following some of its advice. It isn't about legitimate security at all, but rather about DRM that it tries to make sound like a good thing by pretending it's security.

I had a similar reaction to this. I don't see what the use is in ensuring the hardware is running software from "trustworthy" persons, especially when the device's owner is not usually considered to be part of that group. This feels like something we aught to question, why is it acceptable that even after buying some electronic device there's a part of it that the owner isn't allowed to touch? Embedded devices are ju…

There is a parallel in non-electronic hardware.

Certain safes irreparably break after several attempts to incorrectly or violently unlock them. Nobody — neither a thief, nor a legitimate owner, nor the manufacturer can open them. The only option to reclaim the contents is to very slowly and with a great effort to cut them using serious industrial machines.

This is a feature that customers ask for. They want to be sure that snatching their safe in an attempt to quietly brute-force the lock or the door in a garage does not make sense. It prevents such attempts, and they agree to pay for that with the risk to turn their safe into a piece of scrap if they screw up badly.

Same applies to locking bootloaders, firmware, etc. Sometimes it's better to throw away a device than to allow a risk of tampering.

Of course, the owner should voluntarily and consciously make this decision. In the case of DRM-ridden media players, or even phones, the consumer may have different preferences but not given a choice and even not made aware, which, of course, is not great.

Re: Learn how to design and defend an embedded Linux device

#30
post #29
post #5

Earlier quoted context omitted.

I had a similar reaction to this. I don't see what the use is in ensuring the hardware is running software from "trustworthy" persons, especially when the device's owner is not usually considered to be part of that group. This feels like something we aught to question, why is it acceptable that even after buying some electronic device there's a part of it that the owner isn't allowed to touch? Embedded devices are ju…

There is a parallel in non-electronic hardware. Certain safes irreparably break after several attempts to incorrectly or violently unlock them. Nobody — neither a thief, nor a legitimate owner, nor the manufacturer can open them. The only option to reclaim the contents is to very slowly and with a great effort to cut them using serious industrial machines. This is a feature that customers ask for. They want to be sur…

The key is that the manufacturer doesn't have a way in either. The GPLv3 is okay with making software absolutely immutable in a piece of hardware. It's just not okay with locking the user out but still letting the manufacturer in.
Post reply on HN