Stack-use-after-scope vulnerability in grok
Summary
OSV-2022-321: Stack-use-after-scope in std::1::function::__func. Affects grok versions >= a27b85d5d31dc6da58aa8af859e63448a6384150, < 12ef5ef65d81862f0dcad9fafdbabb3c93a72934. Fixed in 12ef5ef65d81862f0dcad9fafdbabb3c93a72934. 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
Grok is an open-source image compression library that provides functionality for encoding and decoding images. It is widely used in various applications to optimize image storage and transmission. However, a stack-use-after-scope vulnerability has been discovered in the library, which can lead to potential security issues.
Vulnerability Detail
The stack-use-after-scope vulnerability in grok originates from a specific function called grk::WaveletReverse::decompress_partial_tile. This function is used for decompressing image tiles. The vulnerability occurs when the function attempts to write to a stack variable that has already gone out of scope. This can result in memory corruption and potentially lead to arbitrary code execution. The vulnerability has been reported through the OSS-Fuzz project.
How To Fix
Minimum fixed version
12ef5ef65d81862f0dcad9fafdbabb3c93a72934
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
As a temporary workaround, users can avoid using the grk::WaveletReverse::decompress_partial_tile function until the library is updated. By avoiding the vulnerable function, the risk of exploitation can be mitigated. However, this workaround may impact the functionality of applications that rely on the decompression of image tiles.
Conclusion
In conclusion, the grok library is affected by a stack-use-after-scope vulnerability in the grk::WaveletReverse::decompress_partial_tile function. Users should update to the latest version of the library that includes the fix to ensure the security of their applications. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for grok →
FAQ
Grok is an open-source image compression library used for encoding and decoding images.
The vulnerability can lead to memory corruption and potentially allow arbitrary code execution.
The vulnerability was reported through the OSS-Fuzz project, which focuses on fuzz testing open-source software.
Yes, the vulnerability has been fixed in the grok library. Users should update to the latest version that includes the fix.
A temporary workaround is to avoid using the vulnerable function until the library is updated.
References
Related vulnerabilities
Recent vulnerabilities recorded for grok.