blob: 611e8a108b4ce19a53a699f3d31e3f0e283a057b [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 Bailleux78cdfdd2022-05-12 14:57:26 +020039- No experimental features are enabled. We do not consider threats that may come
40 from them.
41
Zelalem05fed522021-02-24 19:20:09 -060042Data Flow Diagram
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020043=================
44
Zelalem05fed522021-02-24 19:20:09 -060045Figure 1 shows a high-level data flow diagram for TF-A. The diagram
46shows a model of the different components of a TF-A-based system and
47their interactions with TF-A. A description of each diagram element
48is given on Table 1. On the diagram, the red broken lines indicate
49trust boundaries. Components outside of the broken lines
50are considered untrusted by TF-A.
51
52.. uml:: ../resources/diagrams/plantuml/tfa_dfd.puml
53 :caption: Figure 1: TF-A Data Flow Diagram
54
55.. table:: Table 1: TF-A Data Flow Diagram Description
56
57 +-----------------+--------------------------------------------------------+
58 | Diagram Element | Description |
59 +=================+========================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020060 | DF1 | | At boot time, images are loaded from non-volatile |
Zelalem05fed522021-02-24 19:20:09 -060061 | | memory and verified by TF-A boot firmware. These |
62 | | images include TF-A BL2 and BL31 images, as well as |
63 | | other secure and non-secure images. |
64 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020065 | DF2 | | TF-A log system framework outputs debug messages |
Zelalem05fed522021-02-24 19:20:09 -060066 | | over a UART interface. |
67 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020068 | DF3 | | Debug and trace IP on a platform can allow access |
Zelalem05fed522021-02-24 19:20:09 -060069 | | to registers and memory of TF-A. |
70 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020071 | DF4 | | Secure world software (e.g. trusted OS) interact |
Zelalem05fed522021-02-24 19:20:09 -060072 | | with TF-A through SMC call interface and/or shared |
73 | | memory. |
74 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020075 | DF5 | | Non-secure world software (e.g. rich OS) interact |
Zelalem05fed522021-02-24 19:20:09 -060076 | | with TF-A through SMC call interface and/or shared |
77 | | memory. |
78 +-----------------+--------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020079 | DF6 | | This path represents the interaction between TF-A and|
Zelalem05fed522021-02-24 19:20:09 -060080 | | various hardware IPs such as TrustZone controller |
81 | | and GIC. At boot time TF-A configures/initializes the|
82 | | IPs and interacts with them at runtime through |
83 | | interrupts and registers. |
84 +-----------------+--------------------------------------------------------+
85
86
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020087***************
Zelalem05fed522021-02-24 19:20:09 -060088Threat Analysis
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +020089***************
90
Zelalem05fed522021-02-24 19:20:09 -060091In this section we identify and provide assessment of potential threats to TF-A
92firmware. The threats are identified for each diagram element on the
93data flow diagram above.
94
95For each threat, we identify the *asset* that is under threat, the
96*threat agent* and the *threat type*. Each threat is given a *risk rating*
97that represents the impact and likelihood of that threat. We also discuss
98potential mitigations.
99
100Assets
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200101======
102
Zelalem05fed522021-02-24 19:20:09 -0600103We have identified the following assets for TF-A:
104
105.. table:: Table 2: TF-A Assets
106
107 +--------------------+---------------------------------------------------+
108 | Asset | Description |
109 +====================+===================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200110 | Sensitive Data | | These include sensitive data that an attacker |
Zelalem05fed522021-02-24 19:20:09 -0600111 | | must not be able to tamper with (e.g. the Root |
112 | | of Trust Public Key) or see (e.g. secure logs, |
113 | | debugging information such as crash reports). |
114 +--------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200115 | Code Execution | | This represents the requirement that the |
Zelalem05fed522021-02-24 19:20:09 -0600116 | | platform should run only TF-A code approved by |
117 | | the platform provider. |
118 +--------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200119 | Availability | | This represents the requirement that TF-A |
Zelalem05fed522021-02-24 19:20:09 -0600120 | | services should always be available for use. |
121 +--------------------+---------------------------------------------------+
122
123Threat Agents
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200124=============
125
Zelalem05fed522021-02-24 19:20:09 -0600126To understand the attack surface, it is important to identify potential
127attackers, i.e. attack entry points. The following threat agents are
128in scope of this threat model.
129
130.. table:: Table 3: Threat Agents
131
132 +-------------------+-------------------------------------------------------+
133 | Threat Agent | Description |
134 +===================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200135 | NSCode | | Malicious or faulty code running in the Non-secure |
Zelalem05fed522021-02-24 19:20:09 -0600136 | | world, including NS-EL0 NS-EL1 and NS-EL2 levels |
137 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200138 | SecCode | | Malicious or faulty code running in the secure |
Zelalem05fed522021-02-24 19:20:09 -0600139 | | world, including S-EL0 and S-EL1 levels |
140 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200141 | AppDebug | | Physical attacker using debug signals to access |
Zelalem05fed522021-02-24 19:20:09 -0600142 | | TF-A resources |
143 +-------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200144 | PhysicalAccess | | Physical attacker having access to external device |
Zelalem05fed522021-02-24 19:20:09 -0600145 | | communication bus and to external flash |
146 | | communication bus using common hardware |
147 +-------------------+-------------------------------------------------------+
148
149.. note::
150
151 In this threat model an advanced physical attacker that has the capability
152 to tamper with a hardware (e.g. "rewiring" a chip using a focused
153 ion beam (FIB) workstation or decapsulate the chip using chemicals) is
154 considered out-of-scope.
155
156Threat Types
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200157============
158
Zelalem05fed522021-02-24 19:20:09 -0600159In this threat model we categorize threats using the `STRIDE threat
160analysis technique`_. In this technique a threat is categorized as one
161or more of these types: ``Spoofing``, ``Tampering``, ``Repudiation``,
162``Information disclosure``, ``Denial of service`` or
163``Elevation of privilege``.
164
165Threat Risk Ratings
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200166===================
167
Zelalem05fed522021-02-24 19:20:09 -0600168For each threat identified, a risk rating that ranges
169from *informational* to *critical* is given based on the likelihood of the
170threat occuring if a mitigation is not in place, and the impact of the
171threat (i.e. how severe the consequences could be). Table 4 explains each
172rating in terms of score, impact and likelihood.
173
174.. table:: Table 4: Rating and score as applied to impact and likelihood
175
176 +-----------------------+-------------------------+---------------------------+
177 | **Rating (Score)** | **Impact** | **Likelihood** |
178 +=======================+=========================+===========================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200179 | Critical (5) | | Extreme impact to | | Threat is almost |
Zelalem05fed522021-02-24 19:20:09 -0600180 | | entire organization | certain to be exploited.|
181 | | if exploited. | |
182 | | | | Knowledge of the threat |
183 | | | and how to exploit it |
184 | | | are in the public |
185 | | | domain. |
186 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200187 | High (4) | | Major impact to entire| | Threat is relatively |
Zelalem05fed522021-02-24 19:20:09 -0600188 | | organization or single| easy to detect and |
189 | | line of business if | exploit by an attacker |
190 | | exploited | with little skill. |
191 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200192 | Medium (3) | | Noticeable impact to | | A knowledgeable insider |
Zelalem05fed522021-02-24 19:20:09 -0600193 | | line of business if | or expert attacker could|
194 | | exploited. | exploit the threat |
195 | | | without much difficulty.|
196 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200197 | Low (2) | | Minor damage if | | Exploiting the threat |
Zelalem05fed522021-02-24 19:20:09 -0600198 | | exploited or could | would require |
199 | | be used in conjunction| considerable expertise |
200 | | with other | and resources |
201 | | vulnerabilities to | |
202 | | perform a more serious| |
203 | | attack | |
204 +-----------------------+-------------------------+---------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200205 | Informational (1) | | Poor programming | | Threat is not likely |
Zelalem05fed522021-02-24 19:20:09 -0600206 | | practice or poor | to be exploited on its |
207 | | design decision that | own, but may be used to |
208 | | may not represent an | gain information for |
209 | | immediate risk on its | launching another |
210 | | own, but may have | attack |
211 | | security implications | |
212 | | if multiplied and/or | |
213 | | combined with other | |
214 | | threats. | |
215 +-----------------------+-------------------------+---------------------------+
216
217Aggregate risk scores are assigned to identified threats;
218specifically, the impact score multiplied by the likelihood score.
219For example, a threat with high likelihood and low impact would have an
220aggregate risk score of eight (8); that is, four (4) for high likelihood
221multiplied by two (2) for low impact. The aggregate risk score determines
222the finding's overall risk level, as shown in the following table.
223
224.. table:: Table 5: Overall risk levels and corresponding aggregate scores
225
226 +---------------------+-----------------------------------+
227 | Overall Risk Level | Aggregate Risk Score |
228 | | (Impact multiplied by Likelihood) |
229 +=====================+===================================+
230 | Critical | 20–25 |
231 +---------------------+-----------------------------------+
232 | High | 12–19 |
233 +---------------------+-----------------------------------+
234 | Medium | 6–11 |
235 +---------------------+-----------------------------------+
236 | Low | 2–5 |
237 +---------------------+-----------------------------------+
238 | Informational | 1 |
239 +---------------------+-----------------------------------+
240
241The likelihood and impact of a threat depends on the
242target environment in which TF-A is running. For example, attacks
243that require physical access are unlikely in server environments while
244they are more common in Internet of Things(IoT) environments.
245In this threat model we consider three target environments:
246``Internet of Things(IoT)``, ``Mobile`` and ``Server``.
247
248Threat Assessment
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200249=================
250
Zelalem05fed522021-02-24 19:20:09 -0600251The following threats were identified by applying STRIDE analysis on
252each diagram element of the data flow diagram.
253
254+------------------------+----------------------------------------------------+
255| ID | 01 |
256+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200257| Threat | | **An attacker can mangle firmware images to |
Zelalem05fed522021-02-24 19:20:09 -0600258| | execute arbitrary code** |
259| | |
260| | | Some TF-A images are loaded from external |
261| | storage. It is possible for an attacker to access|
262| | the external flash memory and change its contents|
263| | physically, through the Rich OS, or using the |
264| | updating mechanism to modify the non-volatile |
265| | images to execute arbitrary code. |
266+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200267| Diagram Elements | DF1, DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600268+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200269| Affected TF-A | BL2, BL31 |
270| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600271+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200272| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600273+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200274| Threat Agent | PhysicalAccess, NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600275+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200276| Threat Type | Tampering, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600277+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200278| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600279+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200280| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600281+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200282| Likelihood | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600283+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200284| Total Risk Rating | Critical (25) | Critical (25) | Critical (25) |
Zelalem05fed522021-02-24 19:20:09 -0600285+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200286| Mitigations | | TF-A implements the `Trusted Board Boot (TBB)`_ |
Zelalem05fed522021-02-24 19:20:09 -0600287| | feature which prevents malicious firmware from |
288| | running on the platform by authenticating all |
289| | firmware images. In addition to this, the TF-A |
290| | boot firmware performs extra checks on |
291| | unauthenticated data, such as FIP metadata, prior|
292| | to use. |
293+------------------------+----------------------------------------------------+
294
295+------------------------+----------------------------------------------------+
296| ID | 02 |
297+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200298| Threat | | **An attacker may attempt to boot outdated, |
Zelalem05fed522021-02-24 19:20:09 -0600299| | potentially vulnerable firmware image** |
300| | |
301| | | When updating firmware, an attacker may attempt |
302| | to rollback to an older version that has unfixed |
303| | vulnerabilities. |
304+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200305| Diagram Elements | DF1, DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600306+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200307| Affected TF-A | BL2, BL31 |
308| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600309+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200310| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600311+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200312| Threat Agent | PhysicalAccess, NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600313+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200314| Threat Type | Tampering |
Zelalem05fed522021-02-24 19:20:09 -0600315+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200316| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600317+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200318| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600319+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200320| Likelihood | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600321+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200322| Total Risk Rating | Critical (25) | Critical (25) | Critical (25) |
Zelalem05fed522021-02-24 19:20:09 -0600323+------------------------+------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200324| Mitigations | | TF-A supports anti-rollback protection using |
Zelalem05fed522021-02-24 19:20:09 -0600325| | non-volatile counters (NV counters) as required |
326| | by `TBBR-Client specification`_. After a firmware|
327| | image is validated, the image revision number |
328| | taken from a certificate extension field is |
329| | compared with the corresponding NV counter stored|
330| | in hardware to make sure the new counter value is|
331| | larger or equal to the current counter value. |
332| | Platforms must implement this protection using |
333| | platform specific hardware NV counters. |
334+------------------------+----------------------------------------------------+
335
336+------------------------+-------------------------------------------------------+
337| ID | 03 |
338+========================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200339| Threat | | **An attacker can use Time-of-Check-Time-of-Use |
Zelalem05fed522021-02-24 19:20:09 -0600340| | (TOCTOU) attack to bypass image authentication |
341| | during the boot process** |
342| | |
343| | | Time-of-Check-Time-of-Use (TOCTOU) threats occur |
344| | when the security check is produced before the time |
345| | the resource is accessed. If an attacker is sitting |
346| | in the middle of the off-chip images, they could |
347| | change the binary containing executable code right |
348| | after the integrity and authentication check has |
349| | been performed. |
350+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200351| Diagram Elements | DF1 |
Zelalem05fed522021-02-24 19:20:09 -0600352+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200353| Affected TF-A | BL1, BL2 |
354| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600355+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200356| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600357+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200358| Threat Agent | PhysicalAccess |
Zelalem05fed522021-02-24 19:20:09 -0600359+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200360| Threat Type | Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600361+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200362| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600363+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200364| Impact | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600365+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200366| Likelihood | N/A | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600367+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200368| Total Risk Rating | N/A | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600369+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200370| Mitigations | | TF-A boot firmware copies image to on-chip |
Zelalem05fed522021-02-24 19:20:09 -0600371| | memory before authenticating an image. |
372+------------------------+-------------------------------------------------------+
373
374+------------------------+-------------------------------------------------------+
375| ID | 04 |
376+========================+=======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200377| Threat | | **An attacker with physical access can execute |
Zelalem05fed522021-02-24 19:20:09 -0600378| | arbitrary image by bypassing the signature |
379| | verification stage using glitching techniques** |
380| | |
381| | | Glitching (Fault injection) attacks attempt to put |
382| | a hardware into a undefined state by manipulating an|
383| | environmental variable such as power supply. |
384| | |
385| | | TF-A relies on a chain of trust that starts with the|
386| | ROTPK, which is the key stored inside the chip and |
387| | the root of all validation processes. If an attacker|
388| | can break this chain of trust, they could execute |
389| | arbitrary code on the device. This could be |
390| | achieved with physical access to the device by |
391| | attacking the normal execution flow of the |
392| | process using glitching techniques that target |
393| | points where the image is validated against the |
394| | signature. |
395+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200396| Diagram Elements | DF1 |
Zelalem05fed522021-02-24 19:20:09 -0600397+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200398| Affected TF-A | BL1, BL2 |
399| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600400+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200401| Assets | Code Execution |
Zelalem05fed522021-02-24 19:20:09 -0600402+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200403| Threat Agent | PhysicalAccess |
Zelalem05fed522021-02-24 19:20:09 -0600404+------------------------+-------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200405| Threat Type | Tampering, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600406+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200407| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600408+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200409| Impact | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600410+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200411| Likelihood | N/A | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600412+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200413| Total Risk Rating | N/A | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600414+------------------------+---------------------+-----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200415| Mitigations | | The most effective mitigation is adding glitching |
Zelalem05fed522021-02-24 19:20:09 -0600416| | detection and mitigation circuit at the hardware |
417| | level. However, software techniques, |
418| | such as adding redundant checks when performing |
419| | conditional branches that are security sensitive, |
420| | can be used to harden TF-A against such attacks. |
421| | **At the moment TF-A doesn't implement such |
422| | mitigations.** |
423+------------------------+-------------------------------------------------------+
424
425+------------------------+---------------------------------------------------+
426| ID | 05 |
427+========================+===================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200428| Threat | | **Information leak via UART logs such as |
Zelalem05fed522021-02-24 19:20:09 -0600429| | crashes** |
430| | |
431| | | During the development stages of software it is |
432| | common to include crash reports with detailed |
433| | information of the CPU state including current |
434| | values of the registers, privilege level and |
435| | stack dumps. This information is useful when |
436| | debugging problems before releasing the |
437| | production version, but it could be used by an |
438| | attacker to develop a working exploit if left |
439| | in the production version. |
440+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200441| Diagram Elements | DF2 |
Zelalem05fed522021-02-24 19:20:09 -0600442+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200443| Affected TF-A | BL1, BL2, BL31 |
444| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600445+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200446| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600447+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200448| Threat Agent | AppDebug |
Zelalem05fed522021-02-24 19:20:09 -0600449+------------------------+---------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200450| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600451+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200452| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600453+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200454| Impact | N/A | Low (2) | Low (2) |
Zelalem05fed522021-02-24 19:20:09 -0600455+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200456| Likelihood | N/A | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600457+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200458| Total Risk Rating | N/A | Medium (8) | Medium (8) |
Zelalem05fed522021-02-24 19:20:09 -0600459+------------------------+------------------+----------------+---------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200460| Mitigations | | In TF-A, crash reporting is only enabled for |
Zelalem05fed522021-02-24 19:20:09 -0600461| | debug builds by default. Alternatively, the log |
462| | level can be tuned at build time (from verbose |
463| | to no output at all), independently of the |
464| | build type. |
465+------------------------+---------------------------------------------------+
466
467+------------------------+----------------------------------------------------+
468| ID | 06 |
469+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200470| Threat | | **An attacker can read sensitive data and |
Zelalem05fed522021-02-24 19:20:09 -0600471| | execute arbitrary code through the external |
472| | debug and trace interface** |
473| | |
474| | | Arm processors include hardware-assisted debug |
475| | and trace features that can be controlled without|
476| | the need for software operating on the platform. |
477| | If left enabled without authentication, this |
478| | feature can be used by an attacker to inspect and|
479| | modify TF-A registers and memory allowing the |
480| | attacker to read sensitive data and execute |
481| | arbitrary code. |
482+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200483| Diagram Elements | DF3 |
Zelalem05fed522021-02-24 19:20:09 -0600484+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200485| Affected TF-A | BL1, BL2, BL31 |
486| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600487+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200488| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600489+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200490| Threat Agent | AppDebug |
Zelalem05fed522021-02-24 19:20:09 -0600491+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200492| Threat Type | Tampering, Information Disclosure, |
Zelalem05fed522021-02-24 19:20:09 -0600493| | Elevation of privilege |
494+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200495| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600496+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200497| Impact | N/A | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600498+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200499| Likelihood | N/A | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600500+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200501| Total Risk Rating | N/A | Critical (20) | Critical (20) |
Zelalem05fed522021-02-24 19:20:09 -0600502+------------------------+------------------+---------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200503| Mitigations | | Configuration of debug and trace capabilities is |
Zelalem05fed522021-02-24 19:20:09 -0600504| | platform specific. Therefore, platforms must |
505| | disable the debug and trace capability for |
506| | production releases or enable proper debug |
507| | authentication as recommended by [`DEN0034`_]. |
508+------------------------+----------------------------------------------------+
509
510+------------------------+------------------------------------------------------+
511| ID | 07 |
512+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200513| Threat | | **An attacker can perform a denial-of-service |
Zelalem05fed522021-02-24 19:20:09 -0600514| | attack by using a broken SMC call that causes the |
515| | system to reboot or enter into unknown state.** |
516| | |
517| | | Secure and non-secure clients access TF-A services |
518| | through SMC calls. Malicious code can attempt to |
519| | place the TF-A runtime into an inconsistent state |
520| | by calling unimplemented SMC call or by passing |
521| | invalid arguments. |
522+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200523| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600524+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200525| Affected TF-A | BL31 |
526| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600527+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200528| Assets | Availability |
Zelalem05fed522021-02-24 19:20:09 -0600529+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200530| Threat Agent | NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600531+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200532| Threat Type | Denial of Service |
Zelalem05fed522021-02-24 19:20:09 -0600533+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200534| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600535+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200536| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600537+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200538| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600539+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200540| Total Risk Rating | High (12) | High (12) | High (12) |
Zelalem05fed522021-02-24 19:20:09 -0600541+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200542| Mitigations | | The generic TF-A code validates SMC function ids |
Zelalem05fed522021-02-24 19:20:09 -0600543| | and arguments before using them. |
544| | Platforms that implement SiP services must also |
545| | validate SMC call arguments. |
546+------------------------+------------------------------------------------------+
547
548+------------------------+------------------------------------------------------+
549| ID | 08 |
550+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200551| Threat | | **Memory corruption due to memory overflows and |
Zelalem05fed522021-02-24 19:20:09 -0600552| | lack of boundary checking when accessing resources |
553| | could allow an attacker to execute arbitrary code, |
554| | modify some state variable to change the normal |
555| | flow of the program, or leak sensitive |
556| | information** |
557| | |
Sandrine Bailleux0b816db2022-05-13 12:40:22 +0200558| | | Like in other software, TF-A has multiple points |
559| | where memory corruption security errors can arise. |
Zelalem05fed522021-02-24 19:20:09 -0600560| | |
561| | | Some of the errors include integer overflow, |
562| | buffer overflow, incorrect array boundary checks, |
563| | and incorrect error management. |
564| | Improper use of asserts instead of proper input |
565| | validations might also result in these kinds of |
566| | errors in release builds. |
567+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200568| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600569+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200570| Affected TF-A | BL1, BL2, BL31 |
571| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600572+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200573| Assets | Code Execution, Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600574+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200575| Threat Agent | NSCode, SecCode |
Zelalem05fed522021-02-24 19:20:09 -0600576+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200577| Threat Type | Tampering, Information Disclosure, |
Zelalem05fed522021-02-24 19:20:09 -0600578| | Elevation of Privilege |
579+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200580| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600581+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200582| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600583+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200584| Likelihood | Medium (3 | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600585+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200586| Total Risk Rating | High (15) | High (15) | High (15) |
Zelalem05fed522021-02-24 19:20:09 -0600587+------------------------+-------------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200588| Mitigations | | TF-A uses a combination of manual code reviews and |
Zelalem05fed522021-02-24 19:20:09 -0600589| | automated program analysis and testing to detect |
590| | and fix memory corruption bugs. All TF-A code |
591| | including platform code go through manual code |
592| | reviews. Additionally, static code analysis is |
593| | performed using Coverity Scan on all TF-A code. |
594| | The code is also tested with |
595| | `Trusted Firmware-A Tests`_ on Juno and FVP |
596| | platforms. |
597| | |
598| | | Data received from normal world, such as addresses |
599| | and sizes identifying memory regions, are |
600| | sanitized before being used. These security checks |
601| | make sure that the normal world software does not |
602| | access memory beyond its limit. |
603| | |
604| | | By default *asserts* are only used to check for |
605| | programming errors in debug builds. Other types of |
606| | errors are handled through condition checks that |
607| | remain enabled in release builds. See |
608| | `TF-A error handling policy`_. TF-A provides an |
609| | option to use *asserts* in release builds, however |
610| | we recommend using proper runtime checks instead |
611| | of relying on asserts in release builds. |
612+------------------------+------------------------------------------------------+
613
614+------------------------+------------------------------------------------------+
615| ID | 09 |
616+========================+======================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200617| Threat | | **Improperly handled SMC calls can leak register |
Zelalem05fed522021-02-24 19:20:09 -0600618| | contents** |
619| | |
620| | | When switching between secure and non-secure |
621| | states, register contents of Secure world or |
622| | register contents of other normal world clients |
623| | can be leaked. |
624+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200625| Diagram Elements | DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600626+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200627| Affected TF-A | BL31 |
628| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600629+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200630| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600631+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200632| Threat Agent | NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600633+------------------------+------------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200634| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600635+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200636| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600637+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200638| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600639+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200640| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600641+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200642| Total Risk Rating | High (12) | High (12) | High (12) |
Zelalem05fed522021-02-24 19:20:09 -0600643+------------------------+-------------------+----------------+-----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200644| Mitigations | | TF-A saves and restores registers |
Zelalem05fed522021-02-24 19:20:09 -0600645| | by default when switching contexts. Build options |
646| | are also provided to save/restore additional |
647| | registers such as floating-point registers. |
648+------------------------+------------------------------------------------------+
649
650+------------------------+-----------------------------------------------------+
651| ID | 10 |
652+========================+=====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200653| Threat | | **SMC calls can leak sensitive information from |
Zelalem05fed522021-02-24 19:20:09 -0600654| | TF-A memory via microarchitectural side channels**|
655| | |
656| | | Microarchitectural side-channel attacks such as |
657| | `Spectre`_ can be used to leak data across |
658| | security boundaries. An attacker might attempt to |
659| | use this kind of attack to leak sensitive |
660| | data from TF-A memory. |
661+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200662| Diagram Elements | DF4, DF5 |
Zelalem05fed522021-02-24 19:20:09 -0600663+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200664| Affected TF-A | BL31 |
665| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600666+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200667| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600668+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200669| Threat Agent | SecCode, NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600670+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200671| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600672+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200673| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600674+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200675| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600676+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200677| Likelihood | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600678+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200679| Total Risk Rating | Medium (9) | Medium (9) | Medium (9) |
Zelalem05fed522021-02-24 19:20:09 -0600680+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200681| Mitigations | | TF-A implements software mitigations for Spectre |
Zelalem05fed522021-02-24 19:20:09 -0600682| | type attacks as recommended by `Cache Speculation |
683| | Side-channels`_ for the generic code. SiPs should |
684| | implement similar mitigations for code that is |
685| | deemed to be vulnerable to such attacks. |
686+------------------------+-----------------------------------------------------+
687
688+------------------------+----------------------------------------------------+
689| ID | 11 |
690+========================+====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200691| Threat | | **Misconfiguration of the Memory Management Unit |
Zelalem05fed522021-02-24 19:20:09 -0600692| | (MMU) may allow a normal world software to |
693| | access sensitive data or execute arbitrary |
694| | code** |
695| | |
696| | | A misconfiguration of the MMU could |
697| | lead to an open door for software running in the |
698| | normal world to access sensitive data or even |
699| | execute code if the proper security mechanisms |
700| | are not in place. |
701+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200702| Diagram Elements | DF5, DF6 |
Zelalem05fed522021-02-24 19:20:09 -0600703+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200704| Affected TF-A | BL1, BL2, BL31 |
705| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600706+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200707| Assets | Sensitive Data, Code execution |
Zelalem05fed522021-02-24 19:20:09 -0600708+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200709| Threat Agent | NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600710+------------------------+----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200711| Threat Type | Information Disclosure, Elevation of Privilege |
Zelalem05fed522021-02-24 19:20:09 -0600712+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200713| Application | Server | IoT | Mobile |
Zelalem05fed522021-02-24 19:20:09 -0600714+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200715| Impact | Critical (5) | Critical (5) | Critical (5) |
Zelalem05fed522021-02-24 19:20:09 -0600716+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200717| Likelihood | High (4) | High (4) | High (4) |
Zelalem05fed522021-02-24 19:20:09 -0600718+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200719| Total Risk Rating | Critical (20) | Critical (20) | Critical (20) |
Zelalem05fed522021-02-24 19:20:09 -0600720+------------------------+-----------------+-----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200721| Mitigations | | In TF-A, configuration of the MMU is done |
Zelalem05fed522021-02-24 19:20:09 -0600722| | through a translation tables library. The |
723| | library provides APIs to define memory regions |
724| | and assign attributes including memory types and |
725| | access permissions. Memory configurations are |
726| | platform specific, therefore platforms need make |
727| | sure the correct attributes are assigned to |
728| | memory regions. When assigning access |
729| | permissions, principle of least privilege ought |
730| | to be enforced, i.e. we should not grant more |
731| | privileges than strictly needed, e.g. code |
732| | should be read-only executable, RO data should |
733| | be read-only XN, and so on. |
734+------------------------+----------------------------------------------------+
735
736+------------------------+-----------------------------------------------------+
737| ID | 12 |
738+========================+=====================================================+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200739| Threat | | **Incorrect configuration of Performance Monitor |
Zelalem05fed522021-02-24 19:20:09 -0600740| | Unit (PMU) counters can allow an attacker to |
741| | mount side-channel attacks using information |
742| | exposed by the counters** |
743| | |
744| | | Non-secure software can configure PMU registers |
745| | to count events at any exception level and in |
746| | both Secure and Non-secure states. This allows |
747| | a Non-secure software (or a lower-level Secure |
748| | software) to potentially carry out |
749| | side-channel timing attacks against TF-A. |
750+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200751| Diagram Elements | DF5, DF6 |
Zelalem05fed522021-02-24 19:20:09 -0600752+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200753| Affected TF-A | BL31 |
754| Components | |
Zelalem05fed522021-02-24 19:20:09 -0600755+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200756| Assets | Sensitive Data |
Zelalem05fed522021-02-24 19:20:09 -0600757+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200758| Threat Agent | NSCode |
Zelalem05fed522021-02-24 19:20:09 -0600759+------------------------+-----------------------------------------------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200760| Threat Type | Information Disclosure |
Zelalem05fed522021-02-24 19:20:09 -0600761+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200762| Impact | Medium (3) | Medium (3) | Medium (3) |
Zelalem05fed522021-02-24 19:20:09 -0600763+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200764| Likelihood | Low (2) | Low (2) | Low (2) |
Zelalem05fed522021-02-24 19:20:09 -0600765+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200766| Total Risk Rating | Medium (6) | Medium (6) | Medium (6) |
Zelalem05fed522021-02-24 19:20:09 -0600767+------------------------+-------------------+----------------+----------------+
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200768| Mitigations | | TF-A follows mitigation strategies as described |
Zelalem05fed522021-02-24 19:20:09 -0600769| | in `Secure Development Guidelines`_. General |
770| | events and cycle counting in the Secure world is |
771| | prohibited by default when applicable. However, |
772| | on some implementations (e.g. PMUv3) Secure world |
773| | event counting depends on external debug interface|
774| | signals, i.e. Secure world event counting is |
775| | enabled if external debug is enabled. |
776| | Configuration of debug signals is platform |
777| | specific, therefore platforms need to make sure |
778| | that external debug is disabled in production or |
779| | proper debug authentication is in place. |
780+------------------------+-----------------------------------------------------+
781
782--------------
783
Sandrine Bailleux6e5c2182022-05-10 14:55:01 +0200784*Copyright (c) 2021-2022, Arm Limited. All rights reserved.*
Zelalem05fed522021-02-24 19:20:09 -0600785
786
787.. _STRIDE threat analysis technique: https://docs.microsoft.com/en-us/azure/security/develop/threat-modeling-tool-threats#stride-model
788.. _DEN0034: https://developer.arm.com/documentation/den0034/latest
789.. _Cache Speculation Side-channels: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
790.. _Spectre: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
791.. _TBBR-Client specification: https://developer.arm.com/documentation/den0006/d/
792.. _Trusted Board Boot (TBB): https://trustedfirmware-a.readthedocs.io/en/latest/design/trusted-board-boot.html
793.. _TF-A error handling policy: https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#error-handling-and-robustness
794.. _Secure Development Guidelines: https://trustedfirmware-a.readthedocs.io/en/latest/process/security-hardening.html#secure-development-guidelines
Olivier Deprez86d1ffd2021-06-01 15:37:16 +0200795.. _Trusted Firmware-A Tests: https://git.trustedfirmware.org/TF-A/tf-a-tests.git/about/