Hands-on testing of the packet-length side channel of self-deployed Ollama streaming responses
Start here
On November 23, 2026, an author on the Prophet Community took a published study's packet-length side-channel attack against commercial APIs and reproduced it in a self-deployed Ollama setup: serving qwen2.5-0.5b behind an Nginx TLS reverse proxy on a 1Mbps public VPS, the attacker does not decrypt traffic and uses only the TLS record length sequence with a random forest to infer 10 classes of Chinese conversation topics, achieving 33.0% accuracy under 5-fold cross-validation, 3.3 times the 10% random baseline. Item-by-item testing of five mitigations showed that disabling streaming reduced accuracy to 15.8% but increased time to first byte by 27 times; reverse proxy buffering lowered it by less than 3 percentage points and caused 9.2% of requests to fail; gateway-layer random padding reduced it to 10.8% with no loss to streaming and 2.6 times volume amplification; fixed-length padding drove packet-length-only features to zero; timing jitter alone was ineffective. The author recommends gateway-layer random padding as the first choice for self-deployment, and disabling streaming for non-interactive scenarios; the conclusions are limited to a closed set of 10 topic classes, a single small model, and a 1Mbps link, and cannot be directly extrapolated to commercial APIs.
Generated by AI from reports · Updated 5 days ago
Attention and developments
Attention, hourly
Now 34, 0% in 24 hours·Peak 35 (Nov 24 17:00)
Progress timeline
- Xianzhi Community (Aliyun)Practical measurement and mitigation evaluation of packet-length side-channel attacks on self-deployed Ollama streaming responses
The authors take a packet-length side-channel attack from public research against commercial APIs and test it on a self-deployed Ollama: on a 1Mbps public-network VPS, serving qwen2.5-0.5b behind an Nginx TLS reverse proxy, the attacker does not decrypt traffic and uses only the TLS record length sequence with a random forest to infer 10 classes of Chinese conversation topics, achieving 33.0% accuracy under 5-fold cross-validation, 3.3 times the 10% random baseline. Item-by-item testing of five mitigations shows that disabling streaming cuts it to 15.8% but increases time to first byte by 27 times; reverse-proxy buffering reduces it by less than 3 percentage points and causes 9.2% of requests to fail; gateway-layer random padding cuts it to 10.8% with no loss to streaming and 2.6 times volume amplification; fixed-length padding zeroes out the packet-length-only features; timing jitter alone is ineffective. The authors recommend gateway-layer random padding as the first choice for self-deployment, and disabling streaming for non-interactive scenarios; the conclusions are limited to a closed set of 10 topic classes, a single small model and a 1Mbps link, and cannot be directly extrapolated to commercial APIs.
Related discussion
Attention trend
New sources per day
- Nov 23: 1 new sources (1 outlets, 0 accounts)
- Nov 24: 0 new sources (0 outlets, 0 accounts)
- Nov 25: 0 new sources (0 outlets, 0 accounts)
- Nov 26: 0 new sources (0 outlets, 0 accounts)
- Nov 27: 0 new sources (0 outlets, 0 accounts)
- Nov 28: 0 new sources (0 outlets, 0 accounts)
- Nov 29: 0 new sources (0 outlets, 0 accounts)