How to (slowly) steal secrets over the network from chip security holes: NetSpectre summoned

Billions of devices potentially at risk – but Intel isn't worried

Computer security researchers have devised a way to exploit the speculative-execution design flaws in modern processor chips over a network connection – a possibility that sounds rather more serious but may be something less than that.

Until now, Spectre attacks have required malicious code to be running on a vulnerable machine to potentially extract passwords, keys, and other secrets, from the memory of other software on the computer.

Now, here comes NetSpectre: a technique for potentially extracting private information from another device on the network without requiring any exploit code on the target box, albeit exfiltrating it rather slowly. There are potentially billions of computers, gadgets, and gizmos at some degree of risk.

Establishing a network connection to a service running exploitable snippets of code should, in theory, be enough to very slowly discern the contents of application memory remotely. This requires precise timing and constant measurement, so noisy network environments, such as the internet, will hamper exploitation to some extent.

That's the first stage. The next step is to pull out interesting data rather than grab temporary variables and other inconsequential stuff lying around in a program's memory – a step that is non-trivial.

"We show that Spectre attacks do not require local code execution but can also be mounted remotely," said Michael Schwartz, one of the NetSpectre researchers, in an email to The Register. "Moreover, with the new covert channel, we show that Spectre does not necessarily require the cache to leak values."

The major catch, described in a paper titled NetSpectre: Read Arbitrary Memory over Network, is that this side-channel attack only leaks 15 bits per hour, or 60 bits an hour via an AVX-based covert channel, which means it could take days to find and gather privileged information such as an encryption key or authentication token.

High-value targets

Schwartz reckons this data leakage is something people should worry about, although, admitted that the speed at which it can be conducted is a limiting factor.

"Luckily, the speed is quite limited, which makes this attack mainly interesting for targeted attacks on high-value targets," he said. "If the system is fully patched against Spectre, including the new gadget variants we show in the paper, the attack should be prevented. However, we are still at the beginning of understanding how Spectre gadgets can look like, so this is not a problem that is trivial to solve."

Spectre attacks manipulate the branch prediction mechanisms used in modern CPUs' speculative execution engines to force the target process to access memory in a way that leaks privileged information. Today's processors rely on speculative execution to run software at high speed, predicting where the flow of the program will go ahead and priming themselves with code and data in anticipation. It is possible to discern the contents of memory that is otherwise out of sight by manipulating and observing the effects of this predictive execution.

Woo-yay, Meltdown CPU fixes are here. Now, Spectre flaws will haunt tech industry for years


For a remote Spectre attack, the targeted device must include code that performs an operation such as an reading through an array in a loop with a bounds check on each iteration. The exploit abuses design decisions within the processor microarchitecture to induce speculative execution, and discern the content of memory as a result. The paper, written by Michael Schwarz, Daniel Gruss, Martin Schwarzl, Moritz Lipp, and Stefan Mangard of Austria's Graz University of Technology, calls these code fragments "Spectre gadgets."

"Similar to a local Spectre attack, our remote attack requires the presence of a Spectre gadget in the code of the target," the paper explained. "We show that systems containing the required Spectre gadgets in an exposed network interface or API can be attacked with our generic remote Spectre attack, allowing to read arbitrary memory over the network. The attacker only sends a series of crafted requests to the victim and measures the response time to leak a secret value from the victim’s memory."

The attack involves sending multiple network packets at the target with a value that's always in bounds, thereby training the branch predictor to predict the comparison as true.

Don't cross the (bit) streams

For example, given this code running on a vulnerable device:

if (x < bitstream_length)
    flag = true;

...a miscreant can attempt to use the bitstream[x] access to extract a bit from the software's private memory. "The attacker sends a packet where x is out of bounds, such that bitstream[x] is a secret bit in the target’s memory," the paper explained.

The branch predictor then assumes the bounds check is true and the memory access is speculatively executed.

Intel, informed by the researchers of their findings earlier this year, doesn't appear to be terribly alarmed. Essentially, if you've updated your code and applications to mitigate previous Spectre exploits, you should be safe from NetSpectre.

"NetSpectre is an application of Bounds Check Bypass (CVE-2017-5753), and is mitigated in the same manner – through code inspection and modification of software to ensure a speculation stopping barrier is in place where appropriate," a spokesperson told The Register in an emailed statement.

Intel said it has updated its white paper, Analyzing Potential Bounds Check Bypass Vulnerabilities, to incorporate information related to the findings and thanked the researchers for reporting their research.

Red Hat says it has been working with the researchers and plans to publish details about the impact on its products, if any, in a blog post on Friday. "We have not identified any viable userspace Spectre gadget attacks but are actively auditing all of the daemons that listen over the network and the rest of the stack," said Jon Masters, chief Arm architect and computer microarchitecture lead at Red Hat, via Twitter.

So far, as with the other Spectre and Meltdown variants and sub-variants, no malware is exploiting these flaws in the wild, that we know of. ®

Similar topics

Broader topics

Other stories you might like

  • EU-US Trade and Technology Council meets to coordinate on supply chains
    Agenda includes warning system for disruptions, and avoiding 'subsidy race' for chip investments

    The EU-US Trade and Technology Council (TTC) is meeting in Paris today to discuss coordinated approaches to global supply chain issues.

    This is only the second meeting of the TTC, the agenda for which was prepared in February. That highlighted a number of priorities, including securing supply chains, technological cooperation, the coordination of measures to combat distorting practices, and approaches to the decarbonization of trade.

    According to a White House pre-briefing for US reporters, the EU and US are set to announce joint approaches on technical discussions to international standard-setting bodies, an early warning system to better predict and address potential semiconductor supply chain disruptions, and a transatlantic approach to semiconductor investments aimed at ensuring security of supply.

    Continue reading
  • US cops kick back against facial recognition bans
    Plus: DeepMind launches new generalist AI system, and Apple boffin quits over return-to-work policy

    In brief Facial recognition bans passed by US cities are being overturned as law enforcement and lobbyist groups pressure local governments to tackle rising crime rates.

    In July, the state of Virginia will scrap its ban on the controversial technology after less than a year. California and New Orleans may follow suit, Reuters first reported. Vermont adjusted its bill to allow police to use facial recognition software in child sex abuse investigations.

    Elsewhere, efforts are under way in New York, Colorado, and Indiana to prevent bills banning facial recognition from passing. It's not clear if some existing vetoes set to expire, like the one in California, will be renewed. Around two dozen US state or local governments passed laws prohibiting facial recognition from 2019 to 2021. Police, however, believe the tool is useful in identifying suspects and can help solve cases especially in places where crime rates have risen.

    Continue reading
  • RISC-V needs more than an open architecture to compete
    Arm shows us that even total domination doesn't always make stupid levels of money

    Opinion Interviews with chip company CEOs are invariably enlightening. On top of the usual market-related subjects of success and failure, revenues and competition, plans and pitfalls, the highly paid victim knows that there's a large audience of unusually competent critics eager for technical details. That's you.

    Take The Register's latest interview with RISC-V International CEO Calista Redmond. It moved smartly through the gears on Intel's recent Platinum Membership of the open ISA consortium ("they're not too worried about their x86 business"), the interest from autocratic regimes (roughly "there are no rules, if some come up we'll stick by them"), and what RISC-V's 2022 will look like. Laptops. Thousand-core AI chips. Google hyperscalers. Edge. The plan seems to be to do in five years what took Arm 20.

    RISC-V may not be an existential risk to Intel, but Arm had better watch it.

    Continue reading

Biting the hand that feeds IT © 1998–2022