Researchers Uncover First Native Spectre V2 Exploit Against Linux Kernel
Cybersecurity researchers have disclosed what they say is the "first native Spectre v2 exploit" against the Linux kernel on Intel systems that could be exploited to read sensitive data from the memory.
The exploit, called Native Branch History Injection (BHI), can be used to leak arbitrary kernel memory at 3.5 kB/sec by bypassing existing Spectre v2/BHI mitigations, researchers from Systems and Network Security Group (VUSec) at Vrije Universiteit Amsterdam said in a new study.
The shortcoming is being tracked as CVE-2024-2201.
BHI was first disclosed by VUSec in March 2022, describing it as a technique that can get around Spectre v2 protections in modern processors from Intel, AMD, and Arm.
While the attack leveraged extended Berkeley Packet Filters (eBPFs), Intel's recommendations to address the problem, among other things, were to disable Linux's unprivileged eBPFs.
"Privileged managed runtimes that can be configured to allow an unprivileged user to generate and execute code in a privileged domain -- such as Linux's 'unprivileged eBPF' -- significantly increase the risk of transient execution attacks, even when defenses against intra-mode [Branch Target Injection] are present," Intel said at the time.
"The kernel can be configured to deny access to unprivileged eBPF by default, while still allowing administrators to enable it at runtime where needed."
Native BHI neutralizes this countermeasure by showing that BHI is possible without eBPF. It impacts all Intel systems that are susceptible to BHI.
As a result, it makes it feasible for an attacker with access to CPU resources to influence speculative execution paths via malicious software installed on a machine with the goal of extracting sensitive data that are associated with a different process.
"Existing mitigation techniques of disabling privileged eBPF and enabling (Fine)IBT are insufficient in stopping BHI exploitation against the kernel/hypervisor," the CERT Coordination Center (CERT/CC) said in an advisory.
This is accomplished by means of a program called InSpectre Gadget, which can find gadgets within the operating system kernel that can be abused to get around safeguards baked into Intel microprocessors (e.g., FineIBT) to prevent speculative execution exploitation and obtain secret data.
Gadgets refer to code fragments (i.e., sequence of instructions) whose speculative execution will transfer the victim's sensitive information into a covert channel.
"An unauthenticated attacker can exploit this vulnerability to leak privileged memory from the CPU by speculatively jumping to a chosen gadget."
The flaw has been confirmed to affect Illumos, Intel, Red Hat, SUSE Linux, Triton Data Center, and Xen. AMD, in a bulletin, said it's "not aware of any impact" on its products.
The disclosure comes weeks after IBM and VUSec detailed GhostRace (CVE-2024-2193), a variant of Spectre v1 that employs a combination of speculative execution and race conditions to leak data from contemporary CPU architectures.
It also follows new research from ETH Zurich that disclosed a family of attacks dubbed Ahoi Attacks that could be used to compromise hardware-based trusted execution environments (TEEs) and break confidential virtual machines (CVMs) like AMD Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP) and Intel Trust Domain Extensions (TDX).
The attacks, codenamed Heckler and WeSee, make use of malicious interrupts to break the integrity of CVMs, potentially allowing threat actors to remotely log in and gain elevated access, as well as perform arbitrary read, write, and code injection to disable firewall rules and open a root shell.
"For Ahoi Attacks, an attacker can use the hypervisor to inject malicious interrupts to the victim's vCPUs and trick it into executing the interrupt handlers," the researchers said. "These interrupt handlers can have global effects (e.g., changing the register state in the application) that an attacker can trigger to compromise the victim's CVM."
In response to the findings, AMD said the vulnerability is rooted in the Linux kernel implementation of SEV-SNP and that fixes addressing some of the issues have been upstreamed to the main Linux kernel.
Source: thehackernews.com