VOOZH about

URL: https://thenewstack.io/with-leftoverlocals-gpus-can-leak-llm-prompt-data/

⇱ With LeftoverLocals, GPUs Can Leak LLM Prompt Data - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-01-17 14:01:51
With LeftoverLocals, GPUs Can Leak LLM Prompt Data
sponsor-microsoft,sponsored-topic,
Large Language Models / Security

With LeftoverLocals, GPUs Can Leak LLM Prompt Data

A New York security firm found a vulnerability that compromises the security posture of many, though not all, GPUs.
Jan 17th, 2024 2:01pm by Joab Jackson
👁 Featued image for: With LeftoverLocals, GPUs Can Leak LLM Prompt Data

As more organizations start to incorporate Large Language Model-based AI into their services and products, they will have to keep an eye on new attack vectors these technologies surface.

On Tuesday, researchers from the New York security consultancy Trail of Bits discovered a way to surreptitiously read the memory values of a GPU from a fellow GPU hosted on the same server. It could be used, the researchers demonstrated, for eavesdropping — across container or process boundaries — on prompt-based chat sessions.

Today, we are disclosing LeftoverLocals, a vulnerability that allows listening to LLM responses through leaked GPU local memory created by another process on Apple, Qualcomm, AMD, and Imagination GPUs (CVE-2023-4969) https://t.co/rIqfClarLJ pic.twitter.com/GE7bKYWnXJ

— Trail of Bits (@trailofbits) January 16, 2024

The vulnerability (CVE-2023-4969) works on GPUs from Apple, Qualcomm, AMD and Imagination (though it has not been demonstrated, as of yet, on those from either ARM or Nvidia, the current market leader for GPUs).

On an AMD Radeon RX 7900 XT, for instance, LeftoverLocals can leak about 5.5 MB for each GPU invocation.

For a 7 billion point model on llama.cpp, this would add up to about 181 MB for each LLM query — which is more than enough material to “reconstruct the LLM response with high precision,” wrote Trail of Bits’ researchers Heidy Khlaaf and Tyler Sorensen, who found the vuln in September.

How LeftoverLocals Works

A “co-resident exploit,” LeftoverLocals needs to be run on the same machine as the target, through another application or framework such as OpenCL, Vulkan, or Metal. Escalated privileges are not required.

The attack code would basically dump any local memory of the GPU that has not been initialized yet into global memory, allowing the attacker to read that data.

The code to execute this would not be difficult to write even for a dedicated amateur, the researchers note. They even provided a sample listening code for OpenCL:

In addition to the listener, the setup would also benefit from a writer script that writes a “canary value” into local memory, a way of checking if the GPU is vulnerable.

The blog post provides a lot more detail and context, so check it out. Interestingly enough, this exploit does not work for browser GPU frameworks, such as Google’s WebGPU, because they insert dynamic memory checks into GPU kernels.

How Vendors Responded to LeftoverLocals?

Upon identifying the vulnerability,  the research team launched a large coordinated disclosure effort, via the CERT Coordination Center, with all the major GPU vendors. As usual with hardware providers, some responded more promptly than others.

Apple did not acknowledge the vulnerability until this month, but Trail of Bits retesting found that some devices have been patched (3rd generation iPads with the A12 processor) while others remain vulnerable (Apple MacBook Air with the M2 processor).

AMD acknowledged the vulnerability and is looking into fixes. Qualcomm issued a patch for some, but not all of their GPUs. The company also praised the researchers’ coordinated disclosure process.

Imagination also released a patch, even though it was not Trail of Bits that found the vulnerability in Imagination’s silicon, but rather some researchers from Google, whose Android mobile software supports Imagination GPUs.

Trail of Bits also contacted Arm and NVidia, even though their GPUs thus far do not seem to be vulnerable.

What Is the Potential Impact of LeftoverLocals

While this security hole can still be present even on many popular consumer devices such as iPhone and Android phones, there has been no word, as of yet, of exploits. AMD itself evaluates the risk only as having a medium threat level.

Still, LeftoverLocals points to an emerging practice of securing LLMs and their supporting MLops.

As the researchers note: “The vulnerability highlights that many parts of the ML development stack have unknown security risks and have not been rigorously reviewed by security experts.”

Microsoft (Nasdaq “MSFT” @microsoft) enables digital transformation for the era of an intelligent cloud and an intelligent edge. Its mission is to empower every person and every organization on the planet to achieve more.
Learn More
The latest from Microsoft
TRENDING STORIES
Joab Jackson is a senior editor for The New Stack, covering cloud native computing and system operations. He has reported on IT infrastructure and development for over 30 years, including stints at IDG and Government Computer News. Before that, he...
Read more from Joab Jackson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.