tract-nnef is vulnerable to Out-of-bounds Read
61
Medium Risk
Affected versions of tract-nnef are vulnerable to an out-of-bounds read when loading a crafted NNEF model. read_tensor builds a tensor shape from attacker-controlled 32-bit dimensions and computes the element count and byte allocation with unchecked usize arithmetic. In release builds those products can wrap, so a malicious .dat tensor can pass the header size check while reporting a far larger len than its heap allocation. Access via as_slice_unchecked then over-reads adjacent heap memory (information disclosure) or SIGSEGVs past the mapped region (denial of service). The issue is reachable through the public tract_nnef::nnef().model_for_path / model_for_read API during model load.
You are affected if you are using a version that falls within the vulnerable range and load untrusted or attacker-controlled NNEF models (for example .nnef.tgz, .nnef.tar, or directories containing .dat tensors) via tract_nnef.
tract-nnef is vulnerable to Out-of-bounds Read in versions 0.23.0 - 0.23.0, 0.22.0 - 0.22.1 and 0.0.1 - 0.21.15.
Upgrade the tract-nnef library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant