High, CVSS 7.3crates.ioPublished
Out of bounds write in stackvector
CVE-2021-29939 · GHSA-9frf-r7c7-j2vg
- Affected
- crates.io stackvector < 1.0.9
- Fixed in
- 1.0.9· Vendor fix available
- Issue
- StackVec::extend used the lower and upper bounds from an Iterator's sizehint to determine how many items to push into the stack based vector. If the sizehint implementation returned a lower bound that was larger than the upper bound, StackVec would write out of bounds and overwrite memory on the stack. As mentioned by the sizehint documentation, sizehint is mainly for optimization and incorrect implementations should not lead to memory safety issues.
Recommended action: Upgrade to 1.0.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.