Skip to content
See packages

Systems

Firmware updates for deployed units: the update path is the product

A unit that can't be updated safely has a fixed expiry date. The update path is settled early in the design and paid for over the fleet's whole life.

Computing America Hardware. Custom hardware for physical automation and monitoring.

Describe the update path
4 min readComputing America
A weatherproof electronics enclosure on a pole in a remote field, an empty road leading away.

In short

  • Update cost is the number of site visits an update requires, not the size of the image: 200 units updated twice a year is 400 visits if every update needs one.
  • Authenticity has a named worst case: RFC 9124 lists unauthenticated images as a threat whose consequence is complete control of the device.
  • Rollback is an attack. A valid but old image with known vulnerabilities is a documented threat, answered by a monotonic sequence number the device refuses to go below.
  • An interrupted update must leave a bootable device. The A/B slot design writes to the unused slot while the system runs and boots the old one if the new one fails.
  • The rehearsal that matters is the failed update. Until a fleet's recovery path has been executed, the fleet can't count on having one.

A deployed unit's update path needs four properties: authenticity, rollback resistance, atomicity and recoverability.

Hardware programs are scoped around the first unit and paid for around the two hundredth. The question that settles the cost comes late, from whoever will hold the fleet: how does one of these get new software once it's bolted to a wall, or sitting in a customer's building, in another state? The answer decides whether an advisory means a software rollout or a round of site visits, and whether a fault found in the field can be fixed at all.

The unit of cost is the site visit

A fleet's update cost is the number of times someone travels to a unit, times what the trip costs, times how often the software changes over the fleet's life. Take a hypothetical 200 units across four states updated twice a year: that's 400 visits a year if every update needs one. With a working remote path it's a person watching a rollout. That difference is set early in the design, so it deserves an explicit conversation before a default settles it.

Four properties, and where each one sits

RFC 9019 (opens in a new tab) and RFC 9124 (opens in a new tab) cover most of these for constrained devices. RFC 9124 sets out the threats and requirements for authenticity, monotonic sequence numbers (rollback) and manifest expiry. RFC 9019 sets out the architecture, says a device must not fail when a power or network interruption occurs mid-update, and calls for a recovery strategy.

Fig. 1
  1. Application and health check

    Recoverability: the unit can fail its own check

  2. Update manifest

    Rollback and expiry: signed, bound to the image, sequence number

  3. First-stage boot code

    Authenticity: verifies the signature beneath the OS

    Within: Hard to change once boards ship.
  4. Storage layout

    Atomicity: A/B slots, old one kept until the new proves good

    Within: Hard to change once boards ship.
  5. Silicon and board

    Key store, monotonic counter, trusted clock

    Within: Hard to change once boards ship.

The boot code that verifies signatures sits on the same hard-to-change layers as storage and silicon, so it is hard to change once boards ship.

SourceLayers and properties follow RFC 9019 and RFC 9124; the placement is our reading of them.

PropertyWhat it prevents
AuthenticityInstalling an image from anybody who can reach the device. RFC 9124 requires the manifest to be signed and bound to its image.
Rollback resistanceReplaying a genuine older build with a known vulnerability. Deleting old files isn't an answer.
AtomicityA power cut or dropped link leaving an unbootable unit, or one running a mixture of old and new software.
RecoverabilityA build that installs correctly and then fails to work. This is the common case, and it's no security event.
What an update path has to guarantee

Atomicity is where the flash budget goes, and a common answer is the A/B slot. Android documents it in terms a buyer can check: updates are applied to the unused slot while the system is running (opens in a new tab). If the update fails to boot, the unit reboots into the old partition and stays usable. The cost is two copies of the system, a bill-of-materials decision made on day one.

A unit that stays offline can be offered a stale update

RFC 9124 names a threat that a rollback counter alone doesn't stop. A unit stays offline for a long period, then reconnects and is offered firmware newer than what it runs and older than what's current. The rollback counter doesn't stop it, because the image is newer than the installed one. RFC 9124 says “the exact mitigation for this threat depends on where the threat comes from.” Against a network attacker it suggests displaying an expiration date and asking the user to confirm. If the user is the attacker, it suggests an online check such as a trusted timestamp server. It also lists manifest expiry, which a manifest “MAY” carry and which only works with a secure clock.

Each requirement lands on a component chosen for another reason. Rollback protection needs persistent monotonic storage. Expiry, where you use it, needs a trusted time source the adversary can't set. Authenticity needs a public key the running software can't rewrite.

Rehearse the failure

A rehearsal of the successful update proves little about the failed one. Before committing, perform five failures deliberately on real units in their deployment posture. Remove power mid-write, drop the link mid-transfer, install a build that boots and doesn't work, install a build signed by the wrong key, and install an older build with a valid signature.

Write down the expected result first. The last two should be rejected, with the unit still running its current build. For the first three, record how long the unit took to be usable again and whether anybody had to travel. Those are the fleet's real operating characteristics.

When a sealed unit is better

Some devices shouldn't be field-updatable. A sensor with no writable firmware, doing one job where a technician visits monthly anyway, is better sealed, because every update mechanism is also a way in. Decide which of the two risks the operation would rather carry, and write it down.

Sources

  1. 1.A Firmware Update Architecture for Internet of Things (opens in a new tab), IETF RFC 9019
  2. 2.A Manifest Information Model for Firmware Updates in Internet of Things (IoT) Devices (opens in a new tab), IETF RFC 9124
  3. 3.A/B (seamless) system updates (opens in a new tab), Android Open Source Project

Next step

Tell us how a device gets a new build today.

Describe what happens now when a device in the field needs new software, including who drives where. We will tell you which of the four properties (authenticity, rollback resistance, atomicity, recoverability) your path already has, and which one we would add next.

Reply
A person replies, not a sequence: within one business day, from someone who would be on the engagement.

Packages

Start with a package

Four packages, each with its price on the page. Pick one and buy it online.

Billing