Hardware Memory Protection for Microcontroller Code Integrity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing microprocessors and microcontrollers face challenges in protecting loaded code from attackers after the secure boot process, as the code needs to interact with external data and is often larger and more complex, making it susceptible to bugs and attacks.

Innovation Solution

A hardware component is configured to protect selected executable memory by making it non-writable after the secure boot operation and ensuring that once-executed code becomes non-executable, preventing attackers from modifying or re-executing it.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If code is made writable during boot operation to allow loading and interaction with external data, then code can be loaded and executed, but code becomes susceptible to modification by attackers after boot

Engineering Contradiction:
Improvecode loadabilityVSAvoidcode protection
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements dynamic memory protection by transitioning executable memory from a writable state during boot operation to a non-writable state after boot completion. A hardware component monitors the boot process and automatically changes memory attributes, allowing code loading during boot while preventing modifications afterward. This dynamic state change resolves the contradiction between needing write access for code loading and needing read-only protection for security.

Inventive Principle:
Principle #15Dynamics

2Productivity

If loaded code is made executable to perform functions, then system operates, but code can be re-executed by attackers after being taken over

Engineering Contradiction:
Improvecode executionVSAvoidattack resistance
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by having the hardware component prepare and enforce non-reexecution protection before an attack can occur. During the boot operation, the hardware component configures memory attributes to prevent future execution of already-run code. This preemptive measure ensures that even if attackers compromise the system during operation, they cannot re-execute code to maintain control, as the execution permission has already been revoked by the preliminary hardware configuration.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If executable memory is protected from write access after boot, then code integrity is maintained, but memory cannot be updated or patched

Engineering Contradiction:
Improvecode integrityVSAvoidmemory update capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent segments memory into distinct regions with different protection characteristics. The hardware component allows write access to specific memory segments during boot operation for code loading, then selectively applies non-writable protection to segments containing executed code while leaving other segments accessible. This segmentation enables code integrity protection for critical regions while maintaining update capability for other regions, resolving the contradiction between integrity and adaptability.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10592671B2Preventing code modification after boot
Publication Date: 2020.03.17 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10592671B2 patent drawing
  • US10592671B2 patent drawing
  • US10592671B2 patent drawing

AI summary

The subject disclosure is directed towards protecting code in memory from being modified after boot, such as code used in a dedicated microprocessor or microcontroller. Hardware, such as in logic or in a memory protection unit, allows a range of memory to be made non-writeable after being loaded, e.g., via a secure boot load operation. Further, startup code that is used to configure the hardware/memory may be made non-executable after having run once, so that no further execution may occur in that space, e.g., as a result of an attack. A function in the runtime code may allow for a limited, attack-protected reconfiguration of sub-regions of memory regions during the runtime execution.