MCU Downgrade Prevention via Flash Version Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies face challenges in preventing version downgrades during reprogramming of Micro-controller Units (MCUs), particularly in low specification MCUs, due to limitations in RAM and flash memory operating principles and regulatory requirements for safety and compliance.
Innovation Solution
A method and system for preventing downgrades by writing a reprogram image in a first flash memory, identifying a previous version value stored in a second flash memory through function pointers, and deleting the reprogram image when a current version value is identified as a downgraded value compared to the previous version value.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If downgrade prevention is implemented through version comparison, then security and compliance are improved, but device complexity increases
Solution Approach 1:
The patent stores the current version number in the flash memory before reprogramming occurs. This preliminary action enables the bootloader to compare the incoming reprogram image version with the stored version, preventing downgrades by identifying when a lower version is attempted to be installed.
Solution Approach 2:
The patent introduces a version number storage mechanism in flash memory as an intermediary between the reprogramming process and the decision-making logic. This intermediary stores critical version information that the bootloader uses to make informed decisions about whether to proceed with reprogramming, simplifying the overall control flow.
2Reliability
If version comparison is performed during reprogramming, then downgrade prevention is achieved, but reprogramming time increases
Solution Approach 1:
The version number is pre-stored in the flash memory during normal operation, so that during reprogramming, the bootloader only needs to retrieve and compare this pre-stored value with the incoming version information. This eliminates the need for complex real-time version analysis during the reprogramming process.
3Reliability
If reprogram image is deleted on downgrade detection, then security is maintained, but data loss occurs
Solution Approach 1:
The patent converts the potential harm of having a downgraded version (security vulnerability) into a beneficial security feature by deleting the reprogram image when a downgrade is detected. This ensures that only authorized upward or equal version updates can succeed, while attempted downgrades are automatically prevented through image deletion.
Data Source
AI summary
A method for preventing a downgrade in a Micro-controller Unit (MCU) includes writing a reprogram image in a first flash memory through a bootloader. The method also includes recording function pointers in a predetermined location in an application loaded according to the reprogram image and calling a function designated by one of the function pointers through the bootloader to check a previous version value stored in a second flash memory. The method additionally includes deleting the reprogram image written in the first flash memory, when a current version value included in the application is identified to be a downloaded value compared to the previous version value.


