C Labs
Explore 1 lab in C.
The firmware update process does not validate the currently installed firmware version before applying an update. In firmware_apply_update, the current_version parameter is explicitly ignored, meaning the device does not compare the incoming firmware version against the version already installed. As a result, an attacker who can supply or replay an older firmware image may downgrade the device to a previous vulnerable version.
In an OT firmware environment, this can undermine secure update protections and allow known vulnerabilities to be reintroduced after they were previously patched. A successful rollback attack may weaken authentication, bypass security fixes, restore insecure behaviour, or destabilise device operation.
Implement anti-rollback protection by comparing the incoming firmware version against the currently installed security version before applying the update. Reject firmware images with a lower version number than the stored trusted version. The security version should be stored securely and persistently, ideally in tamper-resistant storage or protected memory, and should only be updated after successful verification and installation of newer firmware.
Select a language to explore available labs for this vulnerability.
Try adjusting your language filter.
Want to skill-up in secure coding and AppSec? Try SecDim Wargames to learn how to find, hack and fix security vulnerabilities inspired by real-world incidents.
Join our secure coding and AppSec community. A discussion board to share and discuss all aspects of secure programming, AppSec, DevSecOps, fuzzing, cloudsec, AIsec code review, and more.
Read more