peroxide is vulnerable to Out-of-Bounds Write
59
CVE Score
Medium
Out-of-Bounds Write
The Matrix and ComplexMatrix types in peroxide expose their data, row, and col fields publicly, and the internal unsafe code that backs matrix operations trusts these fields without checking that the buffer length matches row * col. Safe code can construct a matrix whose data length disagrees with its dimensions, and operations that reach the raw-pointer, BLAS, and index-arithmetic paths then read and write past the end of the heap buffer. This makes heap out-of-bounds reads and writes reachable without any unsafe in user code, allowing memory corruption and disclosure of adjacent heap memory. The fix makes the fields crate-private and adds a length assertion in the matrix and cmatrix constructors so the invariant can no longer be broken from outside the crate.
Upgrade the peroxide library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and your code sets the public matrix fields to values where the buffer length does not match the row and column counts.
0.14.0 - 0.41.2
Fixed in 0.42.0peroxide is vulnerable to Out-of-Bounds Write in versions 0.14.0 - 0.41.2.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.