threat_model_arm_cca.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. Threat Model for TF-A with Arm CCA support
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Introduction
  4. ************
  5. This document provides a threat model of TF-A firmware for platforms with Arm
  6. Realm Management Extension (RME) support which implement Arm Confidential
  7. Compute Architecture (Arm CCA).
  8. Although it is a separate document, it references the :ref:`Generic Threat
  9. Model` in a number of places, as some of the contents is commonly applicable to
  10. TF-A with or without Arm CCA support.
  11. Target of Evaluation
  12. ********************
  13. In this threat model, the target of evaluation is the Trusted Firmware for
  14. A-class Processors (TF-A) with RME support and Arm CCA support. This includes
  15. the boot ROM (BL1), the trusted boot firmware (BL2) and the runtime EL3 firmware
  16. (BL31).
  17. Assumptions
  18. ===========
  19. We make the following assumptions:
  20. - :ref:`Realm Management Extension (RME)` is enabled on the platform.
  21. - Arm CCA Hardware Enforced Security (HES) is available on the platform, as
  22. recommended by `Arm CCA security model`_:
  23. *[R0004] Arm strongly recommends that all implementations of CCA utilize*
  24. *hardware enforced security (CCA HES).*
  25. - All TF-A images run from on-chip memory. Data used by these images also live
  26. in on-chip memory. This means TF-A is not vulnerable to an attacker that can
  27. probe or tamper with off-chip memory.
  28. These are requirements of the `Arm CCA security model`_:
  29. *[R0147] Monitor code executes entirely from on-chip memory.*
  30. *[R0149] Any monitor data that may affect the CCA security guarantee, other*
  31. *than GPT, is either held in on-chip memory, or in external memory but with*
  32. *additional integrity protection.*
  33. Note that this threat model hardens *[R0149]* requirement by forbidding to
  34. hold data in external memory, even if it is integrity-protected - except for
  35. GPT data.
  36. - TF-A BL1 image is immutable and thus implicitly trusted. It runs from
  37. read-only memory or write-protected memory. This could be on-chip ROM, on-chip
  38. OTP, locked on-chip flash, or write-protected on-chip RAM for example.
  39. This is a requirement of the `Arm CCA security model`_:
  40. *[R0158] Arm recommends that all initial boot code is immutable on a*
  41. *secured system.*
  42. *[R0050] If all or part of initial boot code is instantiated in on-chip*
  43. *memory then other trusted subsystems or application PE cannot modify that*
  44. *code before it has been executed.*
  45. - Trusted boot and measured boot are enabled. This means an attacker can't boot
  46. arbitrary images that are not approved by platform providers.
  47. These are requirements of the `Arm CCA security model`_:
  48. *[R0048] A secured system can only load authorized CCA firmware.*
  49. *[R0079] All Monitor firmware loaded by PE initial boot is measured and*
  50. *verified as outlined in Verified boot.*
  51. - No experimental features are enabled. These are typically incomplete features,
  52. which need more time to stabilize. Thus, we do not consider threats that may
  53. come from them. It is not recommended to use these features in production
  54. builds.
  55. Data Flow Diagram
  56. =================
  57. Figure 1 shows a high-level data flow diagram for TF-A. The diagram shows a
  58. model of the different components of a TF-A-based system and their interactions
  59. with TF-A. A description of each diagram element is given on Table 1. On the
  60. diagram, the red broken lines indicate trust boundaries. Components outside of
  61. the broken lines are considered untrusted by TF-A.
  62. .. uml:: ../../resources/diagrams/plantuml/tfa_arm_cca_dfd.puml
  63. :caption: Figure 1: Data Flow Diagram
  64. .. table:: Table 1: Data Flow Diagram Description
  65. +-----------------+--------------------------------------------------------+
  66. | Diagram Element | Description |
  67. +=================+========================================================+
  68. | DF1 | | Refer to DF1 description in the |
  69. | | :ref:`Generic Threat Model`. Additionally TF-A |
  70. | | loads realm images. |
  71. +-----------------+--------------------------------------------------------+
  72. | DF2-DF6 | | Refer to DF2-DF6 descriptions in the |
  73. | | :ref:`Generic Threat Model`. |
  74. +-----------------+--------------------------------------------------------+
  75. | DF7 | | Boot images interact with Arm CCA HES to record boot |
  76. | | measurements and retrieve data used for AP images |
  77. | | authentication. |
  78. | | |
  79. | | | The runtime firmware interacts with Arm CCA HES to |
  80. | | obtain sensitive attestation data for the realm |
  81. | | world. |
  82. +-----------------+--------------------------------------------------------+
  83. | DF8 | | Realm world software (e.g. TF-RMM) interact with |
  84. | | TF-A through SMC call interface and/or shared |
  85. | | memory. |
  86. +-----------------+--------------------------------------------------------+
  87. Threat Analysis
  88. ***************
  89. In this threat model, we use the same method to analyse threats as in the
  90. :ref:`Generic Threat Model`. This section only points out differences where
  91. applicable.
  92. - There is an additional threat agent: *RealmCode*. It takes the form of
  93. malicious or faulty code running in the realm world, including R-EL2, R-EL1
  94. and R-EL0 levels.
  95. - At this time we only consider the ``Server`` target environment. New threats
  96. identified in this threat model will only be given a risk rating for this
  97. environment. Other environments may be added in a future revision
  98. Threat Assessment
  99. =================
  100. General Threats for All Firmware Images
  101. ---------------------------------------
  102. The following table analyses the :ref:`General Threats` in the context of this
  103. threat model. Only deltas are pointed out.
  104. +----+-------------+-------------------------------------------------------+
  105. | ID | Applicable? | Comments |
  106. +====+=============+=======================================================+
  107. | 05 | Yes | |
  108. +----+-------------+-------------------------------------------------------+
  109. | 06 | Yes | |
  110. +----+-------------+-------------------------------------------------------+
  111. | 08 | Yes | Additional diagram element: DF8. |
  112. | | | |
  113. | | | Additional threat agent: RealmCode. |
  114. +----+-------------+-------------------------------------------------------+
  115. | 11 | Yes | | Misconfiguration of the Memory Management Unit |
  116. | | | (MMU) may allow a **normal/secure/realm** world |
  117. | | | software to access sensitive data, execute arbitrary|
  118. | | | code or access otherwise restricted HW interface. |
  119. | | | |
  120. | | | | **Note that on RME systems, MMU configuration also |
  121. | | | includes Granule Protection Tables (GPT) setup.** |
  122. | | | |
  123. | | | | Additional diagram elements: DF4, DF7, DF8. |
  124. | | | |
  125. | | | | Additional threat agents: SecCode, RealmCode. |
  126. +----+-------------+-------------------------------------------------------+
  127. | 13 | Yes | Additional diagram element: DF8. |
  128. | | | |
  129. | | | Additional threat agent: RealmCode. |
  130. +----+-------------+-------------------------------------------------------+
  131. | 15 | Yes | Additional diagram element: DF8. |
  132. | | | |
  133. | | | Additional threat agent: RealmCode. |
  134. +----+-------------+-------------------------------------------------------+
  135. Threats to be Mitigated by the Boot Firmware
  136. --------------------------------------------
  137. The following table analyses the :ref:`Boot Firmware Threats` in the context of
  138. this threat model. Only deltas are pointed out.
  139. +----+-------------+-------------------------------------------------------+
  140. | ID | Applicable? | Comments |
  141. +====+=============+=======================================================+
  142. | 01 | Yes | Additional diagram element: DF8. |
  143. | | | |
  144. | | | Additional threat agent: RealmCode. |
  145. +----+-------------+-------------------------------------------------------+
  146. | 02 | Yes | Additional diagram element: DF8. |
  147. | | | |
  148. | | | Additional threat agent: RealmCode. |
  149. +----+-------------+-------------------------------------------------------+
  150. | 03 | Yes | |
  151. +----+-------------+-------------------------------------------------------+
  152. | 04 | Yes | |
  153. +----+-------------+-------------------------------------------------------+
  154. Threats to be Mitigated by the Runtime EL3 Firmware
  155. ---------------------------------------------------
  156. The following table analyses the :ref:`Runtime Firmware Threats` in the context
  157. of this threat model. Only deltas are pointed out.
  158. +----+-------------+-------------------------------------------------------+
  159. | ID | Applicable? | Comments |
  160. +====+=============+=======================================================+
  161. | 07 | Yes | Additional diagram element: DF8. |
  162. | | | |
  163. | | | Additional threat agent: RealmCode. |
  164. +----+-------------+-------------------------------------------------------+
  165. | 09 | Yes | Additional diagram element: DF8. |
  166. | | | |
  167. | | | Additional threat agent: RealmCode. |
  168. +----+-------------+-------------------------------------------------------+
  169. | 10 | Yes | Additional diagram element: DF8. |
  170. | | | |
  171. | | | Additional threat agent: RealmCode. |
  172. +----+-------------+-------------------------------------------------------+
  173. | 12 | Yes | Additional diagram element: DF8. |
  174. | | | |
  175. | | | Additional threat agent: RealmCode. |
  176. +----+-------------+-------------------------------------------------------+
  177. | 14 | Yes | |
  178. +----+-------------+-------------------------------------------------------+
  179. *Copyright (c) 2023-2024, Arm Limited. All rights reserved.*
  180. .. _Arm CCA Security Model: https://developer.arm.com/documentation/DEN0096/A_a