Upload 2 files
Browse files- README.md +29 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- security
|
| 5 |
+
- proof-of-concept
|
| 6 |
+
- denial-of-service
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# runai-model-streamer header DoS — PoC model file
|
| 10 |
+
|
| 11 |
+
Security proof-of-concept for a Denial-of-Service in
|
| 12 |
+
[`run-ai/runai-model-streamer`](https://github.com/run-ai/runai-model-streamer)
|
| 13 |
+
(commit `5c83ddb`). Reported via huntr's Model File Vulnerability program.
|
| 14 |
+
|
| 15 |
+
`model.safetensors` is a 78-byte safetensors file whose header omits the `dtype`
|
| 16 |
+
key. Loading it through the public `SafetensorsStreamer` API crashes the parser
|
| 17 |
+
with an uncaught `KeyError`, before any tensor data is read. This affects any app
|
| 18 |
+
using runai-model-streamer, including vLLM started with `--load-format runai_streamer`.
|
| 19 |
+
|
| 20 |
+
## Reproduce
|
| 21 |
+
`pip install runai-model-streamer torch` — no GPU required:
|
| 22 |
+
```python
|
| 23 |
+
from runai_model_streamer.safetensors_streamer.safetensors_streamer import SafetensorsStreamer
|
| 24 |
+
with SafetensorsStreamer() as s:
|
| 25 |
+
s.stream_file("model.safetensors")
|
| 26 |
+
list(s.get_tensors())
|
| 27 |
+
|
| 28 |
+
-> KeyError: 'dtype' (uncaught -> loader crash)
|
| 29 |
+
Harmless file: it triggers an unhandled exception, not code execution.
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b284bd83f619a14e65ddddbc13bfb461edb678b36c27f3e66588f6e6da0704b
|
| 3 |
+
size 78
|