Downloads · 30 days
0
0xiviel/poc-pytorch-numel-msvc
poc-pytorch-numel-msvc is a machine learning model from 0xiviel. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Vulnerability: c10/core/TensorImpl.h:2596-2604 — computenumel() uses the unsafe multiplyintegers() path on MSVC builds because C10HASBUILTINOVERFLOW() is unconditionally 0 on MSVC (safenumerics.h:9-10). This disables…
Downloads · 30 days
0
Access
Public
Updated Feb 13, 2026
Repo size
2.4 KB
Likes
0
Public
Click a slice to open those files.
.py11.2 KB · 55%
From the Hugging Face model README
Vulnerability: c10/core/TensorImpl.h:2596-2604 — compute_numel() uses the unsafe multiply_integers() path on MSVC builds because C10_HAS_BUILTIN_OVERFLOW() is unconditionally 0 on MSVC (safe_numerics.h:9-10). This disables overflow detection for all Windows PyTorch users.
poc_numel_msvc_overflow.py — Full PoC (crafted model + UBSan-confirmed overflow)test_msvc_overflow.cpp — Standalone C++ UBSan testnumel_overflow_model.pt — Crafted model with overflow dimensionspip install torch
python poc_numel_msvc_overflow.py
safe_compute_numel() catches overflow (RuntimeError)multiply_integers() silently overflows (UBSan confirmed)