Instructions to use hacnho/nemo-zarr-load-model-weights-amplification-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use hacnho/nemo-zarr-load-model-weights-amplification-poc with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
NeMo zarr load_model_weights() amplification PoC
Benign security PoC for a Huntr Model File Vulnerability report.
This bundle demonstrates a file-driven availability issue in a NeMo .nemo
archive consumer path:
nemo.export.utils.model_loader.load_model_weights()
-> load_sharded_metadata_zarr()
-> zarr.open(...)
-> arr[:]
The control and malicious .nemo archives are both 10240 bytes. The
malicious file changes only the zarr metadata field:
model_weights/foo/.zarray
shape -> [4194304]
On the tested runtime, the valid control finishes quickly after imports settle. The malicious archive converts the same code path into a reproducible timeout.
Files
load_model_weights_control.nemovalid minimal.nemoarchive using zarr-backed weightsload_model_weights_4m.nemomalicious.nemoarchive with forged zarr shape metadatanemo_toolkit-2.7.3-py3-none-any.whlexact NeMo wheel used for local verificationreproduce.pychild-process reproducer with per-case timeout and RSS delta reportingreproduce-result.jsonlocal bundle verification outputrequirements.txtPython dependencies for the reproducerMANIFEST.sha256artifact hashes
Reproduce
python3 -m venv /tmp/nemo-mfvpoc
/tmp/nemo-mfvpoc/bin/python -m pip install --upgrade pip
/tmp/nemo-mfvpoc/bin/python -m pip install -r requirements.txt
/tmp/nemo-mfvpoc/bin/python reproduce.py
Expected result:
- control:
- status
ok shape [4]- small
rss_delta_kb - fast completion
- status
- malicious:
- status
timeout - no successful output before timeout
- status
The PoC does not execute user code, does not write outside its own working directory, and is intended only to demonstrate file-driven memory/time amplification in the loader path.
- Downloads last month
- 4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support