SWAPGS (security vulnerability)

From HandWiki

SWAPGS, also known as Spectre variant 1, is a computer security vulnerability that utilizes the branch prediction used in modern microprocessors.[1][2][3] Most processors use a form of speculative execution, this feature allows the processors to make educated guesses about the instructions that will most likely need to be executed in the near future. This speculation can leave traces in the cache, which attackers use to extract data using a timing attack, similar to side-channel exploitation of Spectre.[4]

The Common Vulnerabilities and Exposures ID issued to this vulnerability is CVE-2019-1125.[5]

History

SWAPGS is closely related to the Spectre-V1 vulnerability, which used similar side-channel vulnerabilities to access privileged cache memory in an operating system. The vulnerability was discovered by Andrei Vlad Lutas of Bitdefender and was reported to Intel. Intel coordinated with industry partners to address the issue on a software level.[6] The first patches for SWAPGS were released on 9 July 2019 as part of the Microsoft Patch Tuesday. However, details regarding the vulnerability were not disclosed until 6 August 2019.[7]

SWAPGS itself is an instruction to swap the GSBase register with a value stored in MSR. This is typically used to store kernel data.

Affected systems

Any Intel-based processor that support SWAPGS and WRGSBASE instructions is affected. This includes every Intel processor starting from the Intel Ivy Bridge CPUs up to the most recent Intel processors.

Devices equipped with AMD processors are not affected, according to the company's product security update.[8]

AMD is aware of new research claiming new speculative execution attacks that may allow access to privileged kernel data. Based on external and internal analysis, AMD believes it is not vulnerable to the SWAPGS variant attacks because AMD products are designed not to speculate on the new GS value following a speculative SWAPGS. For the attack that is not a SWAPGS variant, the mitigation is to implement our existing recommendations for Spectre variant 1.

Mitigation

For Windows operating system-based devices, Microsoft's security advisory lists the patches released in July 2019, which fix the vulnerability.[9]

For Linux distributions, it is advised to check whether there are SWAPGS-specific patches that need to be applied. The kernel documentation describes the nature of the attacks and the in-kernel mitigations.[10]

Bitdefender mentions in its original report that Apple devices are unlikely to be at risk.[11]

See also

References

  1. "SWAPGS Spectre Side-Channel Vulnerability: CISA". United States: United States Computer Emergency Readiness Team. 6 August 2019. https://www.us-cert.gov/ncas/current-activity/2019/08/06/swapgs-spectre-side-channel-vulnerability. 
  2. "SWAPGS Attack". Bitdefender. 6 August 2019. https://www.bitdefender.com/business/swapgs-attack.html. 
  3. "SWAPGS speculative execution and speculative only segment loads CPU vulnerabilities /Support /SUSE". SUSE Linux. https://www.suse.com/support/kb/doc/?id=7023930. 
  4. "More information on SWAPGS and Speculative only Segment Loads". Intel. 6 August 2019. https://software.intel.com/security-software-guidance/insights/more-information-swapgs-and-speculative-only-segment-loads. 
  5. "CVE-2019-1125". United States: Mitre Corporation. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1125. 
  6. "SWAPGS Vulnerability in Modern CPUs Fixed in Windows, Linux, ChromeOS". Bleeping Computer. 6 August 2019. https://www.bleepingcomputer.com/news/security/swapgs-vulnerability-in-modern-cpus-fixed-in-windows-linux-chromeos/. 
  7. "Windows Kernel Information Disclosure Vulnerability". Microsoft. 6 August 2019. https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1125. 
  8. "Product Security". AMD. 6 August 2019. https://www.amd.com/en/corporate/product-security. 
  9. "CVE-2019-1125: Windows Kernel Information Disclosure Vulnerability". https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-1125. Retrieved 2019-12-04. 
  10. "Spectre Side Channels". https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/spectre.html. 
  11. "Bitdefender SWAPGS FAQ". 6 August 2019. https://www.bitdefender.com/business/swapgs-attack.html#faq. 
  12. Sometimes misspelled as "RSRE"