Gary Morrison | d4d951a | 2021-11-10 14:40:15 -0600 | [diff] [blame] | 1 | SPMC Threat Model |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 2 | ***************** |
| 3 | |
| 4 | ************************ |
| 5 | Introduction |
| 6 | ************************ |
| 7 | This document provides a threat model for the TF-A `Secure Partition Manager`_ |
| 8 | (SPM) implementation or more generally the S-EL2 reference firmware running on |
| 9 | systems implementing the FEAT_SEL2 (formerly Armv8.4 Secure EL2) architecture |
| 10 | extension. The SPM implementation is based on the `Arm Firmware Framework for |
Olivier Deprez | 2b0be75 | 2021-09-01 10:25:21 +0200 | [diff] [blame] | 11 | Arm A-profile`_ specification. |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 12 | |
| 13 | In brief, the broad FF-A specification and S-EL2 firmware implementation |
| 14 | provide: |
| 15 | |
| 16 | - Isolation of mutually mistrusting SW components, or endpoints in the FF-A |
| 17 | terminology. |
| 18 | - Distinct sandboxes in the secure world called secure partitions. This permits |
| 19 | isolation of services from multiple vendors. |
| 20 | - A standard protocol for communication and memory sharing between FF-A |
| 21 | endpoints. |
| 22 | - Mutual isolation of the normal world and the secure world (e.g. a Trusted OS |
| 23 | is prevented to map an arbitrary NS physical memory region such as the kernel |
| 24 | or the Hypervisor). |
| 25 | |
| 26 | ************************ |
| 27 | Target of Evaluation |
| 28 | ************************ |
| 29 | In this threat model, the target of evaluation is the S-EL2 firmware or the |
| 30 | ``Secure Partition Manager Core`` component (SPMC). |
| 31 | The monitor and SPMD at EL3 are covered by the `Generic TF-A threat model`_. |
| 32 | |
| 33 | The scope for this threat model is: |
| 34 | |
| 35 | - The TF-A implementation for the S-EL2 SPMC based on the Hafnium hypervisor |
| 36 | running in the secure world of TrustZone (at S-EL2 exception level). |
| 37 | The threat model is not related to the normal world Hypervisor or VMs. |
| 38 | The S-EL1 SPMC solution is not covered. |
J-Alves | fce5680 | 2021-11-11 17:23:53 +0000 | [diff] [blame] | 39 | - The implementation complies with the FF-A v1.0 specification, and a few |
| 40 | features of FF-A v1.1 specification. |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 41 | - Secure partitions are statically provisioned at boot time. |
| 42 | - Focus on the run-time part of the life-cycle (no specific emphasis on boot |
| 43 | time, factory firmware provisioning, firmware udpate etc.) |
| 44 | - Not covering advanced or invasive physical attacks such as decapsulation, |
| 45 | FIB etc. |
| 46 | - Assumes secure boot or in particular TF-A trusted boot (TBBR or dual CoT) is |
| 47 | enabled. An attacker cannot boot arbitrary images that are not approved by the |
| 48 | SiP or platform providers. |
| 49 | |
| 50 | Data Flow Diagram |
| 51 | ====================== |
| 52 | Figure 1 shows a high-level data flow diagram for the SPM split into an SPMD |
| 53 | component at EL3 and an SPMC component at S-EL2. The SPMD mostly acts as a |
| 54 | relayer/pass-through between the normal world and the secure world. It is |
| 55 | assumed to expose small attack surface. |
| 56 | |
| 57 | A description of each diagram element is given in Table 1. In the diagram, the |
| 58 | red broken lines indicate trust boundaries. |
| 59 | |
| 60 | Components outside of the broken lines are considered untrusted. |
| 61 | |
| 62 | .. uml:: ../resources/diagrams/plantuml/spm_dfd.puml |
| 63 | :caption: Figure 1: SPMC Data Flow Diagram |
| 64 | |
| 65 | .. table:: Table 1: SPMC Data Flow Diagram Description |
| 66 | |
| 67 | +---------------------+--------------------------------------------------------+ |
| 68 | | Diagram Element | Description | |
| 69 | +=====================+========================================================+ |
| 70 | | ``DF1`` | SP to SPMC communication. FF-A function invocation or | |
| 71 | | | implementation-defined Hypervisor call. | |
| 72 | +---------------------+--------------------------------------------------------+ |
| 73 | | ``DF2`` | SPMC to SPMD FF-A call. | |
| 74 | +---------------------+--------------------------------------------------------+ |
| 75 | | ``DF3`` | SPMD to NS forwarding. | |
| 76 | +---------------------+--------------------------------------------------------+ |
| 77 | | ``DF4`` | SP to SP FF-A direct message request/response. | |
| 78 | | | Note as a matter of simplifying the diagram | |
| 79 | | | the SP to SP communication happens through the SPMC | |
| 80 | | | (SP1 performs a direct message request to the | |
| 81 | | | SPMC targeting SP2 as destination. And similarly for | |
| 82 | | | the direct message response from SP2 to SP1). | |
| 83 | +---------------------+--------------------------------------------------------+ |
| 84 | | ``DF5`` | HW control. | |
| 85 | +---------------------+--------------------------------------------------------+ |
| 86 | | ``DF6`` | Bootloader image loading. | |
| 87 | +---------------------+--------------------------------------------------------+ |
| 88 | | ``DF7`` | External memory access. | |
| 89 | +---------------------+--------------------------------------------------------+ |
| 90 | |
| 91 | ********************* |
| 92 | Threat Analysis |
| 93 | ********************* |
| 94 | |
| 95 | This threat model follows a similar methodology to the `Generic TF-A threat model`_. |
| 96 | The following sections define: |
| 97 | |
| 98 | - Trust boundaries |
| 99 | - Assets |
| 100 | - Theat agents |
| 101 | - Threat types |
| 102 | |
| 103 | Trust boundaries |
| 104 | ============================ |
| 105 | |
| 106 | - Normal world is untrusted. |
| 107 | - Secure world and normal world are separate trust boundaries. |
| 108 | - EL3 monitor, SPMD and SPMC are trusted. |
| 109 | - Bootloaders (in particular BL1/BL2 if using TF-A) and run-time BL31 are |
| 110 | implicitely trusted by the usage of secure boot. |
| 111 | - EL3 monitor, SPMD, SPMC do not trust SPs. |
| 112 | |
| 113 | .. figure:: ../resources/diagrams/spm-threat-model-trust-boundaries.png |
| 114 | |
| 115 | Figure 2: Trust boundaries |
| 116 | |
| 117 | Assets |
| 118 | ============================ |
| 119 | |
| 120 | The following assets are identified: |
| 121 | |
| 122 | - SPMC state. |
| 123 | - SP state. |
| 124 | - Information exchange between endpoints (partition messages). |
| 125 | - SPMC secrets (e.g. pointer authentication key when enabled) |
| 126 | - SP secrets (e.g. application keys). |
| 127 | - Scheduling cycles. |
| 128 | - Shared memory. |
| 129 | |
| 130 | Threat Agents |
| 131 | ============================ |
| 132 | |
| 133 | The following threat agents are identified: |
| 134 | |
| 135 | - NS-Endpoint identifies a non-secure endpoint: normal world client at NS-EL2 |
| 136 | (Hypervisor) or NS-EL1 (VM or OS kernel). |
| 137 | - S-Endpoint identifies a secure endpoint typically a secure partition. |
| 138 | - Hardware attacks (non-invasive) requiring a physical access to the device, |
| 139 | such as bus probing or DRAM stress. |
| 140 | |
| 141 | Threat types |
| 142 | ============================ |
| 143 | |
| 144 | The following threat categories as exposed in the `Generic TF-A threat model`_ |
| 145 | are re-used: |
| 146 | |
| 147 | - Spoofing |
| 148 | - Tampering |
| 149 | - Repudiation |
| 150 | - Information disclosure |
| 151 | - Denial of service |
| 152 | - Elevation of privileges |
| 153 | |
| 154 | Similarly this threat model re-uses the same threat risk ratings. The risk |
| 155 | analysis is evaluated based on the environment being ``Server`` or ``Mobile``. |
| 156 | |
| 157 | Threat Assessment |
| 158 | ============================ |
| 159 | |
| 160 | The following threats are identified by applying STRIDE analysis on each diagram |
| 161 | element of the data flow diagram. |
| 162 | |
| 163 | +------------------------+----------------------------------------------------+ |
| 164 | | ID | 01 | |
| 165 | +========================+====================================================+ |
| 166 | | ``Threat`` | **An endpoint impersonates the sender or receiver | |
| 167 | | | FF-A ID in a direct request/response invocation.** | |
| 168 | +------------------------+----------------------------------------------------+ |
| 169 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 170 | +------------------------+----------------------------------------------------+ |
| 171 | | ``Affected TF-A | SPMD, SPMC | |
| 172 | | Components`` | | |
| 173 | +------------------------+----------------------------------------------------+ |
| 174 | | ``Assets`` | SP state | |
| 175 | +------------------------+----------------------------------------------------+ |
| 176 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 177 | +------------------------+----------------------------------------------------+ |
| 178 | | ``Threat Type`` | Spoofing | |
| 179 | +------------------------+------------------+-----------------+---------------+ |
| 180 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 181 | +------------------------+------------------++----------------+---------------+ |
| 182 | | ``Impact`` | Critical(5) | Critical(5) | | |
| 183 | +------------------------+------------------++----------------+---------------+ |
| 184 | | ``Likelihood`` | Critical(5) | Critical(5) | | |
| 185 | +------------------------+------------------++----------------+---------------+ |
| 186 | | ``Total Risk Rating`` | Critical(25) | Critical(25) | | |
| 187 | +------------------------+------------------+-----------------+---------------+ |
| 188 | | ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | |
| 189 | | | The guidance below is left for a system integrator | |
| 190 | | | to implemented as necessary. | |
| 191 | | | The SPMC must enforce checks in the direct message | |
| 192 | | | request/response interfaces such an endpoint cannot| |
| 193 | | | spoof the origin and destination worlds (e.g. a NWd| |
| 194 | | | originated message directed to the SWd cannot use a| |
| 195 | | | SWd ID as the sender ID). | |
| 196 | | | Additionally a software component residing in the | |
| 197 | | | SPMC can be added for the purpose of direct | |
| 198 | | | request/response filtering. | |
| 199 | | | It can be configured with the list of known IDs | |
| 200 | | | and about which interaction can occur between one | |
| 201 | | | and another endpoint (e.g. which NWd endpoint ID | |
| 202 | | | sends a direct request to which SWd endpoint ID). | |
| 203 | | | This component checks the sender/receiver fields | |
| 204 | | | for a legitimate communication between endpoints. | |
| 205 | | | A similar component can exist in the OS kernel | |
| 206 | | | driver, or Hypervisor although it remains untrusted| |
| 207 | | | by the SPMD/SPMC. | |
| 208 | +------------------------+----------------------------------------------------+ |
| 209 | |
| 210 | +------------------------+----------------------------------------------------+ |
| 211 | | ID | 02 | |
| 212 | +========================+====================================================+ |
| 213 | | ``Threat`` | **Tampering with memory shared between an endpoint | |
| 214 | | | and the SPMC.** | |
| 215 | | | A malicious endpoint may attempt tampering with its| |
| 216 | | | RX/TX buffer contents while the SPMC is processing | |
| 217 | | | it (TOCTOU). | |
| 218 | +------------------------+----------------------------------------------------+ |
| 219 | | ``Diagram Elements`` | DF1, DF3, DF4, DF7 | |
| 220 | +------------------------+----------------------------------------------------+ |
| 221 | | ``Affected TF-A | SPMC | |
| 222 | | Components`` | | |
| 223 | +------------------------+----------------------------------------------------+ |
| 224 | | ``Assets`` | Shared memory, Information exchange | |
| 225 | +------------------------+----------------------------------------------------+ |
| 226 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 227 | +------------------------+----------------------------------------------------+ |
| 228 | | ``Threat Type`` | Tampering | |
| 229 | +------------------------+------------------+-----------------+---------------+ |
| 230 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 231 | +------------------------+------------------+-----------------+---------------+ |
| 232 | | ``Impact`` | High (4) | High (4) | | |
| 233 | +------------------------+------------------+-----------------+---------------+ |
| 234 | | ``Likelihood`` | High (4) | High (4) | | |
| 235 | +------------------------+------------------+-----------------+---------------+ |
| 236 | | ``Total Risk Rating`` | High (16) | High (16) | | |
| 237 | +------------------------+------------------+-----------------+---------------+ |
| 238 | | ``Mitigations`` | In context of FF-A v1.0 this is the case of sharing| |
| 239 | | | the RX/TX buffer pair and usage in the | |
| 240 | | | PARTITION_INFO_GET or mem sharing primitives. | |
| 241 | | | The SPMC must copy the contents of the TX buffer | |
| 242 | | | to an internal temporary buffer before processing | |
| 243 | | | its contents. The SPMC must implement hardened | |
| 244 | | | input validation on data transmitted through the TX| |
| 245 | | | buffer by an untrusted endpoint. | |
| 246 | | | The TF-A SPMC mitigates this threat by enforcing | |
| 247 | | | checks on data transmitted through RX/TX buffers. | |
| 248 | +------------------------+----------------------------------------------------+ |
| 249 | |
| 250 | +------------------------+----------------------------------------------------+ |
| 251 | | ID | 03 | |
| 252 | +========================+====================================================+ |
| 253 | | ``Threat`` | **An endpoint may tamper with its own state or the | |
| 254 | | | state of another endpoint.** | |
| 255 | | | A malicious endpoint may attempt violating: | |
| 256 | | | - its own or another SP state by using an unusual | |
| 257 | | | combination (or out-of-order) FF-A function | |
| 258 | | | invocations. | |
| 259 | | | This can also be an endpoint emitting | |
| 260 | | | FF-A function invocations to another endpoint while| |
Madhukar Pappireddy | ce246f6 | 2022-10-14 16:06:00 -0500 | [diff] [blame] | 261 | | | the latter is not in a state to receive it (e.g. a | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 262 | | | SP sends a direct request to the normal world early| |
| 263 | | | while the normal world is not booted yet). | |
| 264 | | | - the SPMC state itself by employing unexpected | |
| 265 | | | transitions in FF-A memory sharing, direct requests| |
| 266 | | | and responses, or handling of interrupts. | |
| 267 | | | This can be led by random stimuli injection or | |
| 268 | | | fuzzing. | |
| 269 | +------------------------+----------------------------------------------------+ |
| 270 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 271 | +------------------------+----------------------------------------------------+ |
| 272 | | ``Affected TF-A | SPMD, SPMC | |
| 273 | | Components`` | | |
| 274 | +------------------------+----------------------------------------------------+ |
| 275 | | ``Assets`` | SP state, SPMC state | |
| 276 | +------------------------+----------------------------------------------------+ |
| 277 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 278 | +------------------------+----------------------------------------------------+ |
| 279 | | ``Threat Type`` | Tampering | |
| 280 | +------------------------+------------------+-----------------+---------------+ |
| 281 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 282 | +------------------------+------------------+-----------------+---------------+ |
| 283 | | ``Impact`` | High (4) | High (4) | | |
| 284 | +------------------------+------------------+-----------------+---------------+ |
| 285 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 286 | +------------------------+------------------+-----------------+---------------+ |
| 287 | | ``Total Risk Rating`` | High (12) | High (12) | | |
| 288 | +------------------------+------------------+-----------------+---------------+ |
Madhukar Pappireddy | ce246f6 | 2022-10-14 16:06:00 -0500 | [diff] [blame] | 289 | | ``Mitigations`` | The TF-A SPMC provides mitigation against such | |
| 290 | | | threat by following the guidance for partition | |
| 291 | | | runtime models as described in FF-A v1.1 EAC0 spec.| |
| 292 | | | The SPMC performs numerous checks in runtime to | |
| 293 | | | prevent illegal state transitions by adhering to | |
| 294 | | | the partition runtime model. | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 295 | +------------------------+----------------------------------------------------+ |
| 296 | |
| 297 | +------------------------+----------------------------------------------------+ |
| 298 | | ID | 04 | |
| 299 | +========================+====================================================+ |
| 300 | | ``Threat`` | *An attacker may attempt injecting errors by the | |
| 301 | | | use of external DRAM stress techniques.** | |
| 302 | | | A malicious agent may attempt toggling an SP | |
| 303 | | | Stage-2 MMU descriptor bit within the page tables | |
| 304 | | | that the SPMC manages. This can happen in Rowhammer| |
| 305 | | | types of attack. | |
| 306 | +------------------------+----------------------------------------------------+ |
| 307 | | ``Diagram Elements`` | DF7 | |
| 308 | +------------------------+----------------------------------------------------+ |
| 309 | | ``Affected TF-A | SPMC | |
| 310 | | Components`` | | |
| 311 | +------------------------+----------------------------------------------------+ |
| 312 | | ``Assets`` | SP or SPMC state | |
| 313 | +------------------------+----------------------------------------------------+ |
| 314 | | ``Threat Agent`` | Hardware attack | |
| 315 | +------------------------+----------------------------------------------------+ |
| 316 | | ``Threat Type`` | Tampering | |
| 317 | +------------------------+------------------+---------------+-----------------+ |
| 318 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 319 | +------------------------+------------------+---------------+-----------------+ |
| 320 | | ``Impact`` | High (4) | High (4) | | |
| 321 | +------------------------+------------------+---------------+-----------------+ |
| 322 | | ``Likelihood`` | Low (2) | Medium (3) | | |
| 323 | +------------------------+------------------+---------------+-----------------+ |
| 324 | | ``Total Risk Rating`` | Medium (8) | High (12) | | |
| 325 | +------------------------+------------------+---------------+-----------------+ |
| 326 | | ``Mitigations`` | The TF-A SPMC does not provide mitigations to this | |
| 327 | | | type of attack. It can be addressed by the use of | |
| 328 | | | dedicated HW circuity or hardening at the chipset | |
| 329 | | | or platform level left to the integrator. | |
| 330 | +------------------------+----------------------------------------------------+ |
| 331 | |
| 332 | +------------------------+----------------------------------------------------+ |
| 333 | | ID | 05 | |
| 334 | +========================+====================================================+ |
| 335 | | ``Threat`` | **Protection of the SPMC from a DMA capable device | |
| 336 | | | upstream to an SMMU.** | |
| 337 | | | A device may attempt to tamper with the internal | |
| 338 | | | SPMC code/data sections. | |
| 339 | +------------------------+----------------------------------------------------+ |
| 340 | | ``Diagram Elements`` | DF5 | |
| 341 | +------------------------+----------------------------------------------------+ |
| 342 | | ``Affected TF-A | SPMC | |
| 343 | | Components`` | | |
| 344 | +------------------------+----------------------------------------------------+ |
| 345 | | ``Assets`` | SPMC or SP state | |
| 346 | +------------------------+----------------------------------------------------+ |
| 347 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 348 | +------------------------+----------------------------------------------------+ |
| 349 | | ``Threat Type`` | Tampering, Elevation of privileges | |
| 350 | +------------------------+------------------+---------------+-----------------+ |
| 351 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 352 | +------------------------+------------------+---------------+-----------------+ |
| 353 | | ``Impact`` | High (4) | High (4) | | |
| 354 | +------------------------+------------------+---------------+-----------------+ |
| 355 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 356 | +------------------------+------------------+---------------+-----------------+ |
| 357 | | ``Total Risk Rating`` | High (12) | High (12) | | |
| 358 | +------------------------+------------------+---------------+-----------------+ |
| 359 | | ``Mitigations`` | A platform may prefer assigning boot time, | |
| 360 | | | statically alocated memory regions through the SMMU| |
| 361 | | | configuration and page tables. The FF-A v1.1 | |
| 362 | | | specification provisions this capability through | |
| 363 | | | static DMA isolation. | |
| 364 | | | The TF-A SPMC does not mitigate this threat. | |
| 365 | | | It will adopt the static DMA isolation approach in | |
| 366 | | | a future release. | |
| 367 | +------------------------+----------------------------------------------------+ |
| 368 | |
| 369 | +------------------------+----------------------------------------------------+ |
| 370 | | ID | 06 | |
| 371 | +========================+====================================================+ |
| 372 | | ``Threat`` | **Replay fragments of past communication between | |
| 373 | | | endpoints.** | |
| 374 | | | A malicious endpoint may replay a message exchange | |
| 375 | | | that occured between two legitimate endpoint as | |
| 376 | | | a matter of triggering a malfunction or extracting | |
| 377 | | | secrets from the receiving endpoint. In particular | |
| 378 | | | the memory sharing operation with fragmented | |
| 379 | | | messages between an endpoint and the SPMC may be | |
| 380 | | | replayed by a malicious agent as a matter of | |
| 381 | | | getting access or gaining permissions to a memory | |
| 382 | | | region which does not belong to this agent. | |
| 383 | +------------------------+----------------------------------------------------+ |
| 384 | | ``Diagram Elements`` | DF2, DF3 | |
| 385 | +------------------------+----------------------------------------------------+ |
| 386 | | ``Affected TF-A | SPMC | |
| 387 | | Components`` | | |
| 388 | +------------------------+----------------------------------------------------+ |
| 389 | | ``Assets`` | Information exchange | |
| 390 | +------------------------+----------------------------------------------------+ |
| 391 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 392 | +------------------------+----------------------------------------------------+ |
| 393 | | ``Threat Type`` | Repdudiation | |
| 394 | +------------------------+------------------+---------------+-----------------+ |
| 395 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 396 | +------------------------+------------------+---------------+-----------------+ |
| 397 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 398 | +------------------------+------------------+---------------+-----------------+ |
| 399 | | ``Likelihood`` | High (4) | High (4) | | |
| 400 | +------------------------+------------------+---------------+-----------------+ |
| 401 | | ``Total Risk Rating`` | High (12) | High (12) | | |
| 402 | +------------------------+------------------+---------------+-----------------+ |
| 403 | | ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | |
| 404 | +------------------------+----------------------------------------------------+ |
| 405 | |
| 406 | +------------------------+----------------------------------------------------+ |
| 407 | | ID | 07 | |
| 408 | +========================+====================================================+ |
| 409 | | ``Threat`` | **A malicious endpoint may attempt to extract data | |
| 410 | | | or state information by the use of invalid or | |
| 411 | | | incorrect input arguments.** | |
| 412 | | | Lack of input parameter validation or side effects | |
| 413 | | | of maliciously forged input parameters might affect| |
| 414 | | | the SPMC. | |
| 415 | +------------------------+----------------------------------------------------+ |
| 416 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 417 | +------------------------+----------------------------------------------------+ |
| 418 | | ``Affected TF-A | SPMD, SPMC | |
| 419 | | Components`` | | |
| 420 | +------------------------+----------------------------------------------------+ |
| 421 | | ``Assets`` | SP secrets, SPMC secrets, SP state, SPMC state | |
| 422 | +------------------------+----------------------------------------------------+ |
| 423 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 424 | +------------------------+----------------------------------------------------+ |
| 425 | | ``Threat Type`` | Information discolure | |
| 426 | +------------------------+------------------+---------------+-----------------+ |
| 427 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 428 | +------------------------+------------------+---------------+-----------------+ |
| 429 | | ``Impact`` | High (4) | High (4) | | |
| 430 | +------------------------+------------------+---------------+-----------------+ |
| 431 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 432 | +------------------------+------------------+---------------+-----------------+ |
| 433 | | ``Total Risk Rating`` | High (12) | High (12) | | |
| 434 | +------------------------+------------------+---------------+-----------------+ |
| 435 | | ``Mitigations`` | Secure Partitions must follow security standards | |
| 436 | | | and best practises as a way to mitigate the risk | |
| 437 | | | of common vulnerabilities to be exploited. | |
| 438 | | | The use of software (canaries) or hardware | |
| 439 | | | hardening techniques (XN, WXN, BTI, pointer | |
| 440 | | | authentication, MTE) helps detecting and stopping | |
| 441 | | | an exploitation early. | |
| 442 | | | The TF-A SPMC mitigates this threat by implementing| |
| 443 | | | stack protector, pointer authentication, BTI, XN, | |
| 444 | | | WXN, security hardening techniques. | |
| 445 | +------------------------+----------------------------------------------------+ |
| 446 | |
| 447 | +------------------------+----------------------------------------------------+ |
| 448 | | ID | 08 | |
| 449 | +========================+====================================================+ |
| 450 | | ``Threat`` | **A malicious endpoint may forge a direct message | |
| 451 | | | request such that it reveals the internal state of | |
| 452 | | | another endpoint through the direct message | |
| 453 | | | response.** | |
| 454 | | | The secure partition or SPMC replies to a partition| |
| 455 | | | message by a direct message response with | |
| 456 | | | information which may reveal its internal state | |
| 457 | | | (.e.g. partition message response outside of | |
| 458 | | | allowed bounds). | |
| 459 | +------------------------+----------------------------------------------------+ |
| 460 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 461 | +------------------------+----------------------------------------------------+ |
| 462 | | ``Affected TF-A | SPMC | |
| 463 | | Components`` | | |
| 464 | +------------------------+----------------------------------------------------+ |
| 465 | | ``Assets`` | SPMC or SP state | |
| 466 | +------------------------+----------------------------------------------------+ |
| 467 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 468 | +------------------------+----------------------------------------------------+ |
| 469 | | ``Threat Type`` | Information discolure | |
| 470 | +------------------------+------------------+---------------+-----------------+ |
| 471 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 472 | +------------------------+------------------+---------------+-----------------+ |
| 473 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 474 | +------------------------+------------------+---------------+-----------------+ |
| 475 | | ``Likelihood`` | Low (2) | Low (2) | | |
| 476 | +------------------------+------------------+---------------+-----------------+ |
| 477 | | ``Total Risk Rating`` | Medium (6) | Medium (6) | | |
| 478 | +------------------------+------------------+---------------+-----------------+ |
J-Alves | fce5680 | 2021-11-11 17:23:53 +0000 | [diff] [blame] | 479 | | ``Mitigations`` | For the specific case of direct requests targeting | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 480 | | | the SPMC, the latter is hardened to prevent | |
| 481 | | | its internal state or the state of an SP to be | |
| 482 | | | revealed through a direct message response. | |
Madhukar Pappireddy | ce246f6 | 2022-10-14 16:06:00 -0500 | [diff] [blame] | 483 | | | Further, SPMC performs numerous checks in runtime | |
| 484 | | | on the basis of the rules established by partition | |
| 485 | | | runtime models to stop any malicious attempts by | |
| 486 | | | an endpoint to extract internal state of another | |
| 487 | | | endpoint. | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 488 | +------------------------+----------------------------------------------------+ |
| 489 | |
| 490 | +------------------------+----------------------------------------------------+ |
| 491 | | ID | 09 | |
| 492 | +========================+====================================================+ |
| 493 | | ``Threat`` | **Probing the FF-A communication between | |
| 494 | | | endpoints.** | |
| 495 | | | SPMC and SPs are typically loaded to external | |
| 496 | | | memory (protected by a TrustZone memory | |
| 497 | | | controller). A malicious agent may use non invasive| |
| 498 | | | methods to probe the external memory bus and | |
| 499 | | | extract the traffic between an SP and the SPMC or | |
| 500 | | | among SPs when shared buffers are held in external | |
| 501 | | | memory. | |
| 502 | +------------------------+----------------------------------------------------+ |
| 503 | | ``Diagram Elements`` | DF7 | |
| 504 | +------------------------+----------------------------------------------------+ |
| 505 | | ``Affected TF-A | SPMC | |
| 506 | | Components`` | | |
| 507 | +------------------------+----------------------------------------------------+ |
| 508 | | ``Assets`` | SP/SPMC state, SP/SPMC secrets | |
| 509 | +------------------------+----------------------------------------------------+ |
| 510 | | ``Threat Agent`` | Hardware attack | |
| 511 | +------------------------+----------------------------------------------------+ |
| 512 | | ``Threat Type`` | Information disclosure | |
| 513 | +------------------------+------------------+-----------------+---------------+ |
| 514 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 515 | +------------------------+------------------+-----------------+---------------+ |
| 516 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 517 | +------------------------+------------------+-----------------+---------------+ |
| 518 | | ``Likelihood`` | Low (2) | Medium (3) | | |
| 519 | +------------------------+------------------+-----------------+---------------+ |
| 520 | | ``Total Risk Rating`` | Medium (6) | Medium (9) | | |
| 521 | +------------------------+------------------+-----------------+---------------+ |
| 522 | | ``Mitigations`` | It is expected the platform or chipset provides | |
| 523 | | | guarantees in protecting the DRAM contents. | |
| 524 | | | The TF-A SPMC does not mitigate this class of | |
| 525 | | | attack and this is left to the integrator. | |
| 526 | +------------------------+----------------------------------------------------+ |
| 527 | |
| 528 | +------------------------+----------------------------------------------------+ |
| 529 | | ID | 10 | |
| 530 | +========================+====================================================+ |
| 531 | | ``Threat`` | **A malicious agent may attempt revealing the SPMC | |
| 532 | | | state or secrets by the use of software-based cache| |
| 533 | | | side-channel attack techniques.** | |
| 534 | +------------------------+----------------------------------------------------+ |
| 535 | | ``Diagram Elements`` | DF7 | |
| 536 | +------------------------+----------------------------------------------------+ |
| 537 | | ``Affected TF-A | SPMC | |
| 538 | | Components`` | | |
| 539 | +------------------------+----------------------------------------------------+ |
| 540 | | ``Assets`` | SP or SPMC state | |
| 541 | +------------------------+----------------------------------------------------+ |
| 542 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 543 | +------------------------+----------------------------------------------------+ |
| 544 | | ``Threat Type`` | Information disclosure | |
| 545 | +------------------------+------------------+-----------------+---------------+ |
| 546 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 547 | +------------------------+------------------+-----------------+---------------+ |
| 548 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 549 | +------------------------+------------------+-----------------+---------------+ |
| 550 | | ``Likelihood`` | Low (2) | Low (2) | | |
| 551 | +------------------------+------------------+-----------------+---------------+ |
| 552 | | ``Total Risk Rating`` | Medium (6) | Medium (6) | | |
| 553 | +------------------------+------------------+-----------------+---------------+ |
| 554 | | ``Mitigations`` | From an integration perspective it is assumed | |
| 555 | | | platforms consuming the SPMC component at S-EL2 | |
| 556 | | | (hence implementing the Armv8.4 FEAT_SEL2 | |
| 557 | | | architecture extension) implement mitigations to | |
| 558 | | | Spectre, Meltdown or other cache timing | |
| 559 | | | side-channel type of attacks. | |
| 560 | | | The TF-A SPMC implements one mitigation (barrier | |
| 561 | | | preventing speculation past exeception returns). | |
| 562 | | | The SPMC may be hardened further with SW | |
| 563 | | | mitigations (e.g. speculation barriers) for the | |
| 564 | | | cases not covered in HW. Usage of hardened | |
| 565 | | | compilers and appropriate options, code inspection | |
| 566 | | | are recommended ways to mitigate Spectre types of | |
| 567 | | | attacks. For non-hardened cores, the usage of | |
| 568 | | | techniques such a kernel page table isolation can | |
| 569 | | | help mitigating Meltdown type of attacks. | |
| 570 | +------------------------+----------------------------------------------------+ |
| 571 | |
| 572 | +------------------------+----------------------------------------------------+ |
| 573 | | ID | 11 | |
| 574 | +========================+====================================================+ |
| 575 | | ``Threat`` | **A malicious endpoint may attempt flooding the | |
J-Alves | fce5680 | 2021-11-11 17:23:53 +0000 | [diff] [blame] | 576 | | | SPMC with requests targeting a service within an | |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 577 | | | endpoint such that it denies another endpoint to | |
| 578 | | | access this service.** | |
| 579 | | | Similarly, the malicious endpoint may target a | |
| 580 | | | a service within an endpoint such that the latter | |
| 581 | | | is unable to request services from another | |
| 582 | | | endpoint. | |
| 583 | +------------------------+----------------------------------------------------+ |
| 584 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 585 | +------------------------+----------------------------------------------------+ |
| 586 | | ``Affected TF-A | SPMC | |
| 587 | | Components`` | | |
| 588 | +------------------------+----------------------------------------------------+ |
| 589 | | ``Assets`` | SPMC state | |
| 590 | +------------------------+----------------------------------------------------+ |
| 591 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 592 | +------------------------+----------------------------------------------------+ |
| 593 | | ``Threat Type`` | Denial of service | |
| 594 | +------------------------+------------------+-----------------+---------------+ |
| 595 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 596 | +------------------------+------------------+-----------------+---------------+ |
| 597 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 598 | +------------------------+------------------+-----------------+---------------+ |
| 599 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 600 | +------------------------+------------------+-----------------+---------------+ |
| 601 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 602 | +------------------------+------------------+-----------------+---------------+ |
| 603 | | ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | |
| 604 | | | Bounding the time for operations to complete can | |
| 605 | | | be achieved by the usage of a trusted watchdog. | |
| 606 | | | Other quality of service monitoring can be achieved| |
| 607 | | | in the SPMC such as counting a number of operations| |
| 608 | | | in a limited timeframe. | |
| 609 | +------------------------+----------------------------------------------------+ |
| 610 | |
J-Alves | fce5680 | 2021-11-11 17:23:53 +0000 | [diff] [blame] | 611 | +------------------------+----------------------------------------------------+ |
| 612 | | ID | 12 | |
| 613 | +========================+====================================================+ |
| 614 | | ``Threat`` | **A malicious endpoint may attempt to allocate | |
| 615 | | | notifications bitmaps in the SPMC, through the | |
| 616 | | | FFA_NOTIFICATION_BITMAP_CREATE.** | |
| 617 | | | This might be an attempt to exhaust SPMC's memory, | |
| 618 | | | or to allocate a bitmap for a VM that was not | |
| 619 | | | intended to receive notifications from SPs. Thus | |
| 620 | | | creating the possibility for a channel that was not| |
| 621 | | | meant to exist. | |
| 622 | +------------------------+----------------------------------------------------+ |
| 623 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 624 | +------------------------+----------------------------------------------------+ |
| 625 | | ``Affected TF-A | SPMC | |
| 626 | | Components`` | | |
| 627 | +------------------------+----------------------------------------------------+ |
| 628 | | ``Assets`` | SPMC state | |
| 629 | +------------------------+----------------------------------------------------+ |
| 630 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 631 | +------------------------+----------------------------------------------------+ |
| 632 | | ``Threat Type`` | Denial of service, Spoofing | |
| 633 | +------------------------+------------------+-----------------+---------------+ |
| 634 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 635 | +------------------------+------------------+-----------------+---------------+ |
| 636 | | ``Impact`` | Medium(3) | Medium(3) | | |
| 637 | +------------------------+------------------+-----------------+---------------+ |
| 638 | | ``Likelihood`` | Medium(3) | Medium(3) | | |
| 639 | +------------------------+------------------+-----------------+---------------+ |
| 640 | | ``Total Risk Rating`` | Medium(9) | Medium(9) | | |
| 641 | +------------------------+------------------+-----------------+---------------+ |
| 642 | | ``Mitigations`` | The TF-A SPMC mitigates this threat by defining a | |
| 643 | | | a fixed size pool for bitmap allocation. | |
| 644 | | | It also limits the designated FF-A calls to be used| |
| 645 | | | from NWd endpoints. | |
| 646 | | | In the NWd the hypervisor is supposed to limit the | |
| 647 | | | access to the designated FF-A call. | |
| 648 | +------------------------+----------------------------------------------------+ |
| 649 | |
| 650 | +------------------------+----------------------------------------------------+ |
| 651 | | ID | 13 | |
| 652 | +========================+====================================================+ |
| 653 | | ``Threat`` | **A malicious endpoint may attempt to destroy the | |
| 654 | | | notifications bitmaps in the SPMC, through the | |
| 655 | | | FFA_NOTIFICATION_BITMAP_DESTROY.** | |
| 656 | | | This might be an attempt to tamper with the SPMC | |
| 657 | | | state such that a partition isn't able to receive | |
| 658 | | | notifications. | |
| 659 | +------------------------+----------------------------------------------------+ |
| 660 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 661 | +------------------------+----------------------------------------------------+ |
| 662 | | ``Affected TF-A | SPMC | |
| 663 | | Components`` | | |
| 664 | +------------------------+----------------------------------------------------+ |
| 665 | | ``Assets`` | SPMC state | |
| 666 | +------------------------+----------------------------------------------------+ |
| 667 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 668 | +------------------------+----------------------------------------------------+ |
| 669 | | ``Threat Type`` | Tampering | |
| 670 | +------------------------+------------------+-----------------+---------------+ |
| 671 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 672 | +------------------------+------------------+-----------------+---------------+ |
| 673 | | ``Impact`` | Low(2) | Low(2) | | |
| 674 | +------------------------+------------------+-----------------+---------------+ |
| 675 | | ``Likelihood`` | Low(2) | Low(2) | | |
| 676 | +------------------------+------------------+-----------------+---------------+ |
| 677 | | ``Total Risk Rating`` | Low(4) | Low(4) | | |
| 678 | +------------------------+------------------+-----------------+---------------+ |
| 679 | | ``Mitigations`` | The TF-A SPMC mitigates this issue by limiting the | |
| 680 | | | designated FF-A call to be issued by the NWd. | |
| 681 | | | Also, the notifications bitmap can't be destroyed | |
| 682 | | | if there are pending notifications. | |
| 683 | | | In the NWd, the hypervisor must restrict the | |
| 684 | | | NS-endpoints that can issue the designated call. | |
| 685 | +------------------------+----------------------------------------------------+ |
| 686 | |
| 687 | +------------------------+----------------------------------------------------+ |
| 688 | | ID | 14 | |
| 689 | +========================+====================================================+ |
| 690 | | ``Threat`` | **A malicious endpoint might attempt to give | |
| 691 | | | permissions to an unintended sender to set | |
| 692 | | | notifications targeting another receiver using the | |
| 693 | | | FF-A call FFA_NOTIFICATION_BIND.** | |
| 694 | | | This might be an attempt to tamper with the SPMC | |
| 695 | | | state such that an unintended, and possibly | |
| 696 | | | malicious, communication channel is established. | |
| 697 | +------------------------+----------------------------------------------------+ |
| 698 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 699 | +------------------------+----------------------------------------------------+ |
| 700 | | ``Affected TF-A | SPMC | |
| 701 | | Components`` | | |
| 702 | +------------------------+----------------------------------------------------+ |
| 703 | | ``Assets`` | SPMC state | |
| 704 | +------------------------+----------------------------------------------------+ |
| 705 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 706 | +------------------------+----------------------------------------------------+ |
| 707 | | ``Threat Type`` | Tampering, Spoofing | |
| 708 | +------------------------+------------------+-----------------+---------------+ |
| 709 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 710 | +------------------------+------------------+-----------------+---------------+ |
| 711 | | ``Impact`` | Low(2) | Low(2) | | |
| 712 | +------------------------+------------------+-----------------+---------------+ |
| 713 | | ``Likelihood`` | Medium(3) | Medium(3) | | |
| 714 | +------------------------+------------------+-----------------+---------------+ |
| 715 | | ``Total Risk Rating`` | Medium(6) | Medium(6) | | |
| 716 | +------------------------+------------------+-----------------+---------------+ |
| 717 | | ``Mitigations`` | The TF-A SPMC mitigates this by restricting | |
| 718 | | | designated FFA_NOTIFICATION_BIND call to be issued | |
| 719 | | | by the receiver only. The receiver is responsible | |
| 720 | | | for allocating the notifications IDs to one | |
| 721 | | | specific partition. | |
| 722 | | | Also, receivers that are not meant to receive | |
| 723 | | | notifications, must have notifications receipt | |
| 724 | | | disabled in the respective partition's manifest. | |
| 725 | | | As for calls coming from NWd, if the NWd VM has had| |
| 726 | | | its bitmap allocated at initialization, the TF-A | |
| 727 | | | SPMC can't guarantee this threat won't happen. | |
| 728 | | | The Hypervisor must mitigate in the NWd, similarly | |
| 729 | | | to SPMC for calls in SWd. Though, if the Hypervisor| |
| 730 | | | has been compromised, the SPMC won't be able to | |
| 731 | | | mitigate it for calls forwarded from NWd. | |
| 732 | +------------------------+----------------------------------------------------+ |
| 733 | |
| 734 | +------------------------+----------------------------------------------------+ |
| 735 | | ID | 15 | |
| 736 | +========================+====================================================+ |
| 737 | | ``Threat`` | **A malicious partition endpoint might attempt to | |
| 738 | | | set notifications that are not bound to it.** | |
| 739 | +------------------------+----------------------------------------------------+ |
| 740 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 741 | +------------------------+----------------------------------------------------+ |
| 742 | | ``Affected TF-A | SPMC | |
| 743 | | Components`` | | |
| 744 | +------------------------+----------------------------------------------------+ |
| 745 | | ``Assets`` | SPMC state | |
| 746 | +------------------------+----------------------------------------------------+ |
| 747 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 748 | +------------------------+----------------------------------------------------+ |
| 749 | | ``Threat Type`` | Spoofing | |
| 750 | +------------------------+------------------+-----------------+---------------+ |
| 751 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 752 | +------------------------+------------------+-----------------+---------------+ |
| 753 | | ``Impact`` | Low(2) | Low(2) | | |
| 754 | +------------------------+------------------+-----------------+---------------+ |
| 755 | | ``Likelihood`` | Low(2) | Low(2) | | |
| 756 | +------------------------+------------------+-----------------+---------------+ |
| 757 | | ``Total Risk Rating`` | Low(4) | Low(4) | | |
| 758 | +------------------------+------------------+-----------------+---------------+ |
| 759 | | ``Mitigations`` | The TF-A SPMC mitigates this by checking the | |
| 760 | | | sender's ID provided in the input to the call | |
| 761 | | | FFA_NOTIFICATION_SET. The SPMC keeps track of which| |
| 762 | | | notifications are bound to which sender, for a | |
| 763 | | | given receiver. If the sender is an SP, the | |
| 764 | | | provided sender ID must match the ID of the | |
| 765 | | | currently running partition. | |
| 766 | +------------------------+----------------------------------------------------+ |
| 767 | |
| 768 | +------------------------+----------------------------------------------------+ |
| 769 | | ID | 16 | |
| 770 | +========================+====================================================+ |
| 771 | | ``Threat`` | **A malicious partition endpoint might attempt to | |
| 772 | | | get notifications that are not targeted to it.** | |
| 773 | +------------------------+----------------------------------------------------+ |
| 774 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 775 | +------------------------+----------------------------------------------------+ |
| 776 | | ``Affected TF-A | SPMC | |
| 777 | | Components`` | | |
| 778 | +------------------------+----------------------------------------------------+ |
| 779 | | ``Assets`` | SPMC state | |
| 780 | +------------------------+----------------------------------------------------+ |
| 781 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 782 | +------------------------+----------------------------------------------------+ |
| 783 | | ``Threat Type`` | Spoofing | |
| 784 | +------------------------+------------------+-----------------+---------------+ |
| 785 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 786 | +------------------------+------------------+-----------------+---------------+ |
| 787 | | ``Impact`` | Informational(1) | Informational(1)| | |
| 788 | +------------------------+------------------+-----------------+---------------+ |
| 789 | | ``Likelihood`` | Low(2) | Low(2) | | |
| 790 | +------------------------+------------------+-----------------+---------------+ |
| 791 | | ``Total Risk Rating`` | Low(2) | Low(2) | | |
| 792 | +------------------------+------------------+-----------------+---------------+ |
| 793 | | ``Mitigations`` | The TF-A SPMC mitigates this by checking the | |
| 794 | | | receiver's ID provided in the input to the call | |
| 795 | | | FFA_NOTIFICATION_GET. The SPMC keeps track of which| |
| 796 | | | notifications are pending for each receiver. | |
| 797 | | | The provided receiver ID must match the ID of the | |
| 798 | | | currently running partition, if it is an SP. | |
| 799 | | | For calls forwarded from NWd, the SPMC will return | |
| 800 | | | the pending notifications if the receiver had its | |
| 801 | | | bitmap created, and has pending notifications. | |
| 802 | | | If Hypervisor or OS kernel are compromised, the | |
| 803 | | | SPMC won't be able to mitigate calls from rogue NWd| |
| 804 | | | endpoints. | |
| 805 | +------------------------+----------------------------------------------------+ |
| 806 | |
| 807 | +------------------------+----------------------------------------------------+ |
| 808 | | ID | 17 | |
| 809 | +========================+====================================================+ |
| 810 | | ``Threat`` | **A malicious partition endpoint might attempt to | |
| 811 | | | get the information about pending notifications, | |
| 812 | | | through the FFA_NOTIFICATION_INFO_GET call.** | |
| 813 | | | This call is meant to be used by the NWd FF-A | |
| 814 | | | driver. | |
| 815 | +------------------------+----------------------------------------------------+ |
| 816 | | ``Diagram Elements`` | DF1, DF2, DF3 | |
| 817 | +------------------------+----------------------------------------------------+ |
| 818 | | ``Affected TF-A | SPMC | |
| 819 | | Components`` | | |
| 820 | +------------------------+----------------------------------------------------+ |
| 821 | | ``Assets`` | SPMC state | |
| 822 | +------------------------+----------------------------------------------------+ |
| 823 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 824 | +------------------------+----------------------------------------------------+ |
| 825 | | ``Threat Type`` | Information disclosure | |
| 826 | +------------------------+------------------+-----------------+---------------+ |
| 827 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 828 | +------------------------+------------------+-----------------+---------------+ |
| 829 | | ``Impact`` | Low(2) | Low(2) | | |
| 830 | +------------------------+------------------+-----------------+---------------+ |
| 831 | | ``Likelihood`` | Medium(3) | Medium(3) | | |
| 832 | +------------------------+------------------+-----------------+---------------+ |
| 833 | | ``Total Risk Rating`` | Medium(6) | Medium(6) | | |
| 834 | +------------------------+------------------+-----------------+---------------+ |
| 835 | | ``Mitigations`` | The TF-A SPMC mitigates this by returning error to | |
| 836 | | | calls made by SPs to FFA_NOTIFICATION_INFO_GET. | |
| 837 | | | If Hypervisor or OS kernel are compromised, the | |
| 838 | | | SPMC won't be able mitigate calls from rogue NWd | |
| 839 | | | endpoints. | |
| 840 | +------------------------+----------------------------------------------------+ |
| 841 | |
| 842 | +------------------------+----------------------------------------------------+ |
| 843 | | ID | 18 | |
| 844 | +========================+====================================================+ |
| 845 | | ``Threat`` | **A malicious partition endpoint might attempt to | |
| 846 | | | flood another partition endpoint with notifications| |
| 847 | | | hindering its operation.** | |
| 848 | | | The intent of the malicious endpoint could be to | |
| 849 | | | interfere with both the receiver's and/or primary | |
| 850 | | | endpoint execution, as they can both be preempted | |
| 851 | | | by the NPI and SRI, respectively. | |
| 852 | +------------------------+----------------------------------------------------+ |
| 853 | | ``Diagram Elements`` | DF1, DF2, DF3, DF4 | |
| 854 | +------------------------+----------------------------------------------------+ |
| 855 | | ``Affected TF-A | SPMC | |
| 856 | | Components`` | | |
| 857 | +------------------------+----------------------------------------------------+ |
| 858 | | ``Assets`` | SPMC state, SP state, CPU cycles | |
| 859 | +------------------------+----------------------------------------------------+ |
| 860 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 861 | +------------------------+----------------------------------------------------+ |
| 862 | | ``Threat Type`` | DoS | |
| 863 | +------------------------+------------------+-----------------+---------------+ |
| 864 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 865 | +------------------------+------------------+-----------------+---------------+ |
| 866 | | ``Impact`` | Low(2) | Low(2) | | |
| 867 | +------------------------+------------------+-----------------+---------------+ |
| 868 | | ``Likelihood`` | Medium(3) | Medium(3) | | |
| 869 | +------------------------+------------------+-----------------+---------------+ |
| 870 | | ``Total Risk Rating`` | Medium(6) | Medium(6) | | |
| 871 | +------------------------+------------------+-----------------+---------------+ |
| 872 | | ``Mitigations`` | The TF-A SPMC does not mitigate this threat. | |
| 873 | | | However, the impact is limited due to the | |
| 874 | | | architecture: | |
| 875 | | | - Notifications are not queued, one that has been | |
| 876 | | | signaled needs to be retrieved by the receiver, | |
| 877 | | | until it can be sent again. | |
| 878 | | | - Both SRI and NPI can't be pended until handled | |
| 879 | | | which limits the amount of spurious interrupts. | |
| 880 | | | - A given receiver could only bind a maximum number| |
| 881 | | | of notifications to a given sender, within a given | |
| 882 | | | execution context. | |
| 883 | +------------------------+----------------------------------------------------+ |
| 884 | |
Madhukar Pappireddy | ce246f6 | 2022-10-14 16:06:00 -0500 | [diff] [blame] | 885 | +------------------------+----------------------------------------------------+ |
| 886 | | ID | 19 | |
| 887 | +========================+====================================================+ |
| 888 | | ``Threat`` | **A malicious endpoint may abuse FFA_RUN call to | |
| 889 | | | resume or turn on other endpoint execution | |
| 890 | | | contexts, attempting to alter the internal state of| |
| 891 | | | SPMC and SPs, potentially leading to illegal state | |
| 892 | | | transitions and deadlocks.** | |
| 893 | | | An endpoint can call into another endpoint | |
| 894 | | | execution context using FFA_MSG_SEND_DIRECT_REQ | |
| 895 | | | ABI to create a call chain. A malicious endpoint | |
| 896 | | | could abuse this to form loops in a call chain that| |
| 897 | | | could lead to potential deadlocks. | |
| 898 | +------------------------+----------------------------------------------------+ |
| 899 | | ``Diagram Elements`` | DF1, DF2, DF4 | |
| 900 | +------------------------+----------------------------------------------------+ |
| 901 | | ``Affected TF-A | SPMC, SPMD | |
| 902 | | Components`` | | |
| 903 | +------------------------+----------------------------------------------------+ |
| 904 | | ``Assets`` | SPMC state, SP state, Scheduling cycles | |
| 905 | +------------------------+----------------------------------------------------+ |
| 906 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 907 | +------------------------+----------------------------------------------------+ |
| 908 | | ``Threat Type`` | Tampering, Denial of Service | |
| 909 | +------------------------+------------------+-----------------+---------------+ |
| 910 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 911 | +------------------------+------------------+-----------------+---------------+ |
| 912 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 913 | +------------------------+------------------+-----------------+---------------+ |
| 914 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 915 | +------------------------+------------------+-----------------+---------------+ |
| 916 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 917 | +------------------------+------------------+-----------------+---------------+ |
| 918 | | ``Mitigations`` | The TF-A SPMC provides mitigation against such | |
| 919 | | | threats by following the guidance for partition | |
| 920 | | | runtime models as described in FF-A v1.1 EAC0 spec.| |
| 921 | | | The SPMC performs numerous checks in runtime to | |
| 922 | | | prevent illegal state transitions by adhering to | |
| 923 | | | the partition runtime model. Further, if the | |
| 924 | | | receiver endpoint is a predecessor of current | |
| 925 | | | endpoint in the present call chain, the SPMC denies| |
| 926 | | | any attempts to form loops by returning FFA_DENIED | |
| 927 | | | error code. Only the primary scheduler is allowed | |
| 928 | | | to turn on execution contexts of other partitions | |
| 929 | | | though SPMC does not have the ability to | |
| 930 | | | scrutinize its identity. Secure partitions have | |
| 931 | | | limited ability to resume execution contexts of | |
| 932 | | | other partitions based on the runtime model. Such | |
| 933 | | | attempts cannot compromise the integrity of the | |
| 934 | | | SPMC. | |
| 935 | +------------------------+----------------------------------------------------+ |
| 936 | |
| 937 | +------------------------+----------------------------------------------------+ |
| 938 | | ID | 20 | |
| 939 | +========================+====================================================+ |
| 940 | | ``Threat`` | **A malicious endpoint can perform a | |
| 941 | | | denial-of-service attack by using FFA_INTERRUPT | |
| 942 | | | call that could attempt to cause the system to | |
| 943 | | | crash or enter into an unknown state as no physical| |
| 944 | | | interrupt could be pending for it to be handled in | |
| 945 | | | the SPMC.** | |
| 946 | +------------------------+----------------------------------------------------+ |
| 947 | | ``Diagram Elements`` | DF1, DF2, DF5 | |
| 948 | +------------------------+----------------------------------------------------+ |
| 949 | | ``Affected TF-A | SPMC, SPMD | |
| 950 | | Components`` | | |
| 951 | +------------------------+----------------------------------------------------+ |
| 952 | | ``Assets`` | SPMC state, SP state, Scheduling cycles | |
| 953 | +------------------------+----------------------------------------------------+ |
| 954 | | ``Threat Agent`` | NS-Endpoint, S-Endpoint | |
| 955 | +------------------------+----------------------------------------------------+ |
| 956 | | ``Threat Type`` | Tampering, Denial of Service | |
| 957 | +------------------------+------------------+-----------------+---------------+ |
| 958 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 959 | +------------------------+------------------+-----------------+---------------+ |
| 960 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 961 | +------------------------+------------------+-----------------+---------------+ |
| 962 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 963 | +------------------------+------------------+-----------------+---------------+ |
| 964 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 965 | +------------------------+------------------+-----------------+---------------+ |
| 966 | | ``Mitigations`` | The TF-A SPMC provides mitigation against such | |
| 967 | | | attack by detecting invocations from partitions | |
| 968 | | | and simply returning FFA_ERROR status interface. | |
| 969 | | | SPMC only allows SPMD to use FFA_INTERRUPT ABI to | |
| 970 | | | communicate a pending secure interrupt triggered | |
| 971 | | | while execution was in normal world. | |
| 972 | +------------------------+----------------------------------------------------+ |
| 973 | |
| 974 | +------------------------+----------------------------------------------------+ |
| 975 | | ID | 21 | |
| 976 | +========================+====================================================+ |
| 977 | | ``Threat`` | **A malicious secure endpoint might deactivate a | |
| 978 | | | (virtual) secure interrupt that was not originally | |
| 979 | | | signaled by SPMC, thereby attempting to alter the | |
| 980 | | | state of the SPMC and potentially lead to system | |
| 981 | | | crash.** | |
| 982 | | | SPMC maps the virtual interrupt ids to the physical| |
| 983 | | | interrupt ids to keep the implementation of virtual| |
| 984 | | | interrupt driver simple. | |
| 985 | | | Similarly, a malicious secure endpoint might invoke| |
| 986 | | | the deactivation ABI more than once for a secure | |
| 987 | | | interrupt. Moreover, a malicious secure endpoint | |
| 988 | | | might attempt to deactivate a (virtual) secure | |
| 989 | | | interrupt that was signaled to another endpoint | |
| 990 | | | execution context by the SPMC even before secure | |
| 991 | | | interrupt was handled. | |
| 992 | +------------------------+----------------------------------------------------+ |
| 993 | | ``Diagram Elements`` | DF1, DF5 | |
| 994 | +------------------------+----------------------------------------------------+ |
| 995 | | ``Affected TF-A | SPMC | |
| 996 | | Components`` | | |
| 997 | +------------------------+----------------------------------------------------+ |
| 998 | | ``Assets`` | SPMC state, SP state | |
| 999 | +------------------------+----------------------------------------------------+ |
| 1000 | | ``Threat Agent`` | S-Endpoint | |
| 1001 | +------------------------+----------------------------------------------------+ |
| 1002 | | ``Threat Type`` | Tampering | |
| 1003 | +------------------------+------------------+-----------------+---------------+ |
| 1004 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 1005 | +------------------------+------------------+-----------------+---------------+ |
| 1006 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 1007 | +------------------------+------------------+-----------------+---------------+ |
| 1008 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 1009 | +------------------------+------------------+-----------------+---------------+ |
| 1010 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 1011 | +------------------------+------------------+-----------------+---------------+ |
| 1012 | | ``Mitigations`` | At initialization, the TF-A SPMC parses the | |
| 1013 | | | partition manifests to find the target execution | |
| 1014 | | | context responsible for handling the various | |
| 1015 | | | secure physical interrupts. The TF-A SPMC provides | |
| 1016 | | | mitigation against above mentioned threats by: | |
| 1017 | | | | |
| 1018 | | | - Keeping track of each pending virtual interrupt | |
| 1019 | | | signaled to an execution context of a secure | |
| 1020 | | | secure partition. | |
| 1021 | | | - Denying any deactivation call from SP if there is| |
| 1022 | | | no pending physical interrupt mapped to the | |
| 1023 | | | given virtual interrupt. | |
| 1024 | | | - Denying any deactivation call from SP if the | |
| 1025 | | | virtual interrupt has not been signaled to the | |
| 1026 | | | current execution context. | |
| 1027 | +------------------------+----------------------------------------------------+ |
| 1028 | |
| 1029 | +------------------------+----------------------------------------------------+ |
| 1030 | | ID | 22 | |
| 1031 | +========================+====================================================+ |
| 1032 | | ``Threat`` | **A malicious secure endpoint might not deactivate | |
| 1033 | | | a virtual interrupt signaled to it by the SPMC but | |
| 1034 | | | perform secure interrupt signal completion. This | |
| 1035 | | | attempt to corrupt the internal state of the SPMC | |
| 1036 | | | could lead to an unknown state and further lead to | |
| 1037 | | | system crash.** | |
| 1038 | | | Similarly, a malicious secure endpoint could | |
| 1039 | | | deliberately not perform either interrupt | |
| 1040 | | | deactivation or interrupt completion signal. Since,| |
| 1041 | | | the SPMC can only process one secure interrupt at a| |
| 1042 | | | time, this could choke the system where all | |
| 1043 | | | interrupts are indefinitely masked which could | |
| 1044 | | | potentially lead to system crash or reboot. | |
| 1045 | +------------------------+----------------------------------------------------+ |
| 1046 | | ``Diagram Elements`` | DF1, DF5 | |
| 1047 | +------------------------+----------------------------------------------------+ |
| 1048 | | ``Affected TF-A | SPMC | |
| 1049 | | Components`` | | |
| 1050 | +------------------------+----------------------------------------------------+ |
| 1051 | | ``Assets`` | SPMC state, SP state, Scheduling cycles | |
| 1052 | +------------------------+----------------------------------------------------+ |
| 1053 | | ``Threat Agent`` | S-Endpoint | |
| 1054 | +------------------------+----------------------------------------------------+ |
| 1055 | | ``Threat Type`` | Tampering, Denial of Service | |
| 1056 | +------------------------+------------------+-----------------+---------------+ |
| 1057 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 1058 | +------------------------+------------------+-----------------+---------------+ |
| 1059 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 1060 | +------------------------+------------------+-----------------+---------------+ |
| 1061 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 1062 | +------------------------+------------------+-----------------+---------------+ |
| 1063 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 1064 | +------------------------+------------------+-----------------+---------------+ |
| 1065 | | ``Mitigations`` | The TF-A SPMC does not provide mitigation against | |
| 1066 | | | such threat. This is a limitation of the current | |
| 1067 | | | SPMC implementation and needs to be handled in the | |
| 1068 | | | future releases. | |
| 1069 | +------------------------+----------------------------------------------------+ |
| 1070 | |
| 1071 | +------------------------+----------------------------------------------------+ |
| 1072 | | ID | 23 | |
| 1073 | +========================+====================================================+ |
| 1074 | | ``Threat`` | **A malicious endpoint could leverage non-secure | |
| 1075 | | | interrupts to preempt a secure endpoint, thereby | |
| 1076 | | | attempting to render it unable to handle a secure | |
| 1077 | | | virtual interrupt targetted for it. This could lead| |
| 1078 | | | to priority inversion as secure virtual interrupts | |
| 1079 | | | are kept pending while non-secure interrupts are | |
| 1080 | | | handled by normal world VMs.** | |
| 1081 | +------------------------+----------------------------------------------------+ |
| 1082 | | ``Diagram Elements`` | DF1, DF2, DF3, DF5 | |
| 1083 | +------------------------+----------------------------------------------------+ |
| 1084 | | ``Affected TF-A | SPMC, SPMD | |
| 1085 | | Components`` | | |
| 1086 | +------------------------+----------------------------------------------------+ |
| 1087 | | ``Assets`` | SPMC state, SP state, Scheduling cycles | |
| 1088 | +------------------------+----------------------------------------------------+ |
| 1089 | | ``Threat Agent`` | NS-Endpoint | |
| 1090 | +------------------------+----------------------------------------------------+ |
| 1091 | | ``Threat Type`` | Denial of Service | |
| 1092 | +------------------------+------------------+-----------------+---------------+ |
| 1093 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 1094 | +------------------------+------------------+-----------------+---------------+ |
| 1095 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 1096 | +------------------------+------------------+-----------------+---------------+ |
| 1097 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 1098 | +------------------------+------------------+-----------------+---------------+ |
| 1099 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 1100 | +------------------------+------------------+-----------------+---------------+ |
| 1101 | | ``Mitigations`` | The TF-A SPMC alone does not provide mitigation | |
| 1102 | | | against such threats. System integrators must take | |
| 1103 | | | necessary high level design decisions that takes | |
| 1104 | | | care of interrupt prioritization. The SPMC performs| |
| 1105 | | | its role of enabling SPs to specify appropriate | |
| 1106 | | | action towards non-secure interrupt with the help | |
| 1107 | | | of partition manifest based on the guidance in the | |
| 1108 | | | FF-A v1.1 EAC0 specification. | |
| 1109 | +------------------------+----------------------------------------------------+ |
| 1110 | |
| 1111 | +------------------------+----------------------------------------------------+ |
| 1112 | | ID | 24 | |
| 1113 | +========================+====================================================+ |
| 1114 | | ``Threat`` | **A secure endpoint depends on primary scheduler | |
| 1115 | | | for CPU cycles. A malicious endpoint could delay | |
| 1116 | | | the secure endpoint from being scheduled. Secure | |
| 1117 | | | interrupts, if not handled timely, could compromise| |
| 1118 | | | the state of SP and SPMC, thereby rendering the | |
| 1119 | | | system unresponsive.** | |
| 1120 | +------------------------+----------------------------------------------------+ |
| 1121 | | ``Diagram Elements`` | DF1, DF2, DF3, DF5 | |
| 1122 | +------------------------+----------------------------------------------------+ |
| 1123 | | ``Affected TF-A | SPMC, SPMD | |
| 1124 | | Components`` | | |
| 1125 | +------------------------+----------------------------------------------------+ |
| 1126 | | ``Assets`` | SPMC state, SP state, Scheduling cycles | |
| 1127 | +------------------------+----------------------------------------------------+ |
| 1128 | | ``Threat Agent`` | NS-Endpoint | |
| 1129 | +------------------------+----------------------------------------------------+ |
| 1130 | | ``Threat Type`` | Denial of Service | |
| 1131 | +------------------------+------------------+-----------------+---------------+ |
| 1132 | | ``Application`` | ``Server`` | ``Mobile`` | | |
| 1133 | +------------------------+------------------+-----------------+---------------+ |
| 1134 | | ``Impact`` | Medium (3) | Medium (3) | | |
| 1135 | +------------------------+------------------+-----------------+---------------+ |
| 1136 | | ``Likelihood`` | Medium (3) | Medium (3) | | |
| 1137 | +------------------------+------------------+-----------------+---------------+ |
| 1138 | | ``Total Risk Rating`` | Medium (9) | Medium (9) | | |
| 1139 | +------------------------+------------------+-----------------+---------------+ |
| 1140 | | ``Mitigations`` | The TF-A SPMC does not provide full mitigation | |
| 1141 | | | against such threats. However, based on the | |
| 1142 | | | guidance provided in the FF-A v1.1 EAC0 spec, SPMC | |
| 1143 | | | provisions CPU cycles to run a secure endpoint | |
| 1144 | | | execution context in SPMC schedule mode which | |
| 1145 | | | cannot be preempted by a non-secure interrupt. | |
| 1146 | | | This reduces the dependency on primary scheduler | |
| 1147 | | | for cycle allocation. Moreover, all further | |
| 1148 | | | interrupts are masked until pending secure virtual | |
| 1149 | | | interrupt on current CPU is handled. This allows SP| |
| 1150 | | | execution context to make progress even upon being | |
| 1151 | | | interrupted. | |
| 1152 | +------------------------+----------------------------------------------------+ |
| 1153 | |
| 1154 | -------------- |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 1155 | |
Madhukar Pappireddy | ce246f6 | 2022-10-14 16:06:00 -0500 | [diff] [blame] | 1156 | *Copyright (c) 2021-2022, Arm Limited. All rights reserved.* |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 1157 | |
Olivier Deprez | 2b0be75 | 2021-09-01 10:25:21 +0200 | [diff] [blame] | 1158 | .. _Arm Firmware Framework for Arm A-profile: https://developer.arm.com/docs/den0077/latest |
Olivier Deprez | 86d1ffd | 2021-06-01 15:37:16 +0200 | [diff] [blame] | 1159 | .. _Secure Partition Manager: ../components/secure-partition-manager.html |
| 1160 | .. _Generic TF-A threat model: ./threat_model.html#threat-analysis |
| 1161 | .. _FF-A ACS: https://github.com/ARM-software/ff-a-acs/releases |