Shruti Gupta | 795af71 | 2022-09-27 14:21:13 +0100 | [diff] [blame] | 1 | EL3 SPMC Threat Model |
| 2 | ********************* |
| 3 | |
| 4 | ************ |
| 5 | Introduction |
| 6 | ************ |
| 7 | This document provides a threat model for the TF-A `EL3 Secure Partition Manager`_ |
| 8 | (EL3 SPM) implementation. The EL3 SPM implementation is based on the |
| 9 | `Arm Firmware Framework for Arm A-profile`_ specification. |
| 10 | |
| 11 | ******************** |
| 12 | Target of Evaluation |
| 13 | ******************** |
| 14 | In this threat model, the target of evaluation is the ``Secure Partition Manager Core`` |
| 15 | component (SPMC) within the EL3 firmware. |
| 16 | The monitor and SPMD at EL3 are covered by the `Generic TF-A threat model`_. |
| 17 | |
| 18 | The scope for this threat model is: |
| 19 | |
| 20 | - The TF-A implementation for the EL3 SPMC |
| 21 | - The implementation complies with the FF-A v1.1 specification. |
| 22 | - Secure partition is statically provisioned at boot time. |
| 23 | - Focus on the run-time part of the life-cycle (no specific emphasis on boot |
| 24 | time, factory firmware provisioning, firmware udpate etc.) |
| 25 | - Not covering advanced or invasive physical attacks such as decapsulation, |
| 26 | FIB etc. |
| 27 | |
| 28 | Data Flow Diagram |
| 29 | ================= |
| 30 | Figure 1 shows a high-level data flow diagram for the SPM split into an SPMD |
| 31 | and SPMC component at EL3. The SPMD mostly acts as a relayer/pass-through between |
| 32 | the normal world and the secure world. It is assumed to expose small attack surface. |
| 33 | |
| 34 | A description of each diagram element is given in Table 1. In the diagram, the |
| 35 | red broken lines indicate trust boundaries. |
| 36 | |
| 37 | Components outside of the broken lines are considered untrusted. |
| 38 | |
| 39 | .. uml:: ../resources/diagrams/plantuml/el3_spm_dfd.puml |
| 40 | :caption: Figure 1: EL3 SPMC Data Flow Diagram |
| 41 | |
| 42 | .. table:: Table 1: EL3 SPMC Data Flow Diagram Description |
| 43 | |
| 44 | +---------------------+--------------------------------------------------------+ |
| 45 | | Diagram Element | Description | |
| 46 | +=====================+========================================================+ |
| 47 | | DF1 | SP to SPMC communication. FF-A function invocation or | |
| 48 | | | implementation-defined Hypervisor call. | |
| 49 | | | | |
| 50 | | | Note:- To communicate with LSP, SP1 performs a direct | |
| 51 | | | message request to SPMC targeting LSP as destination. | |
| 52 | +---------------------+--------------------------------------------------------+ |
| 53 | | DF2 | SPMC to SPMD communication. | |
| 54 | +---------------------+--------------------------------------------------------+ |
| 55 | | DF3 | SPMD to NS forwarding. | |
| 56 | +---------------------+--------------------------------------------------------+ |
| 57 | | DF4 | SPMC to LSP communication. | |
| 58 | | | NWd to LSP communication happens through SPMC. | |
| 59 | | | LSP can send direct response SP1 or NWd through SPMC. | |
| 60 | +---------------------+--------------------------------------------------------+ |
| 61 | | DF5 | HW control. | |
| 62 | +---------------------+--------------------------------------------------------+ |
| 63 | | DF6 | Bootloader image loading. | |
| 64 | +---------------------+--------------------------------------------------------+ |
| 65 | | DF7 | External memory access. | |
| 66 | +---------------------+--------------------------------------------------------+ |
| 67 | |
| 68 | |
| 69 | *************** |
| 70 | Threat Analysis |
| 71 | *************** |
| 72 | |
| 73 | This threat model follows a similar methodology to the `Generic TF-A threat model`_. |
| 74 | The following sections define: |
| 75 | |
| 76 | - Trust boundaries |
| 77 | - Assets |
| 78 | - Theat agents |
| 79 | - Threat types |
| 80 | |
| 81 | Trust boundaries |
| 82 | ================ |
| 83 | |
| 84 | - Normal world is untrusted. |
| 85 | - Secure world and normal world are separate trust boundaries. |
| 86 | - EL3 monitor, SPMD and SPMC are trusted. |
| 87 | - Bootloaders (in particular BL1/BL2 if using TF-A) and run-time BL31 are |
| 88 | implicitely trusted by the usage of trusted boot. |
| 89 | - EL3 monitor, SPMD, SPMC do not trust SPs. |
| 90 | |
| 91 | Assets |
| 92 | ====== |
| 93 | |
| 94 | The following assets are identified: |
| 95 | |
| 96 | - SPMC state. |
| 97 | - SP state. |
| 98 | - Information exchange between endpoints (partition messages). |
| 99 | - SPMC secrets (e.g. pointer authentication key when enabled) |
| 100 | - SP secrets (e.g. application keys). |
| 101 | - Scheduling cycles. |
| 102 | - Shared memory. |
| 103 | |
| 104 | Threat Agents |
| 105 | ============= |
| 106 | |
| 107 | The following threat agents are identified: |
| 108 | |
| 109 | - Non-secure endpoint (referred NS-Endpoint later): normal world client at |
| 110 | NS-EL2 (Hypervisor) or NS-EL1 (VM or OS kernel). |
| 111 | - Secure endpoint (referred as S-Endpoint later): typically a secure partition. |
| 112 | - Hardware attacks (non-invasive) requiring a physical access to the device, |
| 113 | such as bus probing or DRAM stress. |
| 114 | |
| 115 | Threat types |
| 116 | ============ |
| 117 | |
| 118 | The following threat categories as exposed in the `Generic TF-A threat model`_ |
| 119 | are re-used: |
| 120 | |
| 121 | - Spoofing |
| 122 | - Tampering |
| 123 | - Repudiation |
| 124 | - Information disclosure |
| 125 | - Denial of service |
| 126 | - Elevation of privileges |
| 127 | |
| 128 | Similarly this threat model re-uses the same threat risk ratings. The risk |
| 129 | analysis is evaluated based on the environment being ``Server`` or ``Mobile``. |
| 130 | IOT is not evaluated as the EL3 SPMC is primarily meant for use in Client. |
| 131 | |
| 132 | Threat Assessment |
| 133 | ================= |
| 134 | |
| 135 | The following threats are identified by applying STRIDE analysis on each diagram |
| 136 | element of the data flow diagram. |
| 137 | |
| 138 | +------------------------+----------------------------------------------------+ |
| 139 | | ID | 01 | |
| 140 | +========================+====================================================+ |
| 141 | | Threat | **An endpoint impersonates the sender | |
| 142 | | | FF-A ID in a direct request/response invocation.** | |
| 143 | +------------------------+----------------------------------------------------+ |
| 144 | | Diagram Elements | DF1, DF2, DF3, DF4 | |
| 145 | +------------------------+----------------------------------------------------+ |
| 146 | | Affected TF-A | SPMD, SPMC | |
| 147 | | Components | | |
| 148 | +------------------------+----------------------------------------------------+ |
| 149 | | Assets | SP state | |
| 150 | +------------------------+----------------------------------------------------+ |
| 151 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 152 | +------------------------+----------------------------------------------------+ |
| 153 | | Threat Type | Spoofing | |
| 154 | +------------------------+--------------------------+-------------------------+ |
| 155 | | Application | Server | Mobile | |
| 156 | +------------------------+--------------------------++------------------------+ |
| 157 | | Impact | Critical(5) | Critical(5) | |
| 158 | +------------------------+--------------------------++------------------------+ |
| 159 | | Likelihood | Critical(5) | Critical(5) | |
| 160 | +------------------------+--------------------------++------------------------+ |
| 161 | | Total Risk Rating | Critical(25) | Critical(25) | |
| 162 | +------------------------+--------------------------+-------------------------+ |
| 163 | | Mitigations | SPMC must be able to correctly identify an | |
| 164 | | | endpoint and enforce checks to disallow spoofing. | |
| 165 | +------------------------+----------------------------------------------------+ |
| 166 | | Mitigations | Yes. | |
| 167 | | implemented? | The SPMC enforces checks in the direct message | |
| 168 | | | request/response interfaces such an endpoint cannot| |
| 169 | | | spoof the origin and destination worlds (e.g. a NWd| |
| 170 | | | originated message directed to the SWd cannot use a| |
| 171 | | | SWd ID as the sender ID). | |
| 172 | | | Also enforces check for direct response being sent | |
| 173 | | | only to originator of request. | |
| 174 | +------------------------+----------------------------------------------------+ |
| 175 | |
| 176 | +------------------------+----------------------------------------------------+ |
| 177 | | ID | 02 | |
| 178 | +========================+====================================================+ |
| 179 | | Threat | **An endpoint impersonates the receiver | |
| 180 | | | FF-A ID in a direct request/response invocation.** | |
| 181 | +------------------------+----------------------------------------------------+ |
| 182 | | Diagram Elements | DF1, DF2, DF3, DF4 | |
| 183 | +------------------------+----------------------------------------------------+ |
| 184 | | Affected TF-A | SPMD, SPMC | |
| 185 | | Components | | |
| 186 | +------------------------+----------------------------------------------------+ |
| 187 | | Assets | SP state | |
| 188 | +------------------------+----------------------------------------------------+ |
| 189 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 190 | +------------------------+----------------------------------------------------+ |
| 191 | | Threat Type | Spoofing, Denial of Service | |
| 192 | +------------------------+--------------------------+-------------------------+ |
| 193 | | Application | Server | Mobile | |
| 194 | +------------------------+--------------------------++------------------------+ |
| 195 | | Impact | Critical(5) | Critical(5) | |
| 196 | +------------------------+--------------------------++------------------------+ |
| 197 | | Likelihood | Critical(5) | Critical(5) | |
| 198 | +------------------------+--------------------------++------------------------+ |
| 199 | | Total Risk Rating | Critical(25) | Critical(25) | |
| 200 | +------------------------+--------------------------+-------------------------+ |
| 201 | | Mitigations | Validate if endpoind has permission to send | |
| 202 | | | request to other endpoint by implementation | |
| 203 | | | defined means. | |
| 204 | +------------------------+----------------------------------------------------+ |
| 205 | | Mitigations | Platform specific. | |
| 206 | | implemented? | | |
| 207 | | | The guidance below is left for a system integrator | |
| 208 | | | to implement as necessary. | |
| 209 | | | | |
| 210 | | | Additionally a software component residing in the | |
| 211 | | | SPMC can be added for the purpose of direct | |
| 212 | | | request/response filtering. | |
| 213 | | | | |
| 214 | | | It can be configured with the list of known IDs | |
| 215 | | | and about which interaction can occur between one | |
| 216 | | | and another endpoint (e.g. which NWd endpoint ID | |
| 217 | | | sends a direct request to which SWd endpoint ID). | |
| 218 | | | | |
| 219 | | | This component checks the sender/receiver fields | |
| 220 | | | for a legitimate communication between endpoints. | |
| 221 | | | | |
| 222 | | | A similar component can exist in the OS kernel | |
| 223 | | | driver, or Hypervisor although it remains untrusted| |
| 224 | | | by the SPMD/SPMC. | |
| 225 | +------------------------+----------------------------------------------------+ |
| 226 | |
| 227 | +------------------------+----------------------------------------------------+ |
| 228 | | ID | 03 | |
| 229 | +========================+====================================================+ |
| 230 | | Threat | **Tampering with memory shared between an endpoint | |
| 231 | | | and the SPMC.** | |
| 232 | | | | |
| 233 | | | A malicious endpoint may attempt tampering with its| |
| 234 | | | RX/TX buffer contents while the SPMC is processing | |
| 235 | | | it (TOCTOU). | |
| 236 | +------------------------+----------------------------------------------------+ |
| 237 | | Diagram Elements | DF1, DF3, DF7 | |
| 238 | +------------------------+----------------------------------------------------+ |
| 239 | | Affected TF-A | SPMC | |
| 240 | | Components | | |
| 241 | +------------------------+----------------------------------------------------+ |
| 242 | | Assets | Shared memory, Information exchange | |
| 243 | +------------------------+----------------------------------------------------+ |
| 244 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 245 | +------------------------+----------------------------------------------------+ |
| 246 | | Threat Type | Tampering | |
| 247 | +------------------------+--------------------------+-------------------------+ |
| 248 | | Application | Server | Mobile | |
| 249 | +------------------------+--------------------------+-------------------------+ |
| 250 | | Impact | High (4) | High (4) | |
| 251 | +------------------------+--------------------------+-------------------------+ |
| 252 | | Likelihood | High (4) | High (4) | |
| 253 | +------------------------+--------------------------+-------------------------+ |
| 254 | | Total Risk Rating | High (16) | High (16) | |
| 255 | +------------------------+--------------------------+-------------------------+ |
| 256 | | Mitigations | Validate all inputs, copy before use. | |
| 257 | +------------------------+----------------------------------------------------+ |
| 258 | | Mitigations | Yes. In context of FF-A v1.1 this is the case of | |
| 259 | | implemented? | sharing the RX/TX buffer pair and usage in the | |
| 260 | | | PARTITION_INFO_GET or memory sharing primitives. | |
| 261 | | | | |
| 262 | | | The SPMC copies the contents of the TX buffer | |
| 263 | | | to an internal temporary buffer before processing | |
| 264 | | | its contents. The SPMC implements hardened input | |
| 265 | | | validation on data transmitted through the TX | |
| 266 | | | buffer by an untrusted endpoint. | |
| 267 | | | | |
| 268 | | | The TF-A SPMC enforces | |
| 269 | | | checks on data transmitted through RX/TX buffers. | |
| 270 | +------------------------+----------------------------------------------------+ |
| 271 | |
| 272 | +------------------------+----------------------------------------------------+ |
| 273 | | ID | 04 | |
| 274 | +========================+====================================================+ |
| 275 | | Threat | **An endpoint may tamper with its own state or the | |
| 276 | | | state of another endpoint.** | |
| 277 | | | | |
| 278 | | | A malicious endpoint may attempt violating: | |
| 279 | | | | |
| 280 | | | - its own or another SP state by using an unusual | |
| 281 | | | combination (or out-of-order) FF-A function | |
| 282 | | | invocations. | |
| 283 | | | This can also be an endpoint emitting FF-A | |
| 284 | | | function invocations to another endpoint while | |
| 285 | | | the latter in not in a state to receive it (e.g. | |
| 286 | | | SP sends a direct request to the normal world | |
| 287 | | | early while the normal world is not booted yet). | |
| 288 | | | - the SPMC state itself by employing unexpected | |
| 289 | | | transitions in FF-A memory sharing, direct | |
| 290 | | | requests and responses, or handling of interrupts| |
| 291 | | | This can be led by random stimuli injection or | |
| 292 | | | fuzzing. | |
| 293 | +------------------------+----------------------------------------------------+ |
| 294 | | Diagram Elements | DF1, DF2, DF3 | |
| 295 | +------------------------+----------------------------------------------------+ |
| 296 | | Affected TF-A | SPMD, SPMC | |
| 297 | | Components | | |
| 298 | +------------------------+----------------------------------------------------+ |
| 299 | | Assets | SP state, SPMC state | |
| 300 | +------------------------+----------------------------------------------------+ |
| 301 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 302 | +------------------------+----------------------------------------------------+ |
| 303 | | Threat Type | Tampering | |
| 304 | +------------------------+--------------------------+-------------------------+ |
| 305 | | Application | Server | Mobile | |
| 306 | +------------------------+--------------------------+-------------------------+ |
| 307 | | Impact | High (4) | High (4) | |
| 308 | +------------------------+--------------------------+-------------------------+ |
| 309 | | Likelihood | Medium (3) | Medium (3) | |
| 310 | +------------------------+--------------------------+-------------------------+ |
| 311 | | Total Risk Rating | High (12) | High (12) | |
| 312 | +------------------------+------------------+-----------------+---------------+ |
| 313 | | Mitigations | Follow guidelines in FF-A v1.1 specification on | |
| 314 | | | state transitions (run-time model). | |
| 315 | +------------------------+----------------------------------------------------+ |
| 316 | | Mitigations | Yes. The TF-A SPMC is hardened to follow this | |
| 317 | | implemented? | guidance. | |
| 318 | +------------------------+----------------------------------------------------+ |
| 319 | |
| 320 | +------------------------+----------------------------------------------------+ |
| 321 | | ID | 05 | |
| 322 | +========================+====================================================+ |
| 323 | | Threat | **Replay fragments of past communication between | |
| 324 | | | endpoints.** | |
| 325 | | | | |
| 326 | | | A malicious endpoint may replay a message exchange | |
| 327 | | | that occurred between two legitimate endpoints as | |
| 328 | | | a matter of triggering a malfunction or extracting | |
| 329 | | | secrets from the receiving endpoint. In particular | |
| 330 | | | the memory sharing operation with fragmented | |
| 331 | | | messages between an endpoint and the SPMC may be | |
| 332 | | | replayed by a malicious agent as a matter of | |
| 333 | | | getting access or gaining permissions to a memory | |
| 334 | | | region which does not belong to this agent. | |
| 335 | +------------------------+----------------------------------------------------+ |
| 336 | | Diagram Elements | DF2, DF3 | |
| 337 | +------------------------+----------------------------------------------------+ |
| 338 | | Affected TF-A | SPMC | |
| 339 | | Components | | |
| 340 | +------------------------+----------------------------------------------------+ |
| 341 | | Assets | Information exchange | |
| 342 | +------------------------+----------------------------------------------------+ |
| 343 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 344 | +------------------------+----------------------------------------------------+ |
| 345 | | Threat Type | Repudiation | |
| 346 | +------------------------+--------------------------+-------------------------+ |
| 347 | | Application | Server | Mobile | |
| 348 | +------------------------+--------------------------+-------------------------+ |
| 349 | | Impact | Medium (3) | Medium (3) | |
| 350 | +------------------------+--------------------------+-------------------------+ |
| 351 | | Likelihood | High (4) | High (4) | |
| 352 | +------------------------+--------------------------+-------------------------+ |
| 353 | | Total Risk Rating | High (12) | High (12) | |
| 354 | +------------------------+--------------------------+-------------------------+ |
| 355 | | Mitigations | Strict input validation and state tracking. | |
| 356 | +------------------------+----------------------------------------------------+ |
| 357 | | Mitigations | Platform specific. | |
| 358 | | implemented? | | |
| 359 | +------------------------+----------------------------------------------------+ |
| 360 | |
| 361 | +------------------------+----------------------------------------------------+ |
| 362 | | ID | 06 | |
| 363 | +========================+====================================================+ |
| 364 | | Threat | **A malicious endpoint may attempt to extract data | |
| 365 | | | or state information by the use of invalid or | |
| 366 | | | incorrect input arguments.** | |
| 367 | | | | |
| 368 | | | Lack of input parameter validation or side effects | |
| 369 | | | of maliciously forged input parameters might affect| |
| 370 | | | the SPMC. | |
| 371 | +------------------------+----------------------------------------------------+ |
| 372 | | Diagram Elements | DF1, DF2, DF3 | |
| 373 | +------------------------+----------------------------------------------------+ |
| 374 | | Affected TF-A | SPMD, SPMC | |
| 375 | | Components | | |
| 376 | +------------------------+----------------------------------------------------+ |
| 377 | | Assets | SP secrets, SPMC secrets, SP state, SPMC state | |
| 378 | +------------------------+----------------------------------------------------+ |
| 379 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 380 | +------------------------+----------------------------------------------------+ |
| 381 | | Threat Type | Information discolure | |
| 382 | +------------------------+--------------------------+-------------------------+ |
| 383 | | Application | Server | Mobile | |
| 384 | +------------------------+--------------------------+-------------------------+ |
| 385 | | Impact | High (4) | High (4) | |
| 386 | +------------------------+--------------------------+-------------------------+ |
| 387 | | Likelihood | Medium (3) | Medium (3) | |
| 388 | +------------------------+--------------------------+-------------------------+ |
| 389 | | Total Risk Rating | High (12) | High (12) | |
| 390 | +------------------------+--------------------------+-------------------------+ |
| 391 | | Mitigations | SPMC must be prepared to receive incorrect input | |
| 392 | | | data from secure partitions and reject them | |
| 393 | | | appropriately. | |
| 394 | | | The use of software (canaries) or hardware | |
| 395 | | | hardening techniques (XN, WXN, pointer | |
| 396 | | | authentication) helps detecting and stopping | |
| 397 | | | an exploitation early. | |
| 398 | +------------------------+----------------------------------------------------+ |
| 399 | | Mitigations | Yes. The TF-A SPMC mitigates this threat by | |
| 400 | | implemented? | implementing stack protector, pointer | |
| 401 | | | authentication, XN, WXN, security hardening | |
| 402 | | | techniques. | |
| 403 | +------------------------+----------------------------------------------------+ |
| 404 | |
| 405 | +------------------------+----------------------------------------------------+ |
| 406 | | ID | 07 | |
| 407 | +========================+====================================================+ |
| 408 | | Threat | **A malicious endpoint may forge a direct message | |
| 409 | | | request such that it reveals the internal state of | |
| 410 | | | another endpoint through the direct message | |
| 411 | | | response.** | |
| 412 | | | | |
| 413 | | | The secure partition or SPMC replies to a partition| |
| 414 | | | message by a direct message response with | |
| 415 | | | information which may reveal its internal state | |
| 416 | | | (e.g. partition message response outside of | |
| 417 | | | allowed bounds). | |
| 418 | +------------------------+----------------------------------------------------+ |
| 419 | | Diagram Elements | DF1, DF2, DF3 | |
| 420 | +------------------------+----------------------------------------------------+ |
| 421 | | Affected TF-A | SPMC | |
| 422 | | Components | | |
| 423 | +------------------------+----------------------------------------------------+ |
| 424 | | Assets | SPMC or SP state | |
| 425 | +------------------------+----------------------------------------------------+ |
| 426 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 427 | +------------------------+----------------------------------------------------+ |
| 428 | | Threat Type | Information discolure | |
| 429 | +------------------------+--------------------------+-------------------------+ |
| 430 | | Application | Server | Mobile | |
| 431 | +------------------------+--------------------------+-------------------------+ |
| 432 | | Impact | Medium (3) | Medium (3) | |
| 433 | +------------------------+--------------------------+-------------------------+ |
| 434 | | Likelihood | Low (2) | Low (2) | |
| 435 | +------------------------+--------------------------+-------------------------+ |
| 436 | | Total Risk Rating | Medium (6) | Medium (6) | |
| 437 | +------------------------+--------------------------+-------------------------+ |
| 438 | | Mitigations | Follow FF-A specification about state transitions, | |
| 439 | | | run time model, do input validation. | |
| 440 | +------------------------+----------------------------------------------------+ |
| 441 | | Mitigations | Yes. For the specific case of direct requests | |
| 442 | | implemented? | targeting the SPMC, the latter is hardened to | |
| 443 | | | prevent its internal state or the state of an SP | |
| 444 | | | to be revealed through a direct message response. | |
| 445 | | | Further FF-A v1.1 guidance about run time models | |
| 446 | | | and partition states is followed. | |
| 447 | +------------------------+----------------------------------------------------+ |
| 448 | |
| 449 | +------------------------+----------------------------------------------------+ |
| 450 | | ID | 08 | |
| 451 | +========================+====================================================+ |
| 452 | | Threat | **Probing the FF-A communication between | |
| 453 | | | endpoints.** | |
| 454 | | | | |
| 455 | | | SPMC and SPs are typically loaded to external | |
| 456 | | | memory (protected by a TrustZone memory | |
| 457 | | | controller). A malicious agent may use non invasive| |
| 458 | | | methods to probe the external memory bus and | |
| 459 | | | extract the traffic between an SP and the SPMC or | |
| 460 | | | among SPs when shared buffers are held in external | |
| 461 | | | memory. | |
| 462 | +------------------------+----------------------------------------------------+ |
| 463 | | Diagram Elements | DF7 | |
| 464 | +------------------------+----------------------------------------------------+ |
| 465 | | Affected TF-A | SPMC | |
| 466 | | Components | | |
| 467 | +------------------------+----------------------------------------------------+ |
| 468 | | Assets | SP/SPMC state, SP/SPMC secrets | |
| 469 | +------------------------+----------------------------------------------------+ |
| 470 | | Threat Agent | Hardware attack | |
| 471 | +------------------------+----------------------------------------------------+ |
| 472 | | Threat Type | Information disclosure | |
| 473 | +------------------------+--------------------------+-------------------------+ |
| 474 | | Application | Server | Mobile | |
| 475 | +------------------------+--------------------------+-------------------------+ |
| 476 | | Impact | Medium (3) | Medium (3) | |
| 477 | +------------------------+--------------------------+-------------------------+ |
| 478 | | Likelihood | Low (2) | Medium (3) | |
| 479 | +------------------------+--------------------------+-------------------------+ |
| 480 | | Total Risk Rating | Medium (6) | Medium (9) | |
| 481 | +------------------------+--------------------------+-------------------------+ |
| 482 | | Mitigations | Implement DRAM protection techniques using | |
| 483 | | | hardware countermeasures at platform or chip level.| |
| 484 | +------------------------+--------------------------+-------------------------+ |
| 485 | | Mitigations | Platform specific. | |
| 486 | | implemented? | | |
| 487 | +------------------------+----------------------------------------------------+ |
| 488 | |
| 489 | +------------------------+----------------------------------------------------+ |
| 490 | | ID | 09 | |
| 491 | +========================+====================================================+ |
| 492 | | Threat | **A malicious agent may attempt revealing the SPMC | |
| 493 | | | state or secrets by the use of software-based cache| |
| 494 | | | side-channel attack techniques.** | |
| 495 | +------------------------+----------------------------------------------------+ |
| 496 | | Diagram Elements | DF7 | |
| 497 | +------------------------+----------------------------------------------------+ |
| 498 | | Affected TF-A | SPMC | |
| 499 | | Components | | |
| 500 | +------------------------+----------------------------------------------------+ |
| 501 | | Assets | SP or SPMC state | |
| 502 | +------------------------+----------------------------------------------------+ |
| 503 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 504 | +------------------------+----------------------------------------------------+ |
| 505 | | Threat Type | Information disclosure | |
| 506 | +------------------------+--------------------------+-------------------------+ |
| 507 | | Application | Server | Mobile | |
| 508 | +------------------------+--------------------------+-------------------------+ |
| 509 | | Impact | Medium (3) | Medium (3) | |
| 510 | +------------------------+--------------------------+-------------------------+ |
| 511 | | Likelihood | Low (2) | Low (2) | |
| 512 | +------------------------+--------------------------+-------------------------+ |
| 513 | | Total Risk Rating | Medium (6) | Medium (6) | |
| 514 | +------------------------+--------------------------+-------------------------+ |
| 515 | | Mitigations | The SPMC may be hardened further with SW | |
| 516 | | | mitigations (e.g. speculation barriers) for the | |
| 517 | | | cases not covered in HW. Usage of hardened | |
| 518 | | | compilers and appropriate options, code inspection | |
| 519 | | | are recommended ways to mitigate Spectre types of | |
| 520 | | | attacks. | |
| 521 | +------------------------+----------------------------------------------------+ |
| 522 | | Mitigations | No. | |
| 523 | | implemented? | | |
| 524 | +------------------------+----------------------------------------------------+ |
| 525 | |
| 526 | |
| 527 | +------------------------+----------------------------------------------------+ |
| 528 | | ID | 10 | |
| 529 | +========================+====================================================+ |
| 530 | | Threat | **A malicious endpoint may attempt flooding the | |
| 531 | | | SPMC with requests targeting a service within an | |
| 532 | | | endpoint such that it denies another endpoint to | |
| 533 | | | access this service.** | |
| 534 | | | | |
| 535 | | | Similarly, the malicious endpoint may target a | |
| 536 | | | a service within an endpoint such that the latter | |
| 537 | | | is unable to request services from another | |
| 538 | | | endpoint. | |
| 539 | +------------------------+----------------------------------------------------+ |
| 540 | | Diagram Elements | DF1, DF2, DF3 | |
| 541 | +------------------------+----------------------------------------------------+ |
| 542 | | Affected TF-A | SPMC | |
| 543 | | Components | | |
| 544 | +------------------------+----------------------------------------------------+ |
| 545 | | Assets | SPMC state, Scheduling cycles | |
| 546 | +------------------------+----------------------------------------------------+ |
| 547 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 548 | +------------------------+----------------------------------------------------+ |
| 549 | | Threat Type | Denial of service | |
| 550 | +------------------------+--------------------------+-------------------------+ |
| 551 | | Application | Server | Mobile | |
| 552 | +------------------------+--------------------------+-------------------------+ |
| 553 | | Impact | Medium (3) | Medium (3) | |
| 554 | +------------------------+--------------------------+-------------------------+ |
| 555 | | Likelihood | Medium (3) | Medium (3) | |
| 556 | +------------------------+--------------------------+-------------------------+ |
| 557 | | Total Risk Rating | Medium (9) | Medium (9) | |
| 558 | +------------------------+--------------------------+-------------------------+ |
| 559 | | Mitigations | Bounding the time for operations to complete can | |
| 560 | | | be achieved by the usage of a trusted watchdog. | |
| 561 | | | Other quality of service monitoring can be achieved| |
| 562 | | | in the SPMC such as counting a number of operations| |
| 563 | | | in a limited timeframe. | |
| 564 | +------------------------+----------------------------------------------------+ |
| 565 | | Mitigations | Platform specific. | |
| 566 | | implemented? | | |
| 567 | +------------------------+----------------------------------------------------+ |
| 568 | |
| 569 | +------------------------+----------------------------------------------------+ |
| 570 | | ID | 11 | |
| 571 | +========================+====================================================+ |
| 572 | | Threat | **Denying a lender endpoint to make progress if | |
| 573 | | | borrower endpoint encountered a fatal exception. | |
| 574 | | | Denying a new sender endpoint to make progress | |
| 575 | | | if receiver encountered a fatal exception.** | |
| 576 | +------------------------+----------------------------------------------------+ |
| 577 | | Diagram Elements | DF1, DF2, DF3 | |
| 578 | +------------------------+----------------------------------------------------+ |
| 579 | | Affected TF-A | SPMC | |
| 580 | | Components | | |
| 581 | +------------------------+----------------------------------------------------+ |
| 582 | | Assets | Shared resources, Scheduling cycles. | |
| 583 | +------------------------+----------------------------------------------------+ |
| 584 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 585 | +------------------------+----------------------------------------------------+ |
| 586 | | Threat Type | Denial of service | |
| 587 | +------------------------+--------------------------+-------------------------+ |
| 588 | | Application | Server | Mobile | |
| 589 | +------------------------+--------------------------+-------------------------+ |
| 590 | | Impact | Medium (3) | Medium (3) | |
| 591 | +------------------------+--------------------------+-------------------------+ |
| 592 | | Likelihood | Medium (3) | Medium (3) | |
| 593 | +------------------------+--------------------------+-------------------------+ |
| 594 | | Total Risk Rating | Medium (9) | Medium (9) | |
| 595 | +------------------------+--------------------------+-------------------------+ |
| 596 | | Mitigations | SPMC must be able to detect fatal error in SP and | |
| 597 | | | take ownership of shared resources. It should | |
| 598 | | | be able to relinquish the access to shared memory | |
| 599 | | | regions to allow lender to proceed. | |
| 600 | | | SPMC must return ABORTED if new direct requests are| |
| 601 | | | targeted to SP which has had a fatal error. | |
| 602 | +------------------------+----------------------------------------------------+ |
| 603 | | Mitigations | Platform specific. | |
| 604 | | implemented? | | |
| 605 | +------------------------+----------------------------------------------------+ |
| 606 | |
| 607 | +------------------------+----------------------------------------------------+ |
| 608 | | ID | 12 | |
| 609 | +========================+====================================================+ |
| 610 | | Threat | **A malicious endpoint may attempt to donate, | |
| 611 | | | share, lend, relinquish or reclaim unauthorized | |
| 612 | | | memory region.** | |
| 613 | +------------------------+----------------------------------------------------+ |
| 614 | | Diagram Elements | DF1, DF2, DF3 | |
| 615 | +------------------------+----------------------------------------------------+ |
| 616 | | Affected TF-A | SPMC | |
| 617 | | Components | | |
| 618 | +------------------------+----------------------------------------------------+ |
| 619 | | Assets | SP secrets, SPMC secrets, SP state, SPMC state | |
| 620 | +------------------------+----------------------------------------------------+ |
| 621 | | Threat Agent | NS-Endpoint, S-Endpoint | |
| 622 | +------------------------+----------------------------------------------------+ |
| 623 | | Threat Type | Elevation of Privilege | |
| 624 | +------------------------+--------------------------+-------------------------+ |
| 625 | | Application | Server | Mobile | |
| 626 | +------------------------+--------------------------+-------------------------+ |
| 627 | | Impact | High (4) | High (4) | |
| 628 | +------------------------+--------------------------+-------------------------+ |
| 629 | | Likelihood | High (4) | High (4) | |
| 630 | +------------------------+--------------------------+-------------------------+ |
| 631 | | Total Risk Rating | High (16) | High (16) | |
| 632 | +------------------------+--------------------------+-------------------------+ |
| 633 | | Mitigations | Follow FF-A specification guidelines | |
| 634 | | | on Memory management transactions. | |
| 635 | +------------------------+----------------------------------------------------+ |
| 636 | | Mitigations | Yes. The SPMC tracks ownership and access state | |
| 637 | | implemented? | for memory transactions appropriately, and | |
| 638 | | | validating the same for all operations. | |
| 639 | | | SPMC follows FF-A v1.1 | |
| 640 | | | guidance for memory transaction lifecycle. | |
| 641 | +------------------------+----------------------------------------------------+ |
| 642 | |
| 643 | --------------- |
| 644 | |
| 645 | *Copyright (c) 2022, Arm Limited. All rights reserved.* |
| 646 | |
| 647 | .. _Arm Firmware Framework for Arm A-profile: https://developer.arm.com/docs/den0077/latest |
| 648 | .. _EL3 Secure Partition Manager: ../components/el3-spmc.html |
| 649 | .. _Generic TF-A threat model: ./threat_model.html#threat-analysis |
| 650 | .. _FF-A ACS: https://github.com/ARM-software/ff-a-acs/releases |