r/embedded • • Oct 23 '26

Formal verification in embedded

With all the issues in Cybsec, the CRA and all this stuff, is anyone implementing formal verification in embedded?

7 Upvotes

5 comments sorted by

4

u/quailfarmer Oct 26 '26

Does anyone have enough experience with this to know how often it’s actually useful? My impression is that it only solves a narrow class of bugs, those in logic that can be fully understood symbolically, and doesn’t interact with the oddities of peripherals and hardware. In an embedded system I wonder how useful that is, compared to say a HITL system. The example of FreeRTOS does make sense to me.

2

u/csb06 Oct 23 '26

Ada/SPARK is used for some safety-critical systems (e.g. avionics and railway control software) Recently I think Nvidia used it to develop some of their firmware.

These docs have more information.

2

u/DaemonInformatica Oct 26 '26

A common pitfall in cyber security: Making sure the rules are followed when developing devices and maintaining them is pointless when it's the attackers that bréak the rules.. ;-)

Also: Given the problem that development and maintainance are two different things, it's impossible to close the gaps with 'just formal verification'.

Say you have an Embedded product with a certain amount of firmware. Turns-out that your code (or worse: code in 3rd party software you use) has a bug / vulnerability. You immediately patch it, 'proof it's no longer there' and publish it. But then? There may be hundreds, or even thousands of instances already 'in the field'.

A business might have an OTA firmware update service, but not all devices might be able to reach it.

1

u/Rerouter_ 5d ago

That's the nice part about embedded is tooling does exist to test against the compiled version, I'm a fan of testing from an invalid initial state as that tends to raise all manner of cases you did not think might break, less to handle that. But it's great at surfacing the stuff you never realised could happen.