Heap-buffer-overflow in spvtools::disassemble::InstructionDisassembler::EmitInstruction
Summary
OSV-2024-574: Heap-buffer-overflow in spvtools::disassemble::InstructionDisassembler::EmitInstruction. Affects spirv-tools versions >= c3178da8eac9bc7d1788e95f8d555918ba483c23, < 7bf2d0275e480852abfccc5ff9a4cabd388286b2. Fixed in 7bf2d0275e480852abfccc5ff9a4cabd388286b2. 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 disassembling SPIR-V modules. The vulnerability affects the package's disassembly functionality.
Vulnerability Detail
The vulnerability, identified as OSV-2024-574, is a heap-buffer-overflow in the spvtools::disassemble::InstructionDisassembler::EmitInstruction function. It can be triggered when disassembling SPIR-V instructions, leading to a read of one byte beyond the bounds of a heap buffer. This vulnerability can potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition. The issue was reported through the OSS-Fuzz project.
How To Fix
Minimum fixed version
7bf2d0275e480852abfccc5ff9a4cabd388286b2
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 has been provided for this vulnerability.
Conclusion
In conclusion, the spirv-tools package is vulnerable to a heap-buffer-overflow vulnerability in the disassembly functionality. It is recommended to update to a fixed version of the package to mitigate the risk. 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 be exploited by an attacker to execute arbitrary code or cause a denial-of-service condition.
The vulnerability was discovered through the OSS-Fuzz project, which performs continuous fuzzing on open-source software.
Yes, a fix for this vulnerability has been introduced in commit c3178da8eac9bc7d1788e95f8d555918ba483c23 of the spirv-tools repository.
No workaround has been provided for this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for spirv-tools.