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