Gary Morrison | d4d951a | 2021-11-10 14:40:15 -0600 | [diff] [blame] | 1 | Generic Threat Model |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 2 | ******************** |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 3 | |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 4 | ************ |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 5 | Introduction |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 6 | ************ |
| 7 | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 8 | This document provides a generic threat model for TF-A firmware. |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 9 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 10 | .. _Target of Evaluation: |
| 11 | |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 12 | ******************** |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 13 | Target of Evaluation |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 14 | ******************** |
| 15 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 16 | In this threat model, the target of evaluation is the Trusted |
| 17 | Firmware for A-class Processors (TF-A). This includes the boot ROM (BL1), |
| 18 | the trusted boot firmware (BL2) and the runtime EL3 firmware (BL31) as |
| 19 | shown on Figure 1. Everything else on Figure 1 is outside of the scope of |
| 20 | the evaluation. |
| 21 | |
| 22 | TF-A can be configured in various ways. In this threat model we consider |
| 23 | only the most basic configuration. To that end we make the following |
| 24 | assumptions: |
| 25 | |
| 26 | - All TF-A images are run from either ROM or on-chip trusted SRAM. This means |
| 27 | TF-A is not vulnerable to an attacker that can probe or tamper with off-chip |
| 28 | memory. |
Zelalem Aweke | 023b1a4 | 2021-10-21 13:59:45 -0500 | [diff] [blame] | 29 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 30 | - Trusted boot is enabled. This means an attacker can't boot arbitrary images |
| 31 | that are not approved by platform providers. |
Zelalem Aweke | 023b1a4 | 2021-10-21 13:59:45 -0500 | [diff] [blame] | 32 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 33 | - There is no Secure-EL2. We don't consider threats that may come with |
| 34 | Secure-EL2 software. |
| 35 | |
Sandrine Bailleux | e26ef3c | 2023-08-21 11:04:03 +0200 | [diff] [blame] | 36 | - There are no Root and Realm worlds. These are introduced by :ref:`Realm |
| 37 | Management Extension (RME)`. |
| 38 | |
Sandrine Bailleux | 78cdfdd | 2022-05-12 14:57:26 +0200 | [diff] [blame] | 39 | - No experimental features are enabled. We do not consider threats that may come |
| 40 | from them. |
| 41 | |
Manish V Badarkhe | 9d97122 | 2023-04-03 13:50:59 +0100 | [diff] [blame] | 42 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 43 | Data Flow Diagram |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 44 | ================= |
| 45 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 46 | Figure 1 shows a high-level data flow diagram for TF-A. The diagram |
| 47 | shows a model of the different components of a TF-A-based system and |
| 48 | their interactions with TF-A. A description of each diagram element |
| 49 | is given on Table 1. On the diagram, the red broken lines indicate |
| 50 | trust boundaries. Components outside of the broken lines |
| 51 | are considered untrusted by TF-A. |
| 52 | |
| 53 | .. uml:: ../resources/diagrams/plantuml/tfa_dfd.puml |
| 54 | :caption: Figure 1: TF-A Data Flow Diagram |
| 55 | |
| 56 | .. table:: Table 1: TF-A Data Flow Diagram Description |
| 57 | |
| 58 | +-----------------+--------------------------------------------------------+ |
| 59 | | Diagram Element | Description | |
| 60 | +=================+========================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 61 | | DF1 | | At boot time, images are loaded from non-volatile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 62 | | | memory and verified by TF-A boot firmware. These | |
| 63 | | | images include TF-A BL2 and BL31 images, as well as | |
| 64 | | | other secure and non-secure images. | |
| 65 | +-----------------+--------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 66 | | DF2 | | TF-A log system framework outputs debug messages | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 67 | | | over a UART interface. | |
| 68 | +-----------------+--------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 69 | | DF3 | | Debug and trace IP on a platform can allow access | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 70 | | | to registers and memory of TF-A. | |
| 71 | +-----------------+--------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 72 | | DF4 | | Secure world software (e.g. trusted OS) interact | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 73 | | | with TF-A through SMC call interface and/or shared | |
| 74 | | | memory. | |
| 75 | +-----------------+--------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 76 | | DF5 | | Non-secure world software (e.g. rich OS) interact | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 77 | | | with TF-A through SMC call interface and/or shared | |
| 78 | | | memory. | |
| 79 | +-----------------+--------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 80 | | DF6 | | This path represents the interaction between TF-A and| |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 81 | | | various hardware IPs such as TrustZone controller | |
| 82 | | | and GIC. At boot time TF-A configures/initializes the| |
| 83 | | | IPs and interacts with them at runtime through | |
| 84 | | | interrupts and registers. | |
| 85 | +-----------------+--------------------------------------------------------+ |
| 86 | |
| 87 | |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 88 | *************** |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 89 | Threat Analysis |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 90 | *************** |
| 91 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 92 | In this section we identify and provide assessment of potential threats to TF-A |
| 93 | firmware. The threats are identified for each diagram element on the |
| 94 | data flow diagram above. |
| 95 | |
| 96 | For each threat, we identify the *asset* that is under threat, the |
| 97 | *threat agent* and the *threat type*. Each threat is given a *risk rating* |
| 98 | that represents the impact and likelihood of that threat. We also discuss |
| 99 | potential mitigations. |
| 100 | |
| 101 | Assets |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 102 | ====== |
| 103 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 104 | We have identified the following assets for TF-A: |
| 105 | |
| 106 | .. table:: Table 2: TF-A Assets |
| 107 | |
| 108 | +--------------------+---------------------------------------------------+ |
| 109 | | Asset | Description | |
| 110 | +====================+===================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 111 | | Sensitive Data | | These include sensitive data that an attacker | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 112 | | | must not be able to tamper with (e.g. the Root | |
| 113 | | | of Trust Public Key) or see (e.g. secure logs, | |
| 114 | | | debugging information such as crash reports). | |
| 115 | +--------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 116 | | Code Execution | | This represents the requirement that the | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 117 | | | platform should run only TF-A code approved by | |
| 118 | | | the platform provider. | |
| 119 | +--------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 120 | | Availability | | This represents the requirement that TF-A | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 121 | | | services should always be available for use. | |
| 122 | +--------------------+---------------------------------------------------+ |
| 123 | |
| 124 | Threat Agents |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 125 | ============= |
| 126 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 127 | To understand the attack surface, it is important to identify potential |
| 128 | attackers, i.e. attack entry points. The following threat agents are |
| 129 | in scope of this threat model. |
| 130 | |
| 131 | .. table:: Table 3: Threat Agents |
| 132 | |
| 133 | +-------------------+-------------------------------------------------------+ |
| 134 | | Threat Agent | Description | |
| 135 | +===================+=======================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 136 | | NSCode | | Malicious or faulty code running in the Non-secure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 137 | | | world, including NS-EL0 NS-EL1 and NS-EL2 levels | |
| 138 | +-------------------+-------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 139 | | SecCode | | Malicious or faulty code running in the secure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 140 | | | world, including S-EL0 and S-EL1 levels | |
| 141 | +-------------------+-------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 142 | | AppDebug | | Physical attacker using debug signals to access | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 143 | | | TF-A resources | |
| 144 | +-------------------+-------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 145 | | PhysicalAccess | | Physical attacker having access to external device | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 146 | | | communication bus and to external flash | |
| 147 | | | communication bus using common hardware | |
| 148 | +-------------------+-------------------------------------------------------+ |
| 149 | |
| 150 | .. note:: |
| 151 | |
| 152 | In this threat model an advanced physical attacker that has the capability |
| 153 | to tamper with a hardware (e.g. "rewiring" a chip using a focused |
| 154 | ion beam (FIB) workstation or decapsulate the chip using chemicals) is |
| 155 | considered out-of-scope. |
| 156 | |
| 157 | Threat Types |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 158 | ============ |
| 159 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 160 | In this threat model we categorize threats using the `STRIDE threat |
| 161 | analysis technique`_. In this technique a threat is categorized as one |
| 162 | or more of these types: ``Spoofing``, ``Tampering``, ``Repudiation``, |
| 163 | ``Information disclosure``, ``Denial of service`` or |
| 164 | ``Elevation of privilege``. |
| 165 | |
| 166 | Threat Risk Ratings |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 167 | =================== |
| 168 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 169 | For each threat identified, a risk rating that ranges |
| 170 | from *informational* to *critical* is given based on the likelihood of the |
Tamas Ban | cf151b7 | 2022-11-30 17:06:05 +0100 | [diff] [blame] | 171 | threat occurring if a mitigation is not in place, and the impact of the |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 172 | threat (i.e. how severe the consequences could be). Table 4 explains each |
| 173 | rating in terms of score, impact and likelihood. |
| 174 | |
| 175 | .. table:: Table 4: Rating and score as applied to impact and likelihood |
| 176 | |
| 177 | +-----------------------+-------------------------+---------------------------+ |
| 178 | | **Rating (Score)** | **Impact** | **Likelihood** | |
| 179 | +=======================+=========================+===========================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 180 | | Critical (5) | | Extreme impact to | | Threat is almost | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 181 | | | entire organization | certain to be exploited.| |
| 182 | | | if exploited. | | |
| 183 | | | | | Knowledge of the threat | |
| 184 | | | | and how to exploit it | |
| 185 | | | | are in the public | |
| 186 | | | | domain. | |
| 187 | +-----------------------+-------------------------+---------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 188 | | High (4) | | Major impact to entire| | Threat is relatively | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 189 | | | organization or single| easy to detect and | |
| 190 | | | line of business if | exploit by an attacker | |
| 191 | | | exploited | with little skill. | |
| 192 | +-----------------------+-------------------------+---------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 193 | | Medium (3) | | Noticeable impact to | | A knowledgeable insider | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 194 | | | line of business if | or expert attacker could| |
| 195 | | | exploited. | exploit the threat | |
| 196 | | | | without much difficulty.| |
| 197 | +-----------------------+-------------------------+---------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 198 | | Low (2) | | Minor damage if | | Exploiting the threat | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 199 | | | exploited or could | would require | |
| 200 | | | be used in conjunction| considerable expertise | |
| 201 | | | with other | and resources | |
| 202 | | | vulnerabilities to | | |
| 203 | | | perform a more serious| | |
| 204 | | | attack | | |
| 205 | +-----------------------+-------------------------+---------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 206 | | Informational (1) | | Poor programming | | Threat is not likely | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 207 | | | practice or poor | to be exploited on its | |
| 208 | | | design decision that | own, but may be used to | |
| 209 | | | may not represent an | gain information for | |
| 210 | | | immediate risk on its | launching another | |
| 211 | | | own, but may have | attack | |
| 212 | | | security implications | | |
| 213 | | | if multiplied and/or | | |
| 214 | | | combined with other | | |
| 215 | | | threats. | | |
| 216 | +-----------------------+-------------------------+---------------------------+ |
| 217 | |
| 218 | Aggregate risk scores are assigned to identified threats; |
| 219 | specifically, the impact score multiplied by the likelihood score. |
| 220 | For example, a threat with high likelihood and low impact would have an |
| 221 | aggregate risk score of eight (8); that is, four (4) for high likelihood |
| 222 | multiplied by two (2) for low impact. The aggregate risk score determines |
| 223 | the finding's overall risk level, as shown in the following table. |
| 224 | |
| 225 | .. table:: Table 5: Overall risk levels and corresponding aggregate scores |
| 226 | |
| 227 | +---------------------+-----------------------------------+ |
| 228 | | Overall Risk Level | Aggregate Risk Score | |
| 229 | | | (Impact multiplied by Likelihood) | |
| 230 | +=====================+===================================+ |
| 231 | | Critical | 20–25 | |
| 232 | +---------------------+-----------------------------------+ |
| 233 | | High | 12–19 | |
| 234 | +---------------------+-----------------------------------+ |
| 235 | | Medium | 6–11 | |
| 236 | +---------------------+-----------------------------------+ |
| 237 | | Low | 2–5 | |
| 238 | +---------------------+-----------------------------------+ |
| 239 | | Informational | 1 | |
| 240 | +---------------------+-----------------------------------+ |
| 241 | |
| 242 | The likelihood and impact of a threat depends on the |
| 243 | target environment in which TF-A is running. For example, attacks |
| 244 | that require physical access are unlikely in server environments while |
| 245 | they are more common in Internet of Things(IoT) environments. |
| 246 | In this threat model we consider three target environments: |
| 247 | ``Internet of Things(IoT)``, ``Mobile`` and ``Server``. |
| 248 | |
| 249 | Threat Assessment |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 250 | ================= |
| 251 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 252 | The following threats were identified by applying STRIDE analysis on |
| 253 | each diagram element of the data flow diagram. |
| 254 | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 255 | For each threat, we strive to indicate whether the mitigations are currently |
| 256 | implemented or not. However, the answer to this question is not always straight |
| 257 | forward. Some mitigations are partially implemented in the generic code but also |
| 258 | rely on the platform code to implement some bits of it. This threat model aims |
| 259 | to be platform-independent and it is important to keep in mind that such threats |
| 260 | only get mitigated if the platform code properly fulfills its responsibilities. |
| 261 | |
| 262 | Also, some mitigations require enabling specific features, which must be |
| 263 | explicitly turned on via a build flag. |
| 264 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 265 | When such conditions must be met, these are highlighted in the ``Mitigations |
| 266 | implemented?`` box. |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 267 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 268 | As our :ref:`Target of Evaluation` is made of several, distinct firmware images, |
| 269 | some threats are confined in specific images, while others apply to each of |
| 270 | them. To help developers implement mitigations in the right place, threats below |
| 271 | are categorized based on the firmware image that should mitigate them. |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 272 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 273 | General Threats for All Firmware Images |
| 274 | --------------------------------------- |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 275 | |
| 276 | +------------------------+---------------------------------------------------+ |
| 277 | | ID | 05 | |
| 278 | +========================+===================================================+ |
Sandrine Bailleux | b8d854d | 2022-05-16 13:57:38 +0200 | [diff] [blame] | 279 | | Threat | | **Information leak via UART logs** | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 280 | | | | |
| 281 | | | | During the development stages of software it is | |
Sandrine Bailleux | b8d854d | 2022-05-16 13:57:38 +0200 | [diff] [blame] | 282 | | | common to print all sorts of information on the | |
| 283 | | | console, including sensitive or confidential | |
| 284 | | | information such as crash reports with detailed | |
| 285 | | | information of the CPU state, current registers | |
| 286 | | | values, privilege level or stack dumps. | |
| 287 | | | | |
| 288 | | | | This information is useful when debugging | |
| 289 | | | problems before releasing the production | |
| 290 | | | version but it could be used by an attacker | |
| 291 | | | to develop a working exploit if left enabled in | |
| 292 | | | the production version. | |
| 293 | | | | |
| 294 | | | | This happens when directly logging sensitive | |
| 295 | | | information and more subtly when logging | |
| 296 | | | side-channel information that can be used by an | |
| 297 | | | attacker to learn about sensitive information. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 298 | +------------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 299 | | Diagram Elements | DF2 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 300 | +------------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 301 | | Affected TF-A | BL1, BL2, BL31 | |
| 302 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 303 | +------------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 304 | | Assets | Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 305 | +------------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 306 | | Threat Agent | AppDebug | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 307 | +------------------------+---------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 308 | | Threat Type | Information Disclosure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 309 | +------------------------+------------------+----------------+---------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 310 | | Application | Server | IoT | Mobile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 311 | +------------------------+------------------+----------------+---------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 312 | | Impact | N/A | Low (2) | Low (2) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 313 | +------------------------+------------------+----------------+---------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 314 | | Likelihood | N/A | High (4) | High (4) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 315 | +------------------------+------------------+----------------+---------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 316 | | Total Risk Rating | N/A | Medium (8) | Medium (8) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 317 | +------------------------+------------------+----------------+---------------+ |
Sandrine Bailleux | b8d854d | 2022-05-16 13:57:38 +0200 | [diff] [blame] | 318 | | Mitigations | | Remove sensitive information logging in | |
| 319 | | | production releases. | |
| 320 | | | | |
| 321 | | | | Do not conditionally log information depending | |
| 322 | | | on potentially sensitive data. | |
| 323 | | | | |
| 324 | | | | Do not log high precision timing information. | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 325 | +------------------------+---------------------------------------------------+ |
| 326 | | Mitigations | | Yes / Platform Specific. | |
| 327 | | implemented? | Requires the right build options to be used. | |
| 328 | | | | |
| 329 | | | | Crash reporting is only enabled for debug | |
| 330 | | | builds by default, see ``CRASH_REPORTING`` | |
| 331 | | | build option. | |
| 332 | | | | |
| 333 | | | | The log level can be tuned at build time, from | |
| 334 | | | very verbose to no output at all. See | |
| 335 | | | ``LOG_LEVEL`` build option. By default, release | |
| 336 | | | builds are a lot less verbose than debug ones | |
| 337 | | | but still produce some output. | |
| 338 | | | | |
| 339 | | | | Messages produced by the platform code should | |
| 340 | | | use the appropriate level of verbosity so as | |
| 341 | | | not to leak sensitive information in production | |
| 342 | | | builds. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 343 | +------------------------+---------------------------------------------------+ |
| 344 | |
| 345 | +------------------------+----------------------------------------------------+ |
| 346 | | ID | 06 | |
| 347 | +========================+====================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 348 | | Threat | | **An attacker can read sensitive data and | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 349 | | | execute arbitrary code through the external | |
| 350 | | | debug and trace interface** | |
| 351 | | | | |
| 352 | | | | Arm processors include hardware-assisted debug | |
| 353 | | | and trace features that can be controlled without| |
| 354 | | | the need for software operating on the platform. | |
| 355 | | | If left enabled without authentication, this | |
| 356 | | | feature can be used by an attacker to inspect and| |
| 357 | | | modify TF-A registers and memory allowing the | |
| 358 | | | attacker to read sensitive data and execute | |
| 359 | | | arbitrary code. | |
| 360 | +------------------------+----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 361 | | Diagram Elements | DF3 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 362 | +------------------------+----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 363 | | Affected TF-A | BL1, BL2, BL31 | |
| 364 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 365 | +------------------------+----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 366 | | Assets | Code Execution, Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 367 | +------------------------+----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 368 | | Threat Agent | AppDebug | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 369 | +------------------------+----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 370 | | Threat Type | Tampering, Information Disclosure, | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 371 | | | Elevation of privilege | |
| 372 | +------------------------+------------------+---------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 373 | | Application | Server | IoT | Mobile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 374 | +------------------------+------------------+---------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 375 | | Impact | N/A | High (4) | High (4) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 376 | +------------------------+------------------+---------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 377 | | Likelihood | N/A | Critical (5) | Critical (5) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 378 | +------------------------+------------------+---------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 379 | | Total Risk Rating | N/A | Critical (20) | Critical (20) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 380 | +------------------------+------------------+---------------+-----------------+ |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 381 | | Mitigations | Disable the debug and trace capability for | |
| 382 | | | production releases or enable proper debug | |
| 383 | | | authentication as recommended by [`DEN0034`_]. | |
| 384 | +------------------------+----------------------------------------------------+ |
| 385 | | Mitigations | | Platform specific. | |
| 386 | | implemented? | | |
| 387 | | | | Configuration of debug and trace capabilities is | |
| 388 | | | entirely platform specific. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 389 | +------------------------+----------------------------------------------------+ |
| 390 | |
| 391 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 392 | | ID | 08 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 393 | +========================+======================================================+ |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 394 | | Threat | | **Memory corruption due to memory overflows and | |
| 395 | | | lack of boundary checking when accessing resources | |
| 396 | | | could allow an attacker to execute arbitrary code, | |
| 397 | | | modify some state variable to change the normal | |
| 398 | | | flow of the program, or leak sensitive | |
| 399 | | | information** | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 400 | | | | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 401 | | | | Like in other software, TF-A has multiple points | |
| 402 | | | where memory corruption security errors can arise. | |
| 403 | | | | |
| 404 | | | | Some of the errors include integer overflow, | |
| 405 | | | buffer overflow, incorrect array boundary checks, | |
| 406 | | | and incorrect error management. | |
| 407 | | | Improper use of asserts instead of proper input | |
| 408 | | | validations might also result in these kinds of | |
| 409 | | | errors in release builds. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 410 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 411 | | Diagram Elements | DF4, DF5 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 412 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 413 | | Affected TF-A | BL1, BL2, BL31 | |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 414 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 415 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 416 | | Assets | Code Execution, Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 417 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 418 | | Threat Agent | NSCode, SecCode | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 419 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 420 | | Threat Type | Tampering, Information Disclosure, | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 421 | | | Elevation of Privilege | |
| 422 | +------------------------+-------------------+-----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 423 | | Application | Server | IoT | Mobile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 424 | +------------------------+-------------------+-----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 425 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 426 | +------------------------+-------------------+-----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 427 | | Likelihood | Medium (3 | Medium (3) | Medium (3) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 428 | +------------------------+-------------------+-----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 429 | | Total Risk Rating | High (15) | High (15) | High (15) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 430 | +------------------------+-------------------+-----------------+----------------+ |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 431 | | Mitigations | | 1) Use proper input validation. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 432 | | | | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 433 | | | | 2) Code reviews, testing. | |
| 434 | +------------------------+------------------------------------------------------+ |
| 435 | | Mitigations | | 1) Yes. | |
| 436 | | implemented? | Data received from normal world, such as addresses | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 437 | | | and sizes identifying memory regions, are | |
| 438 | | | sanitized before being used. These security checks | |
| 439 | | | make sure that the normal world software does not | |
| 440 | | | access memory beyond its limit. | |
| 441 | | | | |
| 442 | | | | By default *asserts* are only used to check for | |
| 443 | | | programming errors in debug builds. Other types of | |
| 444 | | | errors are handled through condition checks that | |
| 445 | | | remain enabled in release builds. See | |
| 446 | | | `TF-A error handling policy`_. TF-A provides an | |
| 447 | | | option to use *asserts* in release builds, however | |
| 448 | | | we recommend using proper runtime checks instead | |
| 449 | | | of relying on asserts in release builds. | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 450 | | | | |
| 451 | | | | 2) Yes. | |
| 452 | | | TF-A uses a combination of manual code reviews | |
| 453 | | | and automated program analysis and testing to | |
| 454 | | | detect and fix memory corruption bugs. All TF-A | |
| 455 | | | code including platform code go through manual | |
| 456 | | | code reviews. Additionally, static code analysis | |
| 457 | | | is performed using Coverity Scan on all TF-A code. | |
| 458 | | | The code is also tested with | |
| 459 | | | `Trusted Firmware-A Tests`_ on Juno and FVP | |
| 460 | | | platforms. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 461 | +------------------------+------------------------------------------------------+ |
| 462 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 463 | |
| 464 | +------------------------+----------------------------------------------------+ |
| 465 | | ID | 11 | |
| 466 | +========================+====================================================+ |
| 467 | | Threat | | **Misconfiguration of the Memory Management Unit | |
| 468 | | | (MMU) may allow a normal world software to | |
| 469 | | | access sensitive data, execute arbitrary | |
| 470 | | | code or access otherwise restricted HW | |
| 471 | | | interface** | |
| 472 | | | | |
| 473 | | | | A misconfiguration of the MMU could | |
| 474 | | | lead to an open door for software running in the | |
| 475 | | | normal world to access sensitive data or even | |
| 476 | | | execute code if the proper security mechanisms | |
| 477 | | | are not in place. | |
| 478 | +------------------------+----------------------------------------------------+ |
| 479 | | Diagram Elements | DF5, DF6 | |
| 480 | +------------------------+----------------------------------------------------+ |
| 481 | | Affected TF-A | BL1, BL2, BL31 | |
| 482 | | Components | | |
| 483 | +------------------------+----------------------------------------------------+ |
| 484 | | Assets | Sensitive Data, Code execution | |
| 485 | +------------------------+----------------------------------------------------+ |
| 486 | | Threat Agent | NSCode | |
| 487 | +------------------------+----------------------------------------------------+ |
| 488 | | Threat Type | Information Disclosure, Elevation of Privilege | |
| 489 | +------------------------+-----------------+-----------------+----------------+ |
| 490 | | Application | Server | IoT | Mobile | |
| 491 | +------------------------+-----------------+-----------------+----------------+ |
| 492 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
| 493 | +------------------------+-----------------+-----------------+----------------+ |
| 494 | | Likelihood | High (4) | High (4) | High (4) | |
| 495 | +------------------------+-----------------+-----------------+----------------+ |
| 496 | | Total Risk Rating | Critical (20) | Critical (20) | Critical (20) | |
| 497 | +------------------------+-----------------+-----------------+----------------+ |
| 498 | | Mitigations | When configuring access permissions, the | |
| 499 | | | principle of least privilege ought to be | |
| 500 | | | enforced. This means we should not grant more | |
| 501 | | | privileges than strictly needed, e.g. code | |
| 502 | | | should be read-only executable, read-only data | |
| 503 | | | should be read-only execute-never, and so on. | |
| 504 | +------------------------+----------------------------------------------------+ |
| 505 | | Mitigations | | Platform specific. | |
| 506 | | implemented? | | |
| 507 | | | | MMU configuration is platform specific, | |
| 508 | | | therefore platforms need to make sure that the | |
| 509 | | | correct attributes are assigned to memory | |
| 510 | | | regions. | |
| 511 | | | | |
| 512 | | | | TF-A provides a library which abstracts the | |
| 513 | | | low-level details of MMU configuration. It | |
| 514 | | | provides well-defined and tested APIs. | |
| 515 | | | Platforms are encouraged to use it to limit the | |
| 516 | | | risk of misconfiguration. | |
| 517 | +------------------------+----------------------------------------------------+ |
| 518 | |
| 519 | |
| 520 | +------------------------+-----------------------------------------------------+ |
| 521 | | ID | 13 | |
| 522 | +========================+=====================================================+ |
| 523 | | Threat | | **Leaving sensitive information in the memory, | |
| 524 | | | can allow an attacker to retrieve them.** | |
| 525 | | | | |
| 526 | | | | Accidentally leaving not-needed sensitive data in | |
| 527 | | | internal buffers can leak them if an attacker | |
| 528 | | | gains access to memory due to a vulnerability. | |
| 529 | +------------------------+-----------------------------------------------------+ |
| 530 | | Diagram Elements | DF4, DF5 | |
| 531 | +------------------------+-----------------------------------------------------+ |
| 532 | | Affected TF-A | BL1, BL2, BL31 | |
| 533 | | Components | | |
| 534 | +------------------------+-----------------------------------------------------+ |
| 535 | | Assets | Sensitive Data | |
| 536 | +------------------------+-----------------------------------------------------+ |
| 537 | | Threat Agent | NSCode, SecCode | |
| 538 | +------------------------+-----------------------------------------------------+ |
| 539 | | Threat Type | Information Disclosure | |
| 540 | +------------------------+-------------------+----------------+----------------+ |
| 541 | | Application | Server | IoT | Mobile | |
| 542 | +------------------------+-------------------+----------------+----------------+ |
| 543 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
| 544 | +------------------------+-------------------+----------------+----------------+ |
| 545 | | Likelihood | Medium (3) | Medium (3) | Medium (3) | |
| 546 | +------------------------+-------------------+----------------+----------------+ |
| 547 | | Total Risk Rating | High (15) | High (15) | High (15) | |
| 548 | +------------------------+-------------------+----------------+----------------+ |
| 549 | | Mitigations | Clear the sensitive data from internal buffers as | |
| 550 | | | soon as they are not needed anymore. | |
| 551 | +------------------------+-----------------------------------------------------+ |
| 552 | | Mitigations | | Yes / Platform specific | |
| 553 | +------------------------+-----------------------------------------------------+ |
| 554 | |
| 555 | |
| 556 | Threats to be Mitigated by the Boot Firmware |
| 557 | -------------------------------------------- |
| 558 | |
| 559 | The boot firmware here refers to the boot ROM (BL1) and the trusted boot |
| 560 | firmware (BL2). Typically it does not stay resident in memory and it is |
| 561 | dismissed once execution has reached the runtime EL3 firmware (BL31). Thus, past |
| 562 | that point in time, the threats below can no longer be exploited. |
| 563 | |
| 564 | Note, however, that this is not necessarily true on all platforms. Platform |
| 565 | vendors should review these threats to make sure they cannot be exploited |
| 566 | nonetheless once execution has reached the runtime EL3 firmware. |
| 567 | |
| 568 | +------------------------+----------------------------------------------------+ |
| 569 | | ID | 01 | |
| 570 | +========================+====================================================+ |
| 571 | | Threat | | **An attacker can mangle firmware images to | |
| 572 | | | execute arbitrary code** | |
| 573 | | | | |
| 574 | | | | Some TF-A images are loaded from external | |
| 575 | | | storage. It is possible for an attacker to access| |
| 576 | | | the external flash memory and change its contents| |
| 577 | | | physically, through the Rich OS, or using the | |
| 578 | | | updating mechanism to modify the non-volatile | |
| 579 | | | images to execute arbitrary code. | |
| 580 | +------------------------+----------------------------------------------------+ |
| 581 | | Diagram Elements | DF1, DF4, DF5 | |
| 582 | +------------------------+----------------------------------------------------+ |
| 583 | | Affected TF-A | BL2, BL31 | |
| 584 | | Components | | |
| 585 | +------------------------+----------------------------------------------------+ |
| 586 | | Assets | Code Execution | |
| 587 | +------------------------+----------------------------------------------------+ |
| 588 | | Threat Agent | PhysicalAccess, NSCode, SecCode | |
| 589 | +------------------------+----------------------------------------------------+ |
| 590 | | Threat Type | Tampering, Elevation of Privilege | |
| 591 | +------------------------+------------------+-----------------+---------------+ |
| 592 | | Application | Server | IoT | Mobile | |
| 593 | +------------------------+------------------+-----------------+---------------+ |
| 594 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
| 595 | +------------------------+------------------+-----------------+---------------+ |
| 596 | | Likelihood | Critical (5) | Critical (5) | Critical (5) | |
| 597 | +------------------------+------------------+-----------------+---------------+ |
| 598 | | Total Risk Rating | Critical (25) | Critical (25) | Critical (25) | |
| 599 | +------------------------+------------------+-----------------+---------------+ |
| 600 | | Mitigations | | 1) Implement the `Trusted Board Boot (TBB)`_ | |
| 601 | | | feature which prevents malicious firmware from | |
| 602 | | | running on the platform by authenticating all | |
| 603 | | | firmware images. | |
| 604 | | | | |
| 605 | | | | 2) Perform extra checks on unauthenticated data, | |
| 606 | | | such as FIP metadata, prior to use. | |
| 607 | +------------------------+----------------------------------------------------+ |
| 608 | | Mitigations | | 1) Yes, provided that the ``TRUSTED_BOARD_BOOT`` | |
| 609 | | implemented? | build option is set to 1. | |
| 610 | | | | |
| 611 | | | | 2) Yes. | |
| 612 | +------------------------+----------------------------------------------------+ |
| 613 | |
| 614 | +------------------------+----------------------------------------------------+ |
| 615 | | ID | 02 | |
| 616 | +========================+====================================================+ |
| 617 | | Threat | | **An attacker may attempt to boot outdated, | |
| 618 | | | potentially vulnerable firmware image** | |
| 619 | | | | |
| 620 | | | | When updating firmware, an attacker may attempt | |
| 621 | | | to rollback to an older version that has unfixed | |
| 622 | | | vulnerabilities. | |
| 623 | +------------------------+----------------------------------------------------+ |
| 624 | | Diagram Elements | DF1, DF4, DF5 | |
| 625 | +------------------------+----------------------------------------------------+ |
| 626 | | Affected TF-A | BL2, BL31 | |
| 627 | | Components | | |
| 628 | +------------------------+----------------------------------------------------+ |
| 629 | | Assets | Code Execution | |
| 630 | +------------------------+----------------------------------------------------+ |
| 631 | | Threat Agent | PhysicalAccess, NSCode, SecCode | |
| 632 | +------------------------+----------------------------------------------------+ |
| 633 | | Threat Type | Tampering | |
| 634 | +------------------------+------------------+-----------------+---------------+ |
| 635 | | Application | Server | IoT | Mobile | |
| 636 | +------------------------+------------------+-----------------+---------------+ |
| 637 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
| 638 | +------------------------+------------------+-----------------+---------------+ |
| 639 | | Likelihood | Critical (5) | Critical (5) | Critical (5) | |
| 640 | +------------------------+------------------+-----------------+---------------+ |
| 641 | | Total Risk Rating | Critical (25) | Critical (25) | Critical (25) | |
| 642 | +------------------------+------------------+-----------------+---------------+ |
| 643 | | Mitigations | Implement anti-rollback protection using | |
| 644 | | | non-volatile counters (NV counters) as required | |
| 645 | | | by `TBBR-Client specification`_. | |
| 646 | +------------------------+----------------------------------------------------+ |
| 647 | | Mitigations | | Yes / Platform specific. | |
| 648 | | implemented? | | |
| 649 | | | | After a firmware image is validated, the image | |
| 650 | | | revision number taken from a certificate | |
| 651 | | | extension field is compared with the | |
| 652 | | | corresponding NV counter stored in hardware to | |
| 653 | | | make sure the new counter value is larger than | |
| 654 | | | the current counter value. | |
| 655 | | | | |
| 656 | | | | **Platforms must implement this protection using | |
| 657 | | | platform specific hardware NV counters.** | |
| 658 | +------------------------+----------------------------------------------------+ |
| 659 | |
| 660 | |
| 661 | +------------------------+-------------------------------------------------------+ |
| 662 | | ID | 03 | |
| 663 | +========================+=======================================================+ |
| 664 | | Threat | | **An attacker can use Time-of-Check-Time-of-Use | |
| 665 | | | (TOCTOU) attack to bypass image authentication | |
| 666 | | | during the boot process** | |
| 667 | | | | |
| 668 | | | | Time-of-Check-Time-of-Use (TOCTOU) threats occur | |
| 669 | | | when the security check is produced before the time | |
| 670 | | | the resource is accessed. If an attacker is sitting | |
| 671 | | | in the middle of the off-chip images, they could | |
| 672 | | | change the binary containing executable code right | |
| 673 | | | after the integrity and authentication check has | |
| 674 | | | been performed. | |
| 675 | +------------------------+-------------------------------------------------------+ |
| 676 | | Diagram Elements | DF1 | |
| 677 | +------------------------+-------------------------------------------------------+ |
| 678 | | Affected TF-A | BL1, BL2 | |
| 679 | | Components | | |
| 680 | +------------------------+-------------------------------------------------------+ |
| 681 | | Assets | Code Execution, Sensitive Data | |
| 682 | +------------------------+-------------------------------------------------------+ |
| 683 | | Threat Agent | PhysicalAccess | |
| 684 | +------------------------+-------------------------------------------------------+ |
| 685 | | Threat Type | Elevation of Privilege | |
| 686 | +------------------------+---------------------+-----------------+---------------+ |
| 687 | | Application | Server | IoT | Mobile | |
| 688 | +------------------------+---------------------+-----------------+---------------+ |
| 689 | | Impact | N/A | Critical (5) | Critical (5) | |
| 690 | +------------------------+---------------------+-----------------+---------------+ |
| 691 | | Likelihood | N/A | Medium (3) | Medium (3) | |
| 692 | +------------------------+---------------------+-----------------+---------------+ |
| 693 | | Total Risk Rating | N/A | High (15) | High (15) | |
| 694 | +------------------------+---------------------+-----------------+---------------+ |
| 695 | | Mitigations | Copy image to on-chip memory before authenticating | |
| 696 | | | it. | |
| 697 | +------------------------+-------------------------------------------------------+ |
| 698 | | Mitigations | | Platform specific. | |
| 699 | | implemented? | | |
| 700 | | | | The list of images to load and their location is | |
| 701 | | | platform specific. Platforms are responsible for | |
| 702 | | | arranging images to be loaded in on-chip memory. | |
| 703 | +------------------------+-------------------------------------------------------+ |
| 704 | |
| 705 | |
| 706 | +------------------------+-------------------------------------------------------+ |
| 707 | | ID | 04 | |
| 708 | +========================+=======================================================+ |
| 709 | | Threat | | **An attacker with physical access can execute | |
| 710 | | | arbitrary image by bypassing the signature | |
| 711 | | | verification stage using glitching techniques** | |
| 712 | | | | |
| 713 | | | | Glitching (Fault injection) attacks attempt to put | |
| 714 | | | a hardware into a undefined state by manipulating an| |
| 715 | | | environmental variable such as power supply. | |
| 716 | | | | |
| 717 | | | | TF-A relies on a chain of trust that starts with the| |
| 718 | | | ROTPK, which is the key stored inside the chip and | |
| 719 | | | the root of all validation processes. If an attacker| |
| 720 | | | can break this chain of trust, they could execute | |
| 721 | | | arbitrary code on the device. This could be | |
| 722 | | | achieved with physical access to the device by | |
| 723 | | | attacking the normal execution flow of the | |
| 724 | | | process using glitching techniques that target | |
| 725 | | | points where the image is validated against the | |
| 726 | | | signature. | |
| 727 | +------------------------+-------------------------------------------------------+ |
| 728 | | Diagram Elements | DF1 | |
| 729 | +------------------------+-------------------------------------------------------+ |
| 730 | | Affected TF-A | BL1, BL2 | |
| 731 | | Components | | |
| 732 | +------------------------+-------------------------------------------------------+ |
| 733 | | Assets | Code Execution | |
| 734 | +------------------------+-------------------------------------------------------+ |
| 735 | | Threat Agent | PhysicalAccess | |
| 736 | +------------------------+-------------------------------------------------------+ |
| 737 | | Threat Type | Tampering, Elevation of Privilege | |
| 738 | +------------------------+---------------------+-----------------+---------------+ |
| 739 | | Application | Server | IoT | Mobile | |
| 740 | +------------------------+---------------------+-----------------+---------------+ |
| 741 | | Impact | N/A | Critical (5) | Critical (5) | |
| 742 | +------------------------+---------------------+-----------------+---------------+ |
| 743 | | Likelihood | N/A | Medium (3) | Medium (3) | |
| 744 | +------------------------+---------------------+-----------------+---------------+ |
| 745 | | Total Risk Rating | N/A | High (15) | High (15) | |
| 746 | +------------------------+---------------------+-----------------+---------------+ |
| 747 | | Mitigations | Mechanisms to detect clock glitch and power | |
| 748 | | | variations. | |
| 749 | +------------------------+-------------------------------------------------------+ |
| 750 | | Mitigations | | No. | |
| 751 | | implemented? | | |
| 752 | | | | The most effective mitigation is adding glitching | |
| 753 | | | detection and mitigation circuit at the hardware | |
| 754 | | | level. | |
| 755 | | | | |
| 756 | | | | However, software techniques, such as adding | |
| 757 | | | redundant checks when performing conditional | |
| 758 | | | branches that are security sensitive, can be used | |
| 759 | | | to harden TF-A against such attacks. | |
| 760 | | | **At the moment TF-A doesn't implement such | |
| 761 | | | mitigations.** | |
| 762 | +------------------------+-------------------------------------------------------+ |
| 763 | |
| 764 | .. topic:: Measured Boot Threats (or lack of) |
| 765 | |
| 766 | In the current Measured Boot design, BL1, BL2, and BL31, as well as the |
| 767 | secure world components, form the |SRTM|. Measurement data is currently |
| 768 | considered an asset to be protected against attack, and this is achieved |
| 769 | by storing them in the Secure Memory. |
| 770 | Beyond the measurements stored inside the TCG-compliant Event Log buffer, |
| 771 | there are no other assets to protect or threats to defend against that |
| 772 | could compromise |TF-A| execution environment's security. |
| 773 | |
| 774 | There are general security assets and threats associated with remote/delegated |
| 775 | attestation. However, these are outside the |TF-A| security boundary and |
| 776 | should be dealt with by the appropriate agent in the platform/system. |
| 777 | Since current Measured Boot design does not use local attestation, there would |
| 778 | be no further assets to protect(like unsealed keys). |
| 779 | |
| 780 | A limitation of the current Measured Boot design is that it is dependent upon |
| 781 | Secure Boot as implementation of Measured Boot does not extend measurements |
| 782 | into a discrete |TPM|, where they would be securely stored and protected |
| 783 | against tampering. This implies that if Secure-Boot is compromised, Measured |
| 784 | Boot may also be compromised. |
| 785 | |
| 786 | Platforms must carefully evaluate the security of the default implementation |
| 787 | since the |SRTM| includes all secure world components. |
| 788 | |
| 789 | |
| 790 | Threats to be Mitigated by the Runtime EL3 Firmware |
| 791 | --------------------------------------------------- |
| 792 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 793 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 794 | | ID | 07 | |
| 795 | +========================+======================================================+ |
| 796 | | Threat | | **An attacker can perform a denial-of-service | |
| 797 | | | attack by using a broken SMC call that causes the | |
| 798 | | | system to reboot or enter into unknown state.** | |
| 799 | | | | |
| 800 | | | | Secure and non-secure clients access TF-A services | |
| 801 | | | through SMC calls. Malicious code can attempt to | |
| 802 | | | place the TF-A runtime into an inconsistent state | |
| 803 | | | by calling unimplemented SMC call or by passing | |
| 804 | | | invalid arguments. | |
| 805 | +------------------------+------------------------------------------------------+ |
| 806 | | Diagram Elements | DF4, DF5 | |
| 807 | +------------------------+------------------------------------------------------+ |
| 808 | | Affected TF-A | BL31 | |
| 809 | | Components | | |
| 810 | +------------------------+------------------------------------------------------+ |
| 811 | | Assets | Availability | |
| 812 | +------------------------+------------------------------------------------------+ |
| 813 | | Threat Agent | NSCode, SecCode | |
| 814 | +------------------------+------------------------------------------------------+ |
| 815 | | Threat Type | Denial of Service | |
| 816 | +------------------------+-------------------+----------------+-----------------+ |
| 817 | | Application | Server | IoT | Mobile | |
| 818 | +------------------------+-------------------+----------------+-----------------+ |
| 819 | | Impact | Medium (3) | Medium (3) | Medium (3) | |
| 820 | +------------------------+-------------------+----------------+-----------------+ |
| 821 | | Likelihood | High (4) | High (4) | High (4) | |
| 822 | +------------------------+-------------------+----------------+-----------------+ |
| 823 | | Total Risk Rating | High (12) | High (12) | High (12) | |
| 824 | +------------------------+-------------------+----------------+-----------------+ |
| 825 | | Mitigations | Validate SMC function ids and arguments before using | |
| 826 | | | them. | |
| 827 | +------------------------+------------------------------------------------------+ |
| 828 | | Mitigations | | Yes / Platform specific. | |
| 829 | | implemented? | | |
| 830 | | | | For standard services, all input is validated. | |
| 831 | | | | |
| 832 | | | | Platforms that implement SiP services must also | |
| 833 | | | validate SMC call arguments. | |
| 834 | +------------------------+------------------------------------------------------+ |
| 835 | |
| 836 | |
| 837 | +------------------------+------------------------------------------------------+ |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 838 | | ID | 09 | |
| 839 | +========================+======================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 840 | | Threat | | **Improperly handled SMC calls can leak register | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 841 | | | contents** | |
| 842 | | | | |
Sandrine Bailleux | 1c7d74e | 2022-05-12 16:37:18 +0200 | [diff] [blame] | 843 | | | | When switching between worlds, TF-A register state | |
| 844 | | | can leak to software in different security | |
| 845 | | | contexts. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 846 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 1c7d74e | 2022-05-12 16:37:18 +0200 | [diff] [blame] | 847 | | Diagram Elements | DF4, DF5 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 848 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 849 | | Affected TF-A | BL31 | |
| 850 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 851 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 852 | | Assets | Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 853 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 1c7d74e | 2022-05-12 16:37:18 +0200 | [diff] [blame] | 854 | | Threat Agent | NSCode, SecCode | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 855 | +------------------------+------------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 856 | | Threat Type | Information Disclosure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 857 | +------------------------+-------------------+----------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 858 | | Application | Server | IoT | Mobile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 859 | +------------------------+-------------------+----------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 860 | | Impact | Medium (3) | Medium (3) | Medium (3) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 861 | +------------------------+-------------------+----------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 862 | | Likelihood | High (4) | High (4) | High (4) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 863 | +------------------------+-------------------+----------------+-----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 864 | | Total Risk Rating | High (12) | High (12) | High (12) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 865 | +------------------------+-------------------+----------------+-----------------+ |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 866 | | Mitigations | Save and restore registers when switching contexts. | |
| 867 | +------------------------+------------------------------------------------------+ |
| 868 | | Mitigations | | Yes. | |
| 869 | | implemented? | | |
| 870 | | | | This is the default behaviour in TF-A. | |
| 871 | | | Build options are also provided to save/restore | |
| 872 | | | additional registers such as floating-point | |
| 873 | | | registers. These should be enabled if required. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 874 | +------------------------+------------------------------------------------------+ |
| 875 | |
| 876 | +------------------------+-----------------------------------------------------+ |
| 877 | | ID | 10 | |
| 878 | +========================+=====================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 879 | | Threat | | **SMC calls can leak sensitive information from | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 880 | | | TF-A memory via microarchitectural side channels**| |
| 881 | | | | |
| 882 | | | | Microarchitectural side-channel attacks such as | |
| 883 | | | `Spectre`_ can be used to leak data across | |
| 884 | | | security boundaries. An attacker might attempt to | |
| 885 | | | use this kind of attack to leak sensitive | |
| 886 | | | data from TF-A memory. | |
| 887 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 888 | | Diagram Elements | DF4, DF5 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 889 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 890 | | Affected TF-A | BL31 | |
| 891 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 892 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 893 | | Assets | Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 894 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 895 | | Threat Agent | SecCode, NSCode | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 896 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 897 | | Threat Type | Information Disclosure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 898 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 899 | | Application | Server | IoT | Mobile | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 900 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 901 | | Impact | Medium (3) | Medium (3) | Medium (3) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 902 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 903 | | Likelihood | Medium (3) | Medium (3) | Medium (3) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 904 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 905 | | Total Risk Rating | Medium (9) | Medium (9) | Medium (9) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 906 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 907 | | Mitigations | Enable appropriate side-channel protections. | |
| 908 | +------------------------+-----------------------------------------------------+ |
| 909 | | Mitigations | | Yes / Platform specific. | |
| 910 | | implemented? | | |
| 911 | | | | TF-A implements software mitigations for Spectre | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 912 | | | type attacks as recommended by `Cache Speculation | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 913 | | | Side-channels`_ for the generic code. | |
| 914 | | | | |
| 915 | | | | SiPs should implement similar mitigations for | |
| 916 | | | code that is deemed to be vulnerable to such | |
| 917 | | | attacks. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 918 | +------------------------+-----------------------------------------------------+ |
| 919 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 920 | |
| 921 | +------------------------+-----------------------------------------------------+ |
| 922 | | ID | 12 | |
| 923 | +========================+=====================================================+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 924 | | Threat | | **Incorrect configuration of Performance Monitor | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 925 | | | Unit (PMU) counters can allow an attacker to | |
| 926 | | | mount side-channel attacks using information | |
| 927 | | | exposed by the counters** | |
| 928 | | | | |
| 929 | | | | Non-secure software can configure PMU registers | |
| 930 | | | to count events at any exception level and in | |
| 931 | | | both Secure and Non-secure states. This allows | |
| 932 | | | a Non-secure software (or a lower-level Secure | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 933 | | | software) to potentially carry out | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 934 | | | side-channel timing attacks against TF-A. | |
| 935 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 936 | | Diagram Elements | DF5, DF6 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 937 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 938 | | Affected TF-A | BL31 | |
| 939 | | Components | | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 940 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 941 | | Assets | Sensitive Data | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 942 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 943 | | Threat Agent | NSCode | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 944 | +------------------------+-----------------------------------------------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 945 | | Threat Type | Information Disclosure | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 946 | +------------------------+-------------------+----------------+----------------+ |
Tamas Ban | cf151b7 | 2022-11-30 17:06:05 +0100 | [diff] [blame] | 947 | | Application | Server | IoT | Mobile | |
| 948 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 949 | | Impact | Medium (3) | Medium (3) | Medium (3) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 950 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 951 | | Likelihood | Low (2) | Low (2) | Low (2) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 952 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 6e5c218 | 2022-05-10 14:55:01 +0200 | [diff] [blame] | 953 | | Total Risk Rating | Medium (6) | Medium (6) | Medium (6) | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 954 | +------------------------+-------------------+----------------+----------------+ |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 955 | | Mitigations | Follow mitigation strategies as described in | |
| 956 | | | `Secure Development Guidelines`_. | |
| 957 | +------------------------+-----------------------------------------------------+ |
| 958 | | Mitigations | | Yes / platform specific. | |
| 959 | | implemented? | | |
| 960 | | | | General events and cycle counting in the Secure | |
| 961 | | | world is prohibited by default when applicable. | |
| 962 | | | | |
| 963 | | | | However, on some implementations (e.g. PMUv3) | |
| 964 | | | Secure world event counting depends on external | |
| 965 | | | debug interface signals, i.e. Secure world event | |
| 966 | | | counting is enabled if external debug is enabled. | |
| 967 | | | | |
| 968 | | | | Configuration of debug signals is platform | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 969 | | | specific, therefore platforms need to make sure | |
| 970 | | | that external debug is disabled in production or | |
Sandrine Bailleux | 94e7009 | 2022-05-13 12:39:56 +0200 | [diff] [blame] | 971 | | | proper debug authentication is in place. This | |
| 972 | | | should be the case if threat #06 is properly | |
| 973 | | | mitigated. | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 974 | +------------------------+-----------------------------------------------------+ |
| 975 | |
Sandrine Bailleux | 522185b | 2023-08-21 14:28:54 +0200 | [diff] [blame] | 976 | |
| 977 | Threats to be Mitigated by an External Agent Outside of TF-A |
| 978 | ------------------------------------------------------------ |
Tamas Ban | cf151b7 | 2022-11-30 17:06:05 +0100 | [diff] [blame] | 979 | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 980 | +------------------------+-----------------------------------------------------+ |
| 981 | | ID | 14 | |
| 982 | +========================+=====================================================+ |
Jeffrey Kardatzke | ab7e557 | 2023-02-09 11:03:17 -0800 | [diff] [blame] | 983 | | Threat | | **Attacker wants to execute an arbitrary or | |
| 984 | | | untrusted binary as the secure OS.** | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 985 | | | | |
Jeffrey Kardatzke | ab7e557 | 2023-02-09 11:03:17 -0800 | [diff] [blame] | 986 | | | | When the option OPTEE_ALLOW_SMC_LOAD is enabled, | |
| 987 | | | this trusts the non-secure world up until the | |
| 988 | | | point it issues the SMC call to load the Secure | |
| 989 | | | BL32 payload. If a compromise occurs before the | |
| 990 | | | SMC call is invoked, then arbitrary code execution| |
| 991 | | | in S-EL1 can occur or arbitrary memory in EL3 can | |
| 992 | | | be overwritten. | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 993 | +------------------------+-----------------------------------------------------+ |
| 994 | | Diagram Elements | DF5 | |
| 995 | +------------------------+-----------------------------------------------------+ |
| 996 | | Affected TF-A | BL31, BL32 | |
| 997 | | Components | | |
| 998 | +------------------------+-----------------------------------------------------+ |
| 999 | | Assets | Code Execution, Sensitive Data | |
| 1000 | +------------------------+-----------------------------------------------------+ |
| 1001 | | Threat Agent | NSCode | |
| 1002 | +------------------------+-----------------------------------------------------+ |
| 1003 | | Threat Type | Tampering, Information Disclosure, | |
| 1004 | | | Elevation of privilege | |
| 1005 | +------------------------+-----------------+-----------------+-----------------+ |
| 1006 | | Application | Server | IoT | Mobile | |
| 1007 | +------------------------+-----------------+-----------------+-----------------+ |
| 1008 | | Impact | Critical (5) | Critical (5) | Critical (5) | |
| 1009 | +------------------------+-----------------+-----------------+-----------------+ |
Jeffrey Kardatzke | ab7e557 | 2023-02-09 11:03:17 -0800 | [diff] [blame] | 1010 | | Likelihood | High (4) | High (4) | High (4) | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 1011 | +------------------------+-----------------+-----------------+-----------------+ |
Jeffrey Kardatzke | ab7e557 | 2023-02-09 11:03:17 -0800 | [diff] [blame] | 1012 | | Total Risk Rating | Critical (20) | Critical (20) | Critical (20) | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 1013 | +------------------------+-----------------+-----------------+-----------------+ |
| 1014 | | Mitigations | When enabling the option OPTEE_ALLOW_SMC_LOAD, | |
| 1015 | | | the non-secure OS must be considered a closed | |
| 1016 | | | platform up until the point the SMC can be invoked | |
| 1017 | | | to load OP-TEE. | |
| 1018 | +------------------------+-----------------------------------------------------+ |
| 1019 | | Mitigations | | None in TF-A itself. This option is only used by | |
| 1020 | | implemented? | ChromeOS currently which has other mechanisms to | |
| 1021 | | | to mitigate this threat which are described in | |
| 1022 | | | `OP-TEE Dispatcher`_. | |
| 1023 | +------------------------+-----------------------------------------------------+ |
| 1024 | |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 1025 | -------------- |
| 1026 | |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 1027 | *Copyright (c) 2021-2023, Arm Limited. All rights reserved.* |
Zelalem | 05fed52 | 2021-02-24 19:20:09 -0600 | [diff] [blame] | 1028 | |
| 1029 | |
| 1030 | .. _STRIDE threat analysis technique: https://docs.microsoft.com/en-us/azure/security/develop/threat-modeling-tool-threats#stride-model |
| 1031 | .. _DEN0034: https://developer.arm.com/documentation/den0034/latest |
| 1032 | .. _Cache Speculation Side-channels: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability |
| 1033 | .. _Spectre: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability |
| 1034 | .. _TBBR-Client specification: https://developer.arm.com/documentation/den0006/d/ |
| 1035 | .. _Trusted Board Boot (TBB): https://trustedfirmware-a.readthedocs.io/en/latest/design/trusted-board-boot.html |
| 1036 | .. _TF-A error handling policy: https://trustedfirmware-a.readthedocs.io/en/latest/process/coding-guidelines.html#error-handling-and-robustness |
| 1037 | .. _Secure Development Guidelines: https://trustedfirmware-a.readthedocs.io/en/latest/process/security-hardening.html#secure-development-guidelines |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 1038 | .. _Trusted Firmware-A Tests: https://git.trustedfirmware.org/TF-A/tf-a-tests.git/about/ |
Jeffrey Kardatzke | 7e6b09a | 2022-10-03 15:50:21 -0700 | [diff] [blame] | 1039 | .. _OP-TEE Dispatcher: https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/components/spd/optee-dispatcher.rst |