A Gap in the TrustZone Preset Settings for the LPC55S69

A weakness with TrustZone preset settings.

Laura Abbott
7 min readintermediate
--
View Original

Overview

The article discusses vulnerabilities found in the TrustZone preset settings of the LPC55S69 microcontroller from NXP, highlighting potential security risks such as unauthorized debug access and exposure of the Unique Device Secret (UDS). It emphasizes the importance of secure configuration and the implications of these gaps on device security.

What You'll Learn

1

How to configure TrustZone-M on the LPC55S69 securely

2

Why debug access settings must be carefully managed in embedded systems

3

When to apply TrustZone preset settings to avoid security gaps

Prerequisites & Requirements

  • Understanding of TrustZone-M architecture and embedded systems security
  • Experience with register-level programming on microcontrollers(optional)

Key Questions Answered

What vulnerabilities exist in the TrustZone preset settings of the LPC55S69?
The article identifies vulnerabilities that can lead to unauthorized debug access and exposure of the Unique Device Secret (UDS) due to improper configuration of TrustZone preset settings. These issues arise from the order in which registers are set, particularly if faults occur after the vector table is changed.
How can debug access be unlocked on the LPC55S69?
Debug access on the LPC55S69 can be unlocked by manipulating TrustZone preset settings that allow for faults to occur after the vector table is changed. This can lead to user-controlled code running with debug registers open, despite settings designed to restrict access.
What is the significance of the Unique Device Secret (UDS) in the LPC55S69?
The Unique Device Secret (UDS) is encoded using a Physically Unclonable Function (PUF) to ensure that it is tied to a specific chip. The article explains that improper handling of debug settings can lead to the UDS being extracted, compromising device security.
What timeline events led to the discovery of the TrustZone preset settings issue?
The timeline includes key events such as the discovery of the issue on August 16, 2023, disclosure to NXP on August 21, and subsequent meetings and discussions leading up to the blog post publication on November 20, 2023.

Technologies & Tools

Microcontroller
Lpc55s69
Used as the Root of Trust in the discussed security context.
Security Architecture
Trustzone-m
Provides a secure environment for executing sensitive operations on the LPC55S69.
Security Technology
Puf (physically Unclonable Function)
Used to encode the Unique Device Secret (UDS) for secure identity.

Key Actionable Insights

1
Ensure that TrustZone preset settings are thoroughly validated before deployment to prevent security gaps.
Given the identified vulnerabilities, it is crucial to review and test the preset settings to avoid unauthorized access and potential exploits during the manufacturing process.
2
Implement a robust debugging strategy that minimizes the time debug access is enabled.
By limiting the exposure of debug access, developers can reduce the risk of unauthorized modifications and enhance the overall security posture of the embedded system.
3
Consider using additional security measures alongside TrustZone to protect sensitive data like the UDS.
Implementing layered security strategies can help mitigate risks associated with the vulnerabilities found in the TrustZone preset settings.

Common Pitfalls

1
Failing to properly configure the Memory Protection Unit (MPU) alongside TrustZone settings can lead to faults and security vulnerabilities.
This oversight can result in the ROM vectoring to user code with debug access enabled, allowing for unauthorized modifications and potential exploits.
2
Assuming that debug settings are secure without validating the TrustZone preset data can lead to significant security risks.
This misconception can expose critical device secrets and allow attackers to manipulate debug access, undermining the integrity of the secure boot process.

Related Concepts

Embedded Systems Security
Microcontroller Programming
Secure Boot Mechanisms
Trustzone Architecture