Vehicle MCU Flash Bootloader Update Against Firmware Downgrade

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Firmware downgrade attacks occur during updates in vehicle microcontroller units (MCUs) due to unintended 'battery off' situations, leading to loss of version information and unreliable firmware verification, which complicates the determination of current firmware versions.

Innovation Solution

A firmware update method for MCUs involves storing version information in trailer and header blocks of flash memory, performing sector erasure and writing new blocks while maintaining trailer blocks, and using CRC checks to ensure accurate version recognition and integrity verification.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If version information is stored in RAM for firmware update comparison, then firmware version determination is simplified, but the system becomes vulnerable to battery off situations that erase RAM and cause version information loss

Engineering Contradiction:
Improvefirmware version determinationVSAvoidversion information retention
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent creates a copy of the version information by reading it from the flash memory trailer block and storing it in a separate variable `current_version` in RAM. This copy mechanism allows the version information to be accessible for comparison while the original remains preserved in non-volatile memory, solving the contradiction between ease of operation and reliability.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent performs preliminary action by reading and storing the version information from the trailer block before the firmware update process begins. This preliminary storage ensures that even if the battery turns off during the update process, the version information is already preserved and can be used for subsequent version determination.

Inventive Principle:
Principle #10Preliminary action

2Ease of manufacture

If the entire flash memory is erased during firmware update, then the update process is simplified, but previous version information is lost and downgrade attacks become harder to detect

Engineering Contradiction:
Improvefirmware update processVSAvoidprevious version information
Core Design Contradiction:
Ease of manufactureVSLoss of information

Solution Approach 1:

The patent segments the flash memory into different regions: a bootloader section and an application section. Within the application section, it identifies and preserves the trailer block containing version information while erasing only the header block. This segmentation allows selective erasure that maintains previous version information for security purposes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the trailer block containing version information from the flash memory and preserves it separately during the update process. By taking out and preserving this critical information, the system can detect firmware downgrade attempts even after the main firmware is updated.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If firmware integrity verification is performed after battery off situation, then system reliability is improved, but version information may be lost if verification fails

Engineering Contradiction:
Improvefirmware integrity verificationVSAvoidversion information
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent performs preliminary action by reading and storing the version information from the trailer block before the integrity verification process. This ensures that even if the battery turns off during verification or if verification fails, the version information is already preserved in the `current_version` variable for subsequent use.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12481495B2Firmware update method of a flash bootloader in a micro controller unit for a vehicle
Publication Date: 2025.11.25 HYUNDAI AUTOEVER
  • US12481495B2 patent drawing
  • US12481495B2 patent drawing
  • US12481495B2 patent drawing

AI summary

A method of updating firmware by a flash bootloader includes: storing current version information included in a trailer block of firmware stored in a flash memory, the firmware including the trailer block and a header block; erasing a sector in which the header block is located while maintaining a sector in which the trailer block is located in the flash memory; writing a header block of a new firmware to be downloaded in the flash memory; determining, by comparing current version information of the new firmware in the written header block and the stored current version information, whether the firmware is to be downgraded; and, in response to determining that the firmware is not to be downgraded, erasing a sector in which the trailer block is located from the flash memory, and writing a trailer block of the new firmware in the flash memory.