Stack-buffer-overflow in spvtools::opt::CompositeInsertToCompositeConstruct
Summary
OSV-2022-490: Stack-buffer-overflow in spvtools::opt::CompositeInsertToCompositeConstruct. Affects spirv-tools versions >= 088cb1a5c81f45c8e778c4305e8668f3380401e8, < 286e9c1187053b4363fe963636f242263e1e5cd9. Fixed in 286e9c1187053b4363fe963636f242263e1e5cd9. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package under scrutiny is spirv-tools, which is part of the OSS-Fuzz ecosystem. spirv-tools is a set of utilities and libraries for working with SPIR-V, a binary intermediate language for representing shaders and compute kernels. It provides tools for validating, optimizing, and manipulating SPIR-V modules. The vulnerability affects the CompositeInsertToCompositeConstruct function in the spvtools::opt namespace.
Vulnerability Detail
The vulnerability is a stack-buffer-overflow in the CompositeInsertToCompositeConstruct function of the spvtools::opt namespace. It was reported through an OSS-Fuzz report, which identified a stack-buffer-overflow read of 4 bytes. The crash occurs in the InstructionFolder::FoldInstructionInternal function. The severity of the vulnerability is considered MEDIUM. The vulnerability can potentially lead to crashes or arbitrary code execution.
How To Fix
Minimum fixed version
286e9c1187053b4363fe963636f242263e1e5cd9
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
No workaround is mentioned for this vulnerability.
Conclusion
In conclusion, the vulnerability is a stack-buffer-overflow in the CompositeInsertToCompositeConstruct function of the spirv-tools package. It can potentially lead to crashes or arbitrary code execution. Developers should update their package to a version that includes the fix. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for spirv-tools →
FAQ
spirv-tools is a set of utilities and libraries for working with SPIR-V, a binary intermediate language for representing shaders and compute kernels.
The vulnerability can potentially lead to crashes or arbitrary code execution.
The vulnerability was reported through an OSS-Fuzz report.
The severity of the vulnerability is considered MEDIUM.
Developers should update their spirv-tools package to a version that includes the fix.
References
Related vulnerabilities
Recent vulnerabilities recorded for spirv-tools.