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