News for hackers. Stuff that matters.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by raverbashing on Monday August 14, 2017 @01:41PM (#15010661)
I've worked with embedded device makers that had better ideas about building redundancy and failsafe procedures into their products

While software mistakes do happen, it seems any moron these days thinks they can put out an IoT product because they know how to flash a led on Arduino and they make no effort whatsoever in thinking how to make their devices have minimum reliability

Have a user accessible USB port (from the inside) from which a signed payload can be loaded for cases like these. Would have saved several days for their customers and several shipping fees.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by striking on Monday August 14, 2017 @02:22PM (#15011079)
You could also do A/B partition booting. Whatever partition is currently running, the other one gets updated. When the update is complete, the system reboots to the updated partition. If it doesn't survive the reboot (like if the system never reaches the app and the hardware watchdog timer stops being reset), then it reboots again, back to the first partition.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by Duhck on Monday August 14, 2017 @02:50PM (#15011403)
This is the common (and correct) solution.

In this scenario, the biggest problem is updating the bootloader, which cannot do this type of fallback.

Generally people avoid updating the bootloader (for good reason) but it is necessary sometimes...

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by sliverstorm on Monday August 14, 2017 @06:49PM (#15013725)
Of course, the good thing about the bootloader is it is less likely to need updates in the first place, and it's also likely easier to verify an update with a high level of confidence, as its functionality is so tightly bounded.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by com2kid on Monday August 14, 2017 @05:47PM (#15013298)
Have two bootloaders, one is trivially provable and can always be relied on in case the entire world falls apart, and can never be updated. The second one is updatable if needs be.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by striking on Monday August 14, 2017 @04:31PM (#15012572)
Right. It's important that you leave as little logic in your bootloader as possible.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by com2kid on Monday August 14, 2017 @05:49PM (#15013309)
> (like if the system never reaches the app and the hardware watchdog timer stops being reset)

Worst case scenario is if the system does come up enough for the hardware watchdog to get kicked in a timely manner, but nothing else works.

The watchdog needs to be the last initialized bit of code on the system.

Even so, determining when a partition is "bad" is hard.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by striking on Tuesday August 15, 2017 @01:48PM (#15020540)
Of course. The hardware watchdog is just one of many things that should be taken into account. I picked it as an example, specifically because a lot of people don't know such a thing exists on many embedded systems.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by ChuckMcM on Monday August 14, 2017 @02:31PM (#15011182)
In hindsight I'm sure they will do something different. For folks who are maintaining systems with OTA updates that can't survive an OTA failure, hopefully they now realize they are in the middle of a train wreck and should get to work.

An 8 MB (64 megabits) SPI flash chip[1] is about $2. Two jumpers to power the SPI flash and set the boot/load option is another 3 - 4 cents. These take up less than 30 sq mm of board space. And they give you a tremendous back up in case of failure.

[1] http://www.mouser.com/Semiconductors/Memory/Flash-Memory/_/N...

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by danellis on Monday August 14, 2017 @04:36PM (#15012613)
If you're using external flash rather than on-die flash, doesn't that mean you'll have to copy it into RAM before running it instead of running it directly, and therefore more RAM will also be part of the extra cost?
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by ChuckMcM on Monday August 14, 2017 @04:47PM (#15012710)
That depends of course.

All of the ARM chips I'm playing with these days have a serial boot loader in ROM that you can get to by setting a pin on the CPU and powering it up that way. In such a scenario it would take no extra parts.

I believe they emulate or copy the system used by FPGAs to read a configuration from a dedicated SPI chip. Its well understood and a lot of tools can program the SPI chip to have the right sequence of bits in it to do the right thing.

If I were designing a system with OTA updates, then I would design something like this with it for this very reason.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by lb1lf on Monday August 14, 2017 @02:18PM (#15011046)
USB would add to the BoM. Much easier (methinks) to have the lock revert to the last known good configuration if you operate an I/O on the inside in an unusual way - say, turning the lock thingamajig towards the 'open' direction for >20s or so.

Also, no update should be carried out unless the user initiated it - for instance, a flashing led or an app notification tells the user an update is available - and it needs to be initiated by using the same controls as would be used for a roll-back, ensuring you do not end up locked out after updating.

That being said, the idea of a lock being online scares the bejeezus out of me. Call me a luddite, but as a minimum I want my burglars or vandals to show up, rather than nessing with me from wherever.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by Eridrus on Monday August 14, 2017 @02:36PM (#15011238)
> Call me a luddite, but as a minimum I want my burglars or vandals to show up, rather than nessing with me from wherever.

Well they can't be burglars if they never show up :p

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by OscarCunningham on Monday August 14, 2017 @03:02PM (#15011564)
They just tell your roomba to rob you.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by Eridrus on Monday August 14, 2017 @04:57PM (#15012808)
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by technofiend on Monday August 14, 2017 @02:16PM (#15011028)
Well, good points I suppose. On the other hand if you have a USB port on the thing, what's to keep someone from flashing an update that backdoors the lock? Wait a few weeks, rob the place, rinse, repeat.

Now that I think about it, I hope these devices are validating the certificate of publisher and the updates are signed.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by jacquesm on Monday August 14, 2017 @02:29PM (#15011159)
> I hope these devices are validating the certificate of publisher and the updates are signed.

You're joking right? Really, the vast majority of this iot stuff is ridiculously bad in this respect. Plain text data transfer, unsigned updates from any source based on a text message and so on. It's a disaster waiting to happen.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by stupidstupid1 on Monday August 14, 2017 @03:40PM (#15012058)
A disaster that has already and continues to happen, you mean.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by jacquesm on Monday August 14, 2017 @04:21PM (#15012476)
No, I'm thinking along the lines of large vehicle manufacturer doing an over the air update of the firmware of their vehicles bricking all of them, including the ones on the road. That kind of disaster.
Re:Airbnb's preferred smart lock vendor accidentally bricks ... by raverbashing on Monday August 14, 2017 @02:47PM (#15011352)
> what's to keep someone from flashing an update that backdoors the lock?

> from which a signed payload can be loaded

All updates should be digitally signed by the lock manufacturer

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by jlgaddis on Monday August 14, 2017 @06:44PM (#15013702)
From a security perspective, absolutely they should.

But then we complain because we don't "own" the hardware and can't hack around on it.

Re:Airbnb's preferred smart lock vendor accidentally bricks ... by swiley on Monday August 14, 2017 @06:08PM (#15013468)
These things really shouldn't be internet connected, and the firmware should be controlled by the owner.