blob: 2e11a947974fbbb5116edc5ca2a13beb09436478 [file] [log] [blame]
Gary Morrisond4d951a2021-11-10 14:40:15 -06001Generic Threat Model
Olivier Deprez86d1ffd2021-06-01 15:37:16 +02002********************
Zelalem05fed522021-02-24 19:20:09 -06003
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +02004************
Olivier Deprez86d1ffd2021-06-01 15:37:16 +02005Introduction
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +02006************
7
Olivier Deprez86d1ffd2021-06-01 15:37:16 +02008This document provides a generic threat model for TF-A firmware.
Zelalem05fed522021-02-24 19:20:09 -06009
Zelalem Aweke023b1a42021-10-21 13:59:45 -050010.. note::
11
12 This threat model doesn't consider Root and Realm worlds introduced by
13 :ref:`Realm Management Extension (RME)`.
14
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020015********************
Zelalem05fed522021-02-24 19:20:09 -060016Target of Evaluation
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020017********************
18
Zelalem05fed522021-02-24 19:20:09 -060019In this threat model, the target of evaluation is the Trusted
20Firmware for A-class Processors (TF-A). This includes the boot ROM (BL1),
21the trusted boot firmware (BL2) and the runtime EL3 firmware (BL31) as
22shown on Figure 1. Everything else on Figure 1 is outside of the scope of
23the evaluation.
24
25TF-A can be configured in various ways. In this threat model we consider
26only the most basic configuration. To that end we make the following
27assumptions:
28
29- All TF-A images are run from either ROM or on-chip trusted SRAM. This means
30 TF-A is not vulnerable to an attacker that can probe or tamper with off-chip
31 memory.
Zelalem Aweke023b1a42021-10-21 13:59:45 -050032
Zelalem05fed522021-02-24 19:20:09 -060033- Trusted boot is enabled. This means an attacker can't boot arbitrary images
34 that are not approved by platform providers.
Zelalem Aweke023b1a42021-10-21 13:59:45 -050035
Zelalem05fed522021-02-24 19:20:09 -060036- There is no Secure-EL2. We don't consider threats that may come with
37 Secure-EL2 software.
38
Sandrine Bailleuxbe8b6542022-05-16 15:10:27 +020039- Measured boot is disabled. We do not consider the threats nor the mitigations
40 that may come with it.
41
Sandrine Bailleux78cdfdd2022-05-12 14:57:26 +020042- No experimental features are enabled. We do not consider threats that may come
43 from them.
44
Zelalem05fed522021-02-24 19:20:09 -060045Data Flow Diagram
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020046=================
47
Zelalem05fed522021-02-24 19:20:09 -060048Figure 1 shows a high-level data flow diagram for TF-A. The diagram
49shows a model of the different components of a TF-A-based system and
50their interactions with TF-A. A description of each diagram element
51is given on Table 1. On the diagram, the red broken lines indicate
52trust boundaries. Components outside of the broken lines
53are considered untrusted by TF-A.
54
55.. uml:: ../resources/diagrams/plantuml/tfa_dfd.puml
56 :caption: Figure 1: TF-A Data Flow Diagram
57
58.. table:: Table 1: TF-A Data Flow Diagram Description
59
60 +-----------------+--------------------------------------------------------+
61 | Diagram Element | Description |
62 +=================+========================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020063 | DF1 | | At boot time, images are loaded from non-volatile |
Zelalem05fed522021-02-24 19:20:09 -060064 | | memory and verified by TF-A boot firmware. These |
65 | | images include TF-A BL2 and BL31 images, as well as |
66 | | other secure and non-secure images. |
67 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020068 | DF2 | | TF-A log system framework outputs debug messages |
Zelalem05fed522021-02-24 19:20:09 -060069 | | over a UART interface. |
70 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020071 | DF3 | | Debug and trace IP on a platform can allow access |
Zelalem05fed522021-02-24 19:20:09 -060072 | | to registers and memory of TF-A. |
73 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020074 | DF4 | | Secure world software (e.g. trusted OS) interact |
Zelalem05fed522021-02-24 19:20:09 -060075 | | with TF-A through SMC call interface and/or shared |
76 | | memory. |
77 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020078 | DF5 | | Non-secure world software (e.g. rich OS) interact |
Zelalem05fed522021-02-24 19:20:09 -060079 | | with TF-A through SMC call interface and/or shared |
80 | | memory. |
81 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020082 | DF6 | | This path represents the interaction between TF-A and|
Zelalem05fed522021-02-24 19:20:09 -060083 | | various hardware IPs such as TrustZone controller |
84 | | and GIC. At boot time TF-A configures/initializes the|
85 | | IPs and interacts with them at runtime through |
86 | | interrupts and registers. |
87 +-----------------+--------------------------------------------------------+
88
89
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020090***************
Zelalem05fed522021-02-24 19:20:09 -060091Threat Analysis
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020092***************
93
Zelalem05fed522021-02-24 19:20:09 -060094In this section we identify and provide assessment of potential threats to TF-A
95firmware. The threats are identified for each diagram element on the
96data flow diagram above.
97
98For each threat, we identify the *asset* that is under threat, the
99*threat agent* and the *threat type*. Each threat is given a *risk rating*
100that represents the impact and likelihood of that threat. We also discuss
101potential mitigations.
102
103Assets
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200104======
105
Zelalem05fed522021-02-24 19:20:09 -0600106We have identified the following assets for TF-A:
107
108.. table:: Table 2: TF-A Assets
109
110 +--------------------+---------------------------------------------------+
111 | Asset | Description |
112 +====================+===================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200113 | Sensitive Data | | These include sensitive data that an attacker |
Zelalem05fed522021-02-24 19:20:09 -0600114 | | must not be able to tamper with (e.g. the Root |
115 | | of Trust Public Key) or see (e.g. secure logs, |
116 | | debugging information such as crash reports). |
117 +--------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200118 | Code Execution | | This represents the requirement that the |
Zelalem05fed522021-02-24 19:20:09 -0600119 | | platform should run only TF-A code approved by |
120 | | the platform provider. |
121 +--------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200122 | Availability | | This represents the requirement that TF-A |
Zelalem05fed522021-02-24 19:20:09 -0600123 | | services should always be available for use. |
124 +--------------------+---------------------------------------------------+
125
126Threat Agents
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200127=============
128
Zelalem05fed522021-02-24 19:20:09 -0600129To understand the attack surface, it is important to identify potential
130attackers, i.e. attack entry points. The following threat agents are
131in scope of this threat model.
132
133.. table:: Table 3: Threat Agents
134
135 +-------------------+-------------------------------------------------------+
136 | Threat Agent | Description |
137 +===================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200138 | NSCode | | Malicious or faulty code running in the Non-secure |
Zelalem05fed522021-02-24 19:20:09 -0600139 | | world, including NS-EL0 NS-EL1 and NS-EL2 levels |
140 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200141 | SecCode | | Malicious or faulty code running in the secure |
Zelalem05fed522021-02-24 19:20:09 -0600142 | | world, including S-EL0 and S-EL1 levels |
143 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200144 | AppDebug | | Physical attacker using debug signals to access |
Zelalem05fed522021-02-24 19:20:09 -0600145 | | TF-A resources |
146 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200147 | PhysicalAccess | | Physical attacker having access to external device |
Zelalem05fed522021-02-24 19:20:09 -0600148 | | communication bus and to external flash |
149 | | communication bus using common hardware |
150 +-------------------+-------------------------------------------------------+
151
152.. note::
153
154 In this threat model an advanced physical attacker that has the capability
155 to tamper with a hardware (e.g. "rewiring" a chip using a focused
156 ion beam (FIB) workstation or decapsulate the chip using chemicals) is
157 considered out-of-scope.
158
159Threat Types
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200160============
161
Zelalem05fed522021-02-24 19:20:09 -0600162In this threat model we categorize threats using the `STRIDE threat
163analysis technique`_. In this technique a threat is categorized as one
164or more of these types: ``Spoofing``, ``Tampering``, ``Repudiation``,
165``Information disclosure``, ``Denial of service`` or
166``Elevation of privilege``.
167
168Threat Risk Ratings
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200169===================
170
Zelalem05fed522021-02-24 19:20:09 -0600171For each threat identified, a risk rating that ranges
172from *informational* to *critical* is given based on the likelihood of the
173threat occuring if a mitigation is not in place, and the impact of the
174threat (i.e. how severe the consequences could be). Table 4 explains each
175rating in terms of score, impact and likelihood.
176
177.. table:: Table 4: Rating and score as applied to impact and likelihood
178
179 +-----------------------+-------------------------+---------------------------+
180 | **Rating (Score)** | **Impact** | **Likelihood** |
181 +=======================+=========================+===========================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200182 | Critical (5) | | Extreme impact to | | Threat is almost |
Zelalem05fed522021-02-24 19:20:09 -0600183 | | entire organization | certain to be exploited.|
184 | | if exploited. | |
185 | | | | Knowledge of the threat |
186 | | | and how to exploit it |
187 | | | are in the public |
188 | | | domain. |
189 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200190 | High (4) | | Major impact to entire| | Threat is relatively |
Zelalem05fed522021-02-24 19:20:09 -0600191 | | organization or single| easy to detect and |
192 | | line of business if | exploit by an attacker |
193 | | exploited | with little skill. |
194 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200195 | Medium (3) | | Noticeable impact to | | A knowledgeable insider |
Zelalem05fed522021-02-24 19:20:09 -0600196 | | line of business if | or expert attacker could|
197 | | exploited. | exploit the threat |
198 | | | without much difficulty.|
199 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200200 | Low (2) | | Minor damage if | | Exploiting the threat |
Zelalem05fed522021-02-24 19:20:09 -0600201 | | exploited or could | would require |
202 | | be used in conjunction| considerable expertise |
203 | | with other | and resources |
204 | | vulnerabilities to | |
205 | | perform a more serious| |
206 | | attack | |
207 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200208 | Informational (1) | | Poor programming | | Threat is not likely |
Zelalem05fed522021-02-24 19:20:09 -0600209 | | practice or poor | to be exploited on its |
210 | | design decision that | own, but may be used to |
211 | | may not represent an | gain information for |
212 | | immediate risk on its | launching another |
213 | | own, but may have | attack |
214 | | security implications | |
215 | | if multiplied and/or | |
216 | | combined with other | |
217 | | threats. | |
218 +-----------------------+-------------------------+---------------------------+
219
220Aggregate risk scores are assigned to identified threats;
221specifically, the impact score multiplied by the likelihood score.
222For example, a threat with high likelihood and low impact would have an
223aggregate risk score of eight (8); that is, four (4) for high likelihood
224multiplied by two (2) for low impact. The aggregate risk score determines
225the finding's overall risk level, as shown in the following table.
226
227.. table:: Table 5: Overall risk levels and corresponding aggregate scores
228
229 +---------------------+-----------------------------------+
230 | Overall Risk Level | Aggregate Risk Score |
231 | | (Impact multiplied by Likelihood) |
232 +=====================+===================================+
233 | Critical | 20–25 |
234 +---------------------+-----------------------------------+
235 | High | 12–19 |
236 +---------------------+-----------------------------------+
237 | Medium | 6–11 |
238 +---------------------+-----------------------------------+
239 | Low | 2–5 |
240 +---------------------+-----------------------------------+
241 | Informational | 1 |
242 +---------------------+-----------------------------------+
243
244The likelihood and impact of a threat depends on the
245target environment in which TF-A is running. For example, attacks
246that require physical access are unlikely in server environments while
247they are more common in Internet of Things(IoT) environments.
248In this threat model we consider three target environments:
249``Internet of Things(IoT)``, ``Mobile`` and ``Server``.
250
251Threat Assessment
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200252=================
253
Zelalem05fed522021-02-24 19:20:09 -0600254The following threats were identified by applying STRIDE analysis on
255each diagram element of the data flow diagram.
256
257+------------------------+----------------------------------------------------+
258| ID | 01 |
259+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200260| Threat | | **An attacker can mangle firmware images to |
Zelalem05fed522021-02-24 19:20:09 -0600261| | execute arbitrary code** |
262| | |
263| | | Some TF-A images are loaded from external |
264| | storage. It is possible for an attacker to access|
265| | the external flash memory and change its contents|
266| | physically, through the Rich OS, or using the |
267| | updating mechanism to modify the non-volatile |
268| | images to execute arbitrary code. |
269+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200270| Diagram Elements | DF1, DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600271+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200272| Affected TF-A | BL2, BL31 |
273| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600274+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200275| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600276+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200277| Threat Agent | PhysicalAccess, NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600278+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200279| Threat Type | Tampering, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600280+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200281| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600282+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200283| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600284+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200285| Likelihood | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600286+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200287| Total Risk Rating | Critical (25) | Critical (25) | Critical (25) |
Zelalem05fed522021-02-24 19:20:09 -0600288+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200289| Mitigations | | TF-A implements the `Trusted Board Boot (TBB)`_ |
Zelalem05fed522021-02-24 19:20:09 -0600290| | feature which prevents malicious firmware from |
291| | running on the platform by authenticating all |
292| | firmware images. In addition to this, the TF-A |
293| | boot firmware performs extra checks on |
294| | unauthenticated data, such as FIP metadata, prior|
295| | to use. |
296+------------------------+----------------------------------------------------+
297
298+------------------------+----------------------------------------------------+
299| ID | 02 |
300+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200301| Threat | | **An attacker may attempt to boot outdated, |
Zelalem05fed522021-02-24 19:20:09 -0600302| | potentially vulnerable firmware image** |
303| | |
304| | | When updating firmware, an attacker may attempt |
305| | to rollback to an older version that has unfixed |
306| | vulnerabilities. |
307+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200308| Diagram Elements | DF1, DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600309+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200310| Affected TF-A | BL2, BL31 |
311| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600312+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200313| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600314+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200315| Threat Agent | PhysicalAccess, NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600316+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200317| Threat Type | Tampering |
Zelalem05fed522021-02-24 19:20:09 -0600318+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200319| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600320+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200321| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600322+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200323| Likelihood | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600324+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200325| Total Risk Rating | Critical (25) | Critical (25) | Critical (25) |
Zelalem05fed522021-02-24 19:20:09 -0600326+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200327| Mitigations | | TF-A supports anti-rollback protection using |
Zelalem05fed522021-02-24 19:20:09 -0600328| | non-volatile counters (NV counters) as required |
329| | by `TBBR-Client specification`_. After a firmware|
330| | image is validated, the image revision number |
331| | taken from a certificate extension field is |
332| | compared with the corresponding NV counter stored|
333| | in hardware to make sure the new counter value is|
334| | larger or equal to the current counter value. |
335| | Platforms must implement this protection using |
336| | platform specific hardware NV counters. |
337+------------------------+----------------------------------------------------+
338
339+------------------------+-------------------------------------------------------+
340| ID | 03 |
341+========================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200342| Threat | | **An attacker can use Time-of-Check-Time-of-Use |
Zelalem05fed522021-02-24 19:20:09 -0600343| | (TOCTOU) attack to bypass image authentication |
344| | during the boot process** |
345| | |
346| | | Time-of-Check-Time-of-Use (TOCTOU) threats occur |
347| | when the security check is produced before the time |
348| | the resource is accessed. If an attacker is sitting |
349| | in the middle of the off-chip images, they could |
350| | change the binary containing executable code right |
351| | after the integrity and authentication check has |
352| | been performed. |
353+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200354| Diagram Elements | DF1 |
Zelalem05fed522021-02-24 19:20:09 -0600355+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200356| Affected TF-A | BL1, BL2 |
357| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600358+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200359| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600360+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200361| Threat Agent | PhysicalAccess |
Zelalem05fed522021-02-24 19:20:09 -0600362+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200363| Threat Type | Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600364+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200365| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600366+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200367| Impact | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600368+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200369| Likelihood | N/A | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600370+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200371| Total Risk Rating | N/A | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600372+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200373| Mitigations | | TF-A boot firmware copies image to on-chip |
Zelalem05fed522021-02-24 19:20:09 -0600374| | memory before authenticating an image. |
375+------------------------+-------------------------------------------------------+
376
377+------------------------+-------------------------------------------------------+
378| ID | 04 |
379+========================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200380| Threat | | **An attacker with physical access can execute |
Zelalem05fed522021-02-24 19:20:09 -0600381| | arbitrary image by bypassing the signature |
382| | verification stage using glitching techniques** |
383| | |
384| | | Glitching (Fault injection) attacks attempt to put |
385| | a hardware into a undefined state by manipulating an|
386| | environmental variable such as power supply. |
387| | |
388| | | TF-A relies on a chain of trust that starts with the|
389| | ROTPK, which is the key stored inside the chip and |
390| | the root of all validation processes. If an attacker|
391| | can break this chain of trust, they could execute |
392| | arbitrary code on the device. This could be |
393| | achieved with physical access to the device by |
394| | attacking the normal execution flow of the |
395| | process using glitching techniques that target |
396| | points where the image is validated against the |
397| | signature. |
398+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200399| Diagram Elements | DF1 |
Zelalem05fed522021-02-24 19:20:09 -0600400+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200401| Affected TF-A | BL1, BL2 |
402| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600403+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200404| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600405+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200406| Threat Agent | PhysicalAccess |
Zelalem05fed522021-02-24 19:20:09 -0600407+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200408| Threat Type | Tampering, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600409+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200410| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600411+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200412| Impact | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600413+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200414| Likelihood | N/A | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600415+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200416| Total Risk Rating | N/A | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600417+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200418| Mitigations | | The most effective mitigation is adding glitching |
Zelalem05fed522021-02-24 19:20:09 -0600419| | detection and mitigation circuit at the hardware |
420| | level. However, software techniques, |
421| | such as adding redundant checks when performing |
422| | conditional branches that are security sensitive, |
423| | can be used to harden TF-A against such attacks. |
424| | **At the moment TF-A doesn't implement such |
425| | mitigations.** |
426+------------------------+-------------------------------------------------------+
427
428+------------------------+---------------------------------------------------+
429| ID | 05 |
430+========================+===================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200431| Threat | | **Information leak via UART logs such as |
Zelalem05fed522021-02-24 19:20:09 -0600432| | crashes** |
433| | |
434| | | During the development stages of software it is |
435| | common to include crash reports with detailed |
436| | information of the CPU state including current |
437| | values of the registers, privilege level and |
438| | stack dumps. This information is useful when |
439| | debugging problems before releasing the |
440| | production version, but it could be used by an |
441| | attacker to develop a working exploit if left |
442| | in the production version. |
443+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200444| Diagram Elements | DF2 |
Zelalem05fed522021-02-24 19:20:09 -0600445+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200446| Affected TF-A | BL1, BL2, BL31 |
447| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600448+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200449| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600450+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200451| Threat Agent | AppDebug |
Zelalem05fed522021-02-24 19:20:09 -0600452+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200453| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600454+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200455| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600456+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200457| Impact | N/A | Low (2) | Low (2) |
Zelalem05fed522021-02-24 19:20:09 -0600458+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200459| Likelihood | N/A | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600460+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200461| Total Risk Rating | N/A | Medium (8) | Medium (8) |
Zelalem05fed522021-02-24 19:20:09 -0600462+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200463| Mitigations | | In TF-A, crash reporting is only enabled for |
Zelalem05fed522021-02-24 19:20:09 -0600464| | debug builds by default. Alternatively, the log |
465| | level can be tuned at build time (from verbose |
466| | to no output at all), independently of the |
467| | build type. |
468+------------------------+---------------------------------------------------+
469
470+------------------------+----------------------------------------------------+
471| ID | 06 |
472+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200473| Threat | | **An attacker can read sensitive data and |
Zelalem05fed522021-02-24 19:20:09 -0600474| | execute arbitrary code through the external |
475| | debug and trace interface** |
476| | |
477| | | Arm processors include hardware-assisted debug |
478| | and trace features that can be controlled without|
479| | the need for software operating on the platform. |
480| | If left enabled without authentication, this |
481| | feature can be used by an attacker to inspect and|
482| | modify TF-A registers and memory allowing the |
483| | attacker to read sensitive data and execute |
484| | arbitrary code. |
485+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200486| Diagram Elements | DF3 |
Zelalem05fed522021-02-24 19:20:09 -0600487+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200488| Affected TF-A | BL1, BL2, BL31 |
489| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600490+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200491| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600492+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200493| Threat Agent | AppDebug |
Zelalem05fed522021-02-24 19:20:09 -0600494+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200495| Threat Type | Tampering, Information Disclosure, |
Zelalem05fed522021-02-24 19:20:09 -0600496| | Elevation of privilege |
497+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200498| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600499+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200500| Impact | N/A | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600501+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200502| Likelihood | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600503+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200504| Total Risk Rating | N/A | Critical (20) | Critical (20) |
Zelalem05fed522021-02-24 19:20:09 -0600505+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200506| Mitigations | | Configuration of debug and trace capabilities is |
Zelalem05fed522021-02-24 19:20:09 -0600507| | platform specific. Therefore, platforms must |
508| | disable the debug and trace capability for |
509| | production releases or enable proper debug |
510| | authentication as recommended by [`DEN0034`_]. |
511+------------------------+----------------------------------------------------+
512
513+------------------------+------------------------------------------------------+
514| ID | 07 |
515+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200516| Threat | | **An attacker can perform a denial-of-service |
Zelalem05fed522021-02-24 19:20:09 -0600517| | attack by using a broken SMC call that causes the |
518| | system to reboot or enter into unknown state.** |
519| | |
520| | | Secure and non-secure clients access TF-A services |
521| | through SMC calls. Malicious code can attempt to |
522| | place the TF-A runtime into an inconsistent state |
523| | by calling unimplemented SMC call or by passing |
524| | invalid arguments. |
525+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200526| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600527+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200528| Affected TF-A | BL31 |
529| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600530+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200531| Assets | Availability |
Zelalem05fed522021-02-24 19:20:09 -0600532+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200533| Threat Agent | NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600534+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200535| Threat Type | Denial of Service |
Zelalem05fed522021-02-24 19:20:09 -0600536+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200537| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600538+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200539| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600540+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200541| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600542+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200543| Total Risk Rating | High (12) | High (12) | High (12) |
Zelalem05fed522021-02-24 19:20:09 -0600544+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200545| Mitigations | | The generic TF-A code validates SMC function ids |
Zelalem05fed522021-02-24 19:20:09 -0600546| | and arguments before using them. |
547| | Platforms that implement SiP services must also |
548| | validate SMC call arguments. |
549+------------------------+------------------------------------------------------+
550
551+------------------------+------------------------------------------------------+
552| ID | 08 |
553+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200554| Threat | | **Memory corruption due to memory overflows and |
Zelalem05fed522021-02-24 19:20:09 -0600555| | lack of boundary checking when accessing resources |
556| | could allow an attacker to execute arbitrary code, |
557| | modify some state variable to change the normal |
558| | flow of the program, or leak sensitive |
559| | information** |
560| | |
Sandrine Bailleux0b816db2022-05-13 12:40:22 +0200561| | | Like in other software, TF-A has multiple points |
562| | where memory corruption security errors can arise. |
Zelalem05fed522021-02-24 19:20:09 -0600563| | |
564| | | Some of the errors include integer overflow, |
565| | buffer overflow, incorrect array boundary checks, |
566| | and incorrect error management. |
567| | Improper use of asserts instead of proper input |
568| | validations might also result in these kinds of |
569| | errors in release builds. |
570+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200571| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600572+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200573| Affected TF-A | BL1, BL2, BL31 |
574| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600575+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200576| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600577+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200578| Threat Agent | NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600579+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200580| Threat Type | Tampering, Information Disclosure, |
Zelalem05fed522021-02-24 19:20:09 -0600581| | Elevation of Privilege |
582+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200583| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600584+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200585| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600586+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200587| Likelihood | Medium (3 | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600588+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200589| Total Risk Rating | High (15) | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600590+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200591| Mitigations | | TF-A uses a combination of manual code reviews and |
Zelalem05fed522021-02-24 19:20:09 -0600592| | automated program analysis and testing to detect |
593| | and fix memory corruption bugs. All TF-A code |
594| | including platform code go through manual code |
595| | reviews. Additionally, static code analysis is |
596| | performed using Coverity Scan on all TF-A code. |
597| | The code is also tested with |
598| | `Trusted Firmware-A Tests`_ on Juno and FVP |
599| | platforms. |
600| | |
601| | | Data received from normal world, such as addresses |
602| | and sizes identifying memory regions, are |
603| | sanitized before being used. These security checks |
604| | make sure that the normal world software does not |
605| | access memory beyond its limit. |
606| | |
607| | | By default *asserts* are only used to check for |
608| | programming errors in debug builds. Other types of |
609| | errors are handled through condition checks that |
610| | remain enabled in release builds. See |
611| | `TF-A error handling policy`_. TF-A provides an |
612| | option to use *asserts* in release builds, however |
613| | we recommend using proper runtime checks instead |
614| | of relying on asserts in release builds. |
615+------------------------+------------------------------------------------------+
616
617+------------------------+------------------------------------------------------+
618| ID | 09 |
619+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200620| Threat | | **Improperly handled SMC calls can leak register |
Zelalem05fed522021-02-24 19:20:09 -0600621| | contents** |
622| | |
Sandrine Bailleux1c7d74e2022-05-12 16:37:18 +0200623| | | When switching between worlds, TF-A register state |
624| | can leak to software in different security |
625| | contexts. |
Zelalem05fed522021-02-24 19:20:09 -0600626+------------------------+------------------------------------------------------+
Sandrine Bailleux1c7d74e2022-05-12 16:37:18 +0200627| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600628+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200629| Affected TF-A | BL31 |
630| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600631+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200632| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600633+------------------------+------------------------------------------------------+
Sandrine Bailleux1c7d74e2022-05-12 16:37:18 +0200634| Threat Agent | NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600635+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200636| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600637+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200638| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600639+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200640| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600641+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200642| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600643+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200644| Total Risk Rating | High (12) | High (12) | High (12) |
Zelalem05fed522021-02-24 19:20:09 -0600645+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200646| Mitigations | | TF-A saves and restores registers |
Zelalem05fed522021-02-24 19:20:09 -0600647| | by default when switching contexts. Build options |
648| | are also provided to save/restore additional |
649| | registers such as floating-point registers. |
650+------------------------+------------------------------------------------------+
651
652+------------------------+-----------------------------------------------------+
653| ID | 10 |
654+========================+=====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200655| Threat | | **SMC calls can leak sensitive information from |
Zelalem05fed522021-02-24 19:20:09 -0600656| | TF-A memory via microarchitectural side channels**|
657| | |
658| | | Microarchitectural side-channel attacks such as |
659| | `Spectre`_ can be used to leak data across |
660| | security boundaries. An attacker might attempt to |
661| | use this kind of attack to leak sensitive |
662| | data from TF-A memory. |
663+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200664| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600665+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200666| Affected TF-A | BL31 |
667| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600668+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200669| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600670+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200671| Threat Agent | SecCode, NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600672+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200673| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600674+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200675| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600676+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200677| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600678+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200679| Likelihood | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600680+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200681| Total Risk Rating | Medium (9) | Medium (9) | Medium (9) |
Zelalem05fed522021-02-24 19:20:09 -0600682+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200683| Mitigations | | TF-A implements software mitigations for Spectre |
Zelalem05fed522021-02-24 19:20:09 -0600684| | type attacks as recommended by `Cache Speculation |
685| | Side-channels`_ for the generic code. SiPs should |
686| | implement similar mitigations for code that is |
687| | deemed to be vulnerable to such attacks. |
688+------------------------+-----------------------------------------------------+
689
690+------------------------+----------------------------------------------------+
691| ID | 11 |
692+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200693| Threat | | **Misconfiguration of the Memory Management Unit |
Zelalem05fed522021-02-24 19:20:09 -0600694| | (MMU) may allow a normal world software to |
695| | access sensitive data or execute arbitrary |
696| | code** |
697| | |
698| | | A misconfiguration of the MMU could |
699| | lead to an open door for software running in the |
700| | normal world to access sensitive data or even |
701| | execute code if the proper security mechanisms |
702| | are not in place. |
703+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200704| Diagram Elements | DF5, DF6 |
Zelalem05fed522021-02-24 19:20:09 -0600705+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200706| Affected TF-A | BL1, BL2, BL31 |
707| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600708+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200709| Assets | Sensitive Data, Code execution |
Zelalem05fed522021-02-24 19:20:09 -0600710+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200711| Threat Agent | NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600712+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200713| Threat Type | Information Disclosure, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600714+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200715| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600716+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200717| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600718+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200719| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600720+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200721| Total Risk Rating | Critical (20) | Critical (20) | Critical (20) |
Zelalem05fed522021-02-24 19:20:09 -0600722+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200723| Mitigations | | In TF-A, configuration of the MMU is done |
Zelalem05fed522021-02-24 19:20:09 -0600724| | through a translation tables library. The |
725| | library provides APIs to define memory regions |
726| | and assign attributes including memory types and |
727| | access permissions. Memory configurations are |
728| | platform specific, therefore platforms need make |
729| | sure the correct attributes are assigned to |
730| | memory regions. When assigning access |
731| | permissions, principle of least privilege ought |
732| | to be enforced, i.e. we should not grant more |
733| | privileges than strictly needed, e.g. code |
734| | should be read-only executable, RO data should |
735| | be read-only XN, and so on. |
736+------------------------+----------------------------------------------------+
737
738+------------------------+-----------------------------------------------------+
739| ID | 12 |
740+========================+=====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200741| Threat | | **Incorrect configuration of Performance Monitor |
Zelalem05fed522021-02-24 19:20:09 -0600742| | Unit (PMU) counters can allow an attacker to |
743| | mount side-channel attacks using information |
744| | exposed by the counters** |
745| | |
746| | | Non-secure software can configure PMU registers |
747| | to count events at any exception level and in |
748| | both Secure and Non-secure states. This allows |
749| | a Non-secure software (or a lower-level Secure |
750| | software) to potentially carry out |
751| | side-channel timing attacks against TF-A. |
752+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200753| Diagram Elements | DF5, DF6 |
Zelalem05fed522021-02-24 19:20:09 -0600754+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200755| Affected TF-A | BL31 |
756| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600757+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200758| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600759+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200760| Threat Agent | NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600761+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200762| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600763+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200764| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600765+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200766| Likelihood | Low (2) | Low (2) | Low (2) |
Zelalem05fed522021-02-24 19:20:09 -0600767+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200768| Total Risk Rating | Medium (6) | Medium (6) | Medium (6) |
Zelalem05fed522021-02-24 19:20:09 -0600769+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200770| Mitigations | | TF-A follows mitigation strategies as described |
Zelalem05fed522021-02-24 19:20:09 -0600771| | in `Secure Development Guidelines`_. General |
772| | events and cycle counting in the Secure world is |
773| | prohibited by default when applicable. However, |
774| | on some implementations (e.g. PMUv3) Secure world |
775| | event counting depends on external debug interface|
776| | signals, i.e. Secure world event counting is |
777| | enabled if external debug is enabled. |
778| | Configuration of debug signals is platform |
779| | specific, therefore platforms need to make sure |
780| | that external debug is disabled in production or |
781| | proper debug authentication is in place. |
782+------------------------+-----------------------------------------------------+
783
784--------------
785
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200786*Copyright (c) 2021-2022, Arm Limited. All rights reserved.*
Zelalem05fed522021-02-24 19:20:09 -0600787
788
789.. _STRIDE threat analysis technique: https://docs.microsoft.com/en-us/azure/security/develop/threat-modeling-tool-threats#stride-model
790.. _DEN0034: https://developer.arm.com/documentation/den0034/latest
791.. _Cache Speculation Side-channels: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
792.. _Spectre: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
793.. _TBBR-Client specification: https://developer.arm.com/documentation/den0006/d/
794.. _Trusted Board Boot (TBB): https://trustedfirmware-a.readthedocs.io/en/latest/design/trusted-board-boot.html
795.. _TF-A error handling policy: https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#error-handling-and-robustness
796.. _Secure Development Guidelines: https://trustedfirmware-a.readthedocs.io/en/latest/process/security-hardening.html#secure-development-guidelines
Olivier Deprez86d1ffd2021-06-01 15:37:16 +0200797.. _Trusted Firmware-A Tests: https://git.trustedfirmware.org/TF-A/tf-a-tests.git/about/