security-advisory-tfv-9.rst 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Advisory TFV-9 (CVE-2022-23960)
  2. ============================================================
  3. +----------------+-------------------------------------------------------------+
  4. | Title | Trusted Firmware-A exposure to speculative processor |
  5. | | vulnerabilities with branch prediction target reuse |
  6. +================+=============================================================+
  7. | CVE ID | `CVE-2022-23960`_ |
  8. +----------------+-------------------------------------------------------------+
  9. | Date | 08 Mar 2022 |
  10. +----------------+-------------------------------------------------------------+
  11. | Versions | All, up to and including v2.6 |
  12. | Affected | |
  13. +----------------+-------------------------------------------------------------+
  14. | Configurations | All |
  15. | Affected | |
  16. +----------------+-------------------------------------------------------------+
  17. | Impact | Potential leakage of secure world data to normal world |
  18. | | if an attacker is able to find a TF-A exfiltration primitive|
  19. | | that can be predicted as a valid branch target, and somehow |
  20. | | induce misprediction onto that primitive. There are |
  21. | | currently no known exploits. |
  22. +----------------+-------------------------------------------------------------+
  23. | Fix Version | `Gerrit topic #spectre_bhb`_ |
  24. +----------------+-------------------------------------------------------------+
  25. | Credit | Systems and Network Security Group at Vrije Universiteit |
  26. | | Amsterdam for CVE-2022-23960, Arm for patches |
  27. +----------------+-------------------------------------------------------------+
  28. This security advisory describes the current understanding of the Trusted
  29. Firmware-A exposure to the new speculative processor vulnerability.
  30. To understand the background and wider impact of these vulnerabilities on Arm
  31. systems, please refer to the `Arm Processor Security Update`_. The whitepaper
  32. referred to below describes the Spectre attack and mitigation in more detail
  33. including implementation specific mitigation details for all impacted Arm CPUs.
  34. `CVE-2022-23960`_
  35. -----------------
  36. Where possible on vulnerable CPUs that implement FEAT_CSV2, Arm recommends
  37. inserting a loop workaround with implementation specific number of iterations
  38. that will discard the branch history on exception entry to a higher exception
  39. level for the given CPU. This is done as early as possible on entry into EL3,
  40. before any branch instruction is executed. This is sufficient to mitigate
  41. Spectre-BHB on behalf of all secure world code, assuming that no secure world
  42. code is under attacker control.
  43. The below table lists the CPUs that mitigate against this vulnerability in
  44. TF-A using the loop workaround(all cores that implement FEAT_CSV2 except the
  45. revisions of Cortex-A73 and Cortex-A75 that implements FEAT_CSV2).
  46. +----------------------+
  47. | Core |
  48. +----------------------+
  49. | Cortex-A72(from r1p0)|
  50. +----------------------+
  51. | Cortex-A76 |
  52. +----------------------+
  53. | Cortex-A76AE |
  54. +----------------------+
  55. | Cortex-A77 |
  56. +----------------------+
  57. | Cortex-A78 |
  58. +----------------------+
  59. | Cortex-A78AE |
  60. +----------------------+
  61. | Cortex-A78C |
  62. +----------------------+
  63. | Cortex-X1 |
  64. +----------------------+
  65. | Cortex-X2 |
  66. +----------------------+
  67. | Cortex-X3 |
  68. +----------------------+
  69. | Cortex-A710 |
  70. +----------------------+
  71. | Cortex-A715 |
  72. +----------------------+
  73. | Cortex-A720 |
  74. +----------------------+
  75. | Neoverse-N1 |
  76. +----------------------+
  77. | Neoverse-N2 |
  78. +----------------------+
  79. | Neoverse-V1 |
  80. +----------------------+
  81. | Neoverse-V2 |
  82. +----------------------+
  83. | Neoverse-V3 |
  84. +----------------------+
  85. For all other cores impacted by Spectre-BHB, some of which that do not implement
  86. FEAT_CSV2 and some that do e.g. Cortex-A73, the recommended mitigation is to
  87. flush all branch predictions via an implementation specific route.
  88. In case local workaround is not feasible, the Rich OS can invoke the SMC
  89. (``SMCCC_ARCH_WORKAROUND_3``) to apply the workaround. Refer to `SMCCC Calling
  90. Convention specification`_ for more details.
  91. `Gerrit topic #spectre_bhb`_ This patchset implements the Spectre-BHB loop
  92. workaround for CPUs mentioned in the above table. For CPUs supporting
  93. speculative barrier instruction, the loop workaround is optimised by using SB
  94. in place of the common DSB and ISB sequence. It also mitigates against
  95. this vulnerability for Cortex-A72 CPU versions that support the CSV2 feature
  96. (from r1p0). The patch stack also includes an implementation for a specified
  97. `CVE-2022-23960`_ workaround SMC(``SMCCC_ARCH_WORKAROUND_3``) for use by normal
  98. world privileged software. Details of ``SMCCC_ARCH_WORKAROUND_3`` can be found
  99. in the `SMCCC Calling Convention specification`_. The specification and
  100. implementation also enables the normal world to discover the presence of this
  101. firmware service. This patch also implements ``SMCCC_ARCH_WORKAROUND_3`` for
  102. Cortex-A57, Coxtex-A72, Cortex-A73 and Cortex-A75 using the existing workaround.
  103. for CVE-2017-5715. Cortex-A15 patch extends Spectre V2 mitigation to Spectre-BHB.
  104. The above workaround is enabled by default (on vulnerable CPUs only). Platforms
  105. can choose to disable them at compile time if they do not require them.
  106. For more information about non-Arm CPUs, please contact the CPU vendor.
  107. .. _Arm Processor Security Update: http://www.arm.com/security-update
  108. .. _CVE-2022-23960: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-23960
  109. .. _Gerrit topic #spectre_bhb: https://review.trustedfirmware.org/q/topic:"spectre_bhb"+(status:open%20OR%20status:merged)
  110. .. _CVE-2022-23960 mitigation specification: https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
  111. .. _SMCCC Calling Convention specification: https://developer.arm.com/documentation/den0028/latest