security-advisory-tfv-7.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. Advisory TFV-7 (CVE-2018-3639)
  2. ==============================
  3. +----------------+-------------------------------------------------------------+
  4. | Title | Trusted Firmware-A exposure to cache speculation |
  5. | | vulnerability Variant 4 |
  6. +================+=============================================================+
  7. | CVE ID | `CVE-2018-3639`_ |
  8. +----------------+-------------------------------------------------------------+
  9. | Date | 21 May 2018 (Updated 7 June 2018) |
  10. +----------------+-------------------------------------------------------------+
  11. | Versions | All, up to and including v1.5 |
  12. | Affected | |
  13. +----------------+-------------------------------------------------------------+
  14. | Configurations | All |
  15. | Affected | |
  16. +----------------+-------------------------------------------------------------+
  17. | Impact | Leakage of secure world data to normal world |
  18. +----------------+-------------------------------------------------------------+
  19. | Fix Version | `Pull Request #1392`_, `Pull Request #1397`_ |
  20. +----------------+-------------------------------------------------------------+
  21. | Credit | Google |
  22. +----------------+-------------------------------------------------------------+
  23. This security advisory describes the current understanding of the Trusted
  24. Firmware-A (TF-A) exposure to Variant 4 of the cache speculation vulnerabilities
  25. identified by `Google Project Zero`_. To understand the background and wider
  26. impact of these vulnerabilities on Arm systems, please refer to the `Arm
  27. Processor Security Update`_.
  28. At the time of writing, the TF-A project is not aware of a Variant 4 exploit
  29. that could be used against TF-A. It is likely to be very difficult to achieve an
  30. exploit against current standard configurations of TF-A, due to the limited
  31. interfaces into the secure world with attacker-controlled inputs. However, this
  32. is becoming increasingly difficult to guarantee with the introduction of complex
  33. new firmware interfaces, for example the `Software Delegated Exception Interface
  34. (SDEI)`_. Also, the TF-A project does not have visibility of all
  35. vendor-supplied interfaces. Therefore, the TF-A project takes a conservative
  36. approach by mitigating Variant 4 in hardware wherever possible during secure
  37. world execution. The mitigation is enabled by setting an implementation defined
  38. control bit to prevent the re-ordering of stores and loads.
  39. For each affected CPU type, TF-A implements one of the two following mitigation
  40. approaches in `Pull Request #1392`_ and `Pull Request #1397`_. Both approaches
  41. have a system performance impact, which varies for each CPU type and use-case.
  42. The mitigation code is enabled by default, but can be disabled at compile time
  43. for platforms that are unaffected or where the risk is deemed low enough.
  44. Arm CPUs not mentioned below are unaffected.
  45. Static mitigation
  46. -----------------
  47. For affected CPUs, this approach enables the mitigation during EL3
  48. initialization, following every PE reset. No mechanism is provided to disable
  49. the mitigation at runtime.
  50. This approach permanently mitigates the entire software stack and no additional
  51. mitigation code is required in other software components.
  52. TF-A implements this approach for the following affected CPUs:
  53. - Cortex-A57 and Cortex-A72, by setting bit 55 (Disable load pass store) of
  54. ``CPUACTLR_EL1`` (``S3_1_C15_C2_0``).
  55. - Cortex-A73, by setting bit 3 of ``S3_0_C15_C0_0`` (not documented in the
  56. Technical Reference Manual (TRM)).
  57. - Cortex-A75, by setting bit 35 (reserved in TRM) of ``CPUACTLR_EL1``
  58. (``S3_0_C15_C1_0``).
  59. Dynamic mitigation
  60. ------------------
  61. For affected CPUs, this approach also enables the mitigation during EL3
  62. initialization, following every PE reset. In addition, this approach implements
  63. ``SMCCC_ARCH_WORKAROUND_2`` in the Arm architectural range to allow callers at
  64. lower exception levels to temporarily disable the mitigation in their execution
  65. context, where the risk is deemed low enough. This approach enables mitigation
  66. on entry to EL3, and restores the mitigation state of the lower exception level
  67. on exit from EL3. For more information on this approach, see `Firmware
  68. interfaces for mitigating cache speculation vulnerabilities`_.
  69. This approach may be complemented by additional mitigation code in other
  70. software components, for example code that calls ``SMCCC_ARCH_WORKAROUND_2``.
  71. However, even without any mitigation code in other software components, this
  72. approach will effectively permanently mitigate the entire software stack, since
  73. the default mitigation state for firmware-managed execution contexts is enabled.
  74. Since the expectation in this approach is that more software executes with the
  75. mitigation disabled, this may result in better system performance than the
  76. static approach for some systems or use-cases. However, for other systems or
  77. use-cases, this performance saving may be outweighed by the additional overhead
  78. of ``SMCCC_ARCH_WORKAROUND_2`` calls and TF-A exception handling.
  79. TF-A implements this approach for the following affected CPU:
  80. - Cortex-A76, by setting and clearing bit 16 (reserved in TRM) of
  81. ``CPUACTLR2_EL1`` (``S3_0_C15_C1_1``).
  82. .. _Google Project Zero: https://bugs.chromium.org/p/project-zero/issues/detail?id=1528
  83. .. _Arm Processor Security Update: http://www.arm.com/security-update
  84. .. _CVE-2018-3639: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-3639
  85. .. _Software Delegated Exception Interface (SDEI): http://infocenter.arm.com/help/topic/com.arm.doc.den0054a/ARM_DEN0054A_Software_Delegated_Exception_Interface.pdf
  86. .. _Firmware interfaces for mitigating cache speculation vulnerabilities: https://developer.arm.com/cache-speculation-vulnerability-firmware-specification
  87. .. _Pull Request #1392: https://github.com/ARM-software/arm-trusted-firmware/pull/1392
  88. .. _Pull Request #1397: https://github.com/ARM-software/arm-trusted-firmware/pull/1397