News Security Technology

Researchers Discover Major Vulnerability In T-Head’s XuanTie RISC-V CPUs

CISPA researchers have identified faulty instructions within the CPU’s vector extension, an add-on to the RISC-V Instruction Set Architecture (ISA) designed to handle larger data

A team of researchers from the CISPA Helmholtz Center for Information Security in Germany has uncovered a serious architectural flaw in T-Head’s XuanTie C910 and C920 RISC-V CPUs, produced by the Chinese chipmaker. The vulnerability, named “GhostWrite,” could allow attackers to gain unrestricted access to devices using these processors.

Unlike side-channel or transient execution attacks, GhostWrite is a direct CPU bug embedded in the hardware. This flaw enables unprivileged attackers, even with limited access, to read and write to any part of the computer’s memory and control peripheral devices like network cards, effectively rendering the CPU’s security features ineffective.

CISPA researchers have identified faulty instructions within the CPU’s vector extension, an add-on to the RISC-V Instruction Set Architecture (ISA) designed to handle larger data values than the base ISA. These faulty instructions operate directly on physical memory rather than virtual memory, bypassing the process isolation typically enforced by the operating system and hardware. As a result, an unprivileged attacker could exploit this loophole to access any memory location, sidestep security measures, and gain full control over the device. This includes the potential to leak sensitive memory content, such as passwords.

“The attack is 100% reliable, deterministic, and takes only microseconds to execute,” the researchers stated. They further explained that even robust security measures like Docker containerization or sandboxing cannot thwart this attack. Additionally, attackers can hijack hardware devices that use memory-mapped input/output (MMIO), allowing them to send any commands to these devices.

The only effective countermeasure for GhostWrite is to disable the entire vector functionality, which would significantly impact the CPU’s performance by turning off about 50% of its instruction set. “Disabling the vector extension significantly reduces the CPU’s performance, especially for tasks that benefit from parallel processing and handling large data sets. Applications relying heavily on these features may experience slower performance or reduced functionality,” the researchers noted.

Fortunately, the researchers highlighted that the vulnerable instructions lie in the vector extension, which can be disabled by the operating system. While this fully mitigates GhostWrite, it also entirely disables vector instructions on the CPU.

This disclosure coincides with the Android Red Team at Google revealing over nine flaws in Qualcomm’s Adreno GPU. These flaws could enable an attacker with local access to a device to achieve privilege escalation and execute code at the kernel level. Qualcomm has since patched these vulnerabilities.

Additionally, a new security flaw in AMD processors, dubbed “SinkClose” (CVE-2023-31315, CVSS score: 7.5), has been identified. This flaw could potentially be exploited by an attacker with kernel (Ring-0) access to elevate privileges and modify the configuration of System Management Mode (SMM or Ring-2), even when SMM Lock is enabled. The vulnerability, which has remained undetected for nearly two decades, could allow for disabling security features and installing persistent malware that goes virtually unnoticed.

According to AMD, “Improper validation in a model-specific register (MSR) could allow a malicious program with ring0 access to modify SMM configuration while SMI lock is enabled, potentially leading to arbitrary code execution.” The company has stated its intention to release updates to Original Equipment Manufacturers (OEM) to address this issue.

Speaking to WIRED, AMD mentioned that the only way to remediate an infection would be to physically connect to the CPUs using a hardware-based tool known as an SPI Flash programmer and scan the memory for malware installed using SinkClose.

Leave a Reply

Your email address will not be published. Required fields are marked *