r/devops • • 2d ago

Discussion Can 2 isolated AI agents communicate through the same gpu inference server?

I was reading abt a recent experiment where 2 sandboxes AI model managed to communicate through a shared vLlm server, withot network access or shared file

Apparently they used tiny floating point differences caused by gpu kernel selection. 1 method even used the shared KV cache to leave signal for the other model. Pretty interesting but also a bit concernong for multi-tenant inference setup.

U can isolate container, block network traffic n keep file system separate but both model might ill share the same inference engine. Ofc it was controlled Poc, not something proven to work on every gpu setup

Just wondering where people draw the isolation boundary for shared llm serving.

Would u run untrusted tenants on the same vLlm instance with cache isolation or keep separate inference engines entirely?

0 Upvotes

15 comments sorted by

4

u/oldmemories2 2d ago

Separate engines for untrusted tenants every single time. Shared memory plus clever timing channels is just asking for a security audit nightmare.

3

u/Dobsen_Runjie 2d ago

yeah trying to explain shared KV cache isolation to a compliance auditor sounds miserable

3

u/simonides_ 2d ago

You know the risk exists - rate it. Now think of who you serve and think of whether you want to swallow the risk or not. Make sure to document it.

2

u/QuietBookkeeper4712 2d ago

eventually they’ll probably figure out a way

3

u/RepulsiveShow3180 2d ago

Shared GPU memory already is a side channel. No figuring out needed.

1

u/-Devlin- 2d ago

I feel side channel attacks are going to make a come back. Scary world we are in now

1

u/justrunme1 2d ago

Cache isolation on one vLLM instance doesn't close this. The step-sizing channel still works because the engine picks GPU kernels by batch size, and the rounding difference is visible to another request on the same process even when prefix cache is salted. For untrusted tenants I'd run separate engine instances. If they have to share a server, turn on batch-invariant kernels (VLLM_BATCH_INVARIANT) and set a per-tenant cache_salt; those two are the mitigations vLLM actually documents, and neither is on by default.

1

u/Official_BetterSWE 2d ago

the older, boring version of this is just timing. a prefix cache hit makes time to first token noticeably faster, so one tenant can tell whether someone else already sent the same prompt prefix. thats what vllm's cache_salt is for. the rounding channel is way harder to pull off in practice, but yeah separate engines per trust boundary is the only clean answer imo

1

u/impassionedultimatum 2d ago

thats actually a pretty interesting attack surface. people tend to think isolation ends at the container/network level but shared infrastructure can introduce some weird side channels. i'd be hesitant to put untrusted tenants on the same inference engine tbh.

1

u/radim11 1d ago

When you say separate inference engines, would those still share a physical GPU? That’s the detail I’d want before choosing. If the concern is shared cache state, maybe start by testing with that cache isolated per tenant. If the requirement is that two tenants can’t observe each other through shared hardware, I’d want the deployment to spell out which hardware they still share.