Ship over-the-air firmware updates reliably by signing every image, verifying the signature on the device before installing, keeping a known-good version to roll back to, and releasing the update in stages that stop automatically when health checks fail. Each control covers a different failure, so none of them is optional.
Key takeaways
- Every firmware image should be signed offline, and the device should verify that signature before it writes anything to flash.
- Rollback needs a previously verified image kept on the device, plus a rule that prevents downgrades to versions with known vulnerabilities.
- A staged roll-out limits the damage from a bad release because it widens only after health signals stay within agreed limits.
- Data format changes are the most common reason a rollback fails, so migrations must be planned before release.
What does an over-the-air update involve?
An over-the-air update is a signed image that a device downloads, checks, writes to a spare memory slot and activates, usually after a reboot. The process is simple to describe and easy to get wrong, because each step can fail independently and many failures happen in the field, where nobody is watching.
A typical pipeline runs in this order. The build system produces the image and its metadata, the image is signed, a manifest describing compatible hardware and versions is published, and the device checks that manifest against its own hardware revision and current version. The device then downloads the image in resumable chunks, verifies its hash and signature, and writes it to an inactive partition.
Devices that use two firmware slots, often called A/B partitioning, are much easier to recover. The active slot keeps running while the update is written to the other one, so a power loss during writing leaves the working system intact. The trade-off is flash capacity, since every image needs room for two copies.
Why must every firmware image be signed?
Signing lets a device confirm that an image was produced by the holder of a private key and was not altered in transit or in storage. Without signatures, anyone who can reach the update server, or intercept the connection, can install arbitrary code on the whole fleet.
A sound signing setup has a few parts that are easy to skip under deadline pressure:
- The private signing key stays in a hardware security module or an offline signing machine, never on a build server that runs general jobs.
- The device holds only the public key or key hashes in a root of trust that the update process cannot overwrite.
- Keys have a rotation plan, including how devices accept a new key without accepting an attacker's key.
- Signing happens as a separate, logged step, so a release cannot be signed without a recorded approval.
Signing has costs. A lost or compromised key can block legitimate updates or allow malicious ones, and a device with a limited processor may need a lighter signature algorithm, which changes the long-term security margin. Teams should decide these trade-offs before the first device ships, because changing the root of trust in deployed hardware is often impossible.
How does rollback keep a device recoverable?
Rollback keeps the previous verified image on the device so the bootloader can return to it when the new image fails to boot or fails its health check. The bootloader needs a simple rule: a new image is only made permanent after the application reports healthy, and an unconfirmed image is reverted after a set number of failed boots.
Rollback is often confused with a second mechanism, anti-rollback protection. Recovery rollback moves a device back to an older version for safety. Anti-rollback refuses to install any image whose security version is lower than the one already accepted, which blocks an attacker from reinstalling an old, vulnerable release. The two goals conflict, so the design must decide which versions a device may return to.
The most common failure is data. If the new firmware changes the format of stored configuration or a local database, the old firmware may not read it after rollback. The safer pattern is an expand-and-contract migration: the new release reads both formats and writes the new one, and only a later release removes the old reader.
How should a staged roll-out be run?
A staged roll-out releases an update to a small cohort first, widens the audience only after health signals stay within agreed limits, and halts automatically when they do not. The purpose is to turn an unknown defect into a small, observed problem instead of a fleet-wide incident.
Common cohort strategies include internal test devices, a canary group of volunteers or sites, a gradual percentage ramp, and groups defined by hardware revision or region. Hardware revision is often the most useful split, because a driver bug may affect only one board version.
Health signals should be decided before release. Useful ones include successful boot after update, crash or watchdog reset rate, successful check-in after reboot, and the share of devices that rolled back. Each signal needs a threshold and a hold period, because some defects appear only after hours or days of operation.
- Define the halt condition in writing before the release starts.
- Make halting a single action that stops new downloads without waiting for a human to find the right dashboard.
- Confirm that devices which are offline during the roll-out receive the update correctly when they return.
The trade-off is speed. A slow ramp keeps vulnerable devices exposed for longer, so security fixes may need a faster, pre-agreed path. Telemetry also lags. A cohort of devices that has gone silent can look healthy simply because no reports arrive, so silence should count as a failure signal.
Does the EU Cyber Resilience Act apply to updates?
The Cyber Resilience Act sets cybersecurity requirements for products with digital elements placed on the EU market, and its text includes obligations about handling vulnerabilities and providing security updates. Whether a specific device falls within scope is a question for the manufacturer and qualified counsel. The full text of the Regulation is available at Regulation (EU) 2024/2847 on EUR-Lex, and the obligations should be read from that source rather than from summaries.
For update design, the practical question is whether your process can deliver a security fix to the installed base within the time the regulation and your own support commitments require. Signing, anti-rollback rules and staged roll-out all affect that speed, so they belong in the same design review. This article is general information and not legal or tax advice.
Hypothetical examples of a staged roll-out
Here are two hypothetical scenarios:
In the first, a sensor firmware passes every boot check, but a radio driver slowly leaks memory. The defect only appears after several days of continuous operation, so a short hold period would have released the update to the full fleet before the problem was visible. The lesson is to match hold periods to the slowest failure mode the team can reasonably expect.
In the second, a gateway update changes the format of its stored device registry. The new firmware boots and passes health checks, but a rollback is impossible because the older firmware cannot parse the migrated registry. The team had tested only forward installation. An expand-and-contract migration, tested in both directions, would have made the rollback path work.
Where can a team get implementation help?
Teams can get engineering support for the update pipeline, device-side verification and telemetry, while security policy and legal decisions remain with the manufacturer. Rui Codex provides technical implementation support in these areas, and it does not provide legal, tax or compliance advice, audits or certification.
Rui Codex is led by a founder with 200+ projects delivered and 12+ years of hands-on experience in software and integration work. Published project pages are available in the Rui Codex case studies, and integration work that connects devices to back-office systems is described under system integration services. Infrastructure for signed release pipelines and monitoring is covered under cloud and DevOps services.
Frequently Asked Questions
Can a device roll back to an older firmware version safely?
A device can roll back safely only to a version that it has already verified and that is still permitted by its anti-rollback rules. Recovery rollback should target the last image that passed its health check. Versions with known vulnerabilities should be blocked by a security version counter, and any data migration must be tested in both directions before the release goes out.
What happens if power fails during an update?
The device keeps running its current image if the update is written to a separate slot and activated only after verification. A partially written image fails its signature or hash check and is discarded on the next boot. Devices without a spare slot need a recovery loader, and that design choice should be made before hardware is manufactured.
How large should the first stage of a roll-out be?
There is no universal size for the first stage. Choose a cohort small enough that a failure affects little, but large enough that the health signals produce a useful answer. Splitting by hardware revision or site often gives a better first stage than a random sample, because it isolates the hardware most likely to fail.
Does Rui Codex certify update systems?
No, Rui Codex does not provide certification, audits or compliance advice for update systems. It offers technical implementation support, such as building signed release pipelines, device-side verification logic and telemetry. Certification and regulatory decisions remain with the manufacturer and qualified advisers.
Conclusion
Reliable over-the-air updates rest on four controls that support each other: signatures that prove where an image came from, rollback that keeps devices recoverable, anti-rollback rules that block vulnerable versions, and staged releases that limit how far a defect can spread. Test each control under failure, especially power loss and data migration, because that is where designs usually break. If your team is planning or repairing an update pipeline, request a project consultation with Rui Codex or email info@ruicodex.com to discuss the technical details.
Sources
- Regulation (EU) 2024/2847 on horizontal cybersecurity requirements for products with digital elements - Publications Office of the European Union (EUR-Lex)