Heap-buffer-overflow in Gfx::decode_bmp_pixel_data in SerenityOS
Summary
OSV-2023-936: Heap-buffer-overflow in Gfx::decode_bmp_pixel_data. Affects serenity versions >= a52089452226ce7327c5557ae10b8450b9cc2fee, < fd157b9a711dfd908392b2ddbaf13cb0ef292886. Fixed in fd157b9a711dfd908392b2ddbaf13cb0ef292886. 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
SerenityOS is an open-source operating system that aims to provide a modern and user-friendly interface. It offers various functionalities and features, including support for image decoding. However, a vulnerability has been discovered in the Gfx::decode_bmp_pixel_data function, which is used for decoding BMP image data. This vulnerability can lead to a heap-buffer-overflow when reading data, potentially resulting in a crash or arbitrary code execution.
Vulnerability Detail
The vulnerability originates from a heap-buffer-overflow in the Gfx::decode_bmp_pixel_data function of SerenityOS. When processing BMP image data, the function fails to properly validate the input, leading to a buffer overflow. This can be exploited by an attacker to overwrite adjacent memory and potentially execute arbitrary code or cause a denial-of-service condition. The issue has been reported in the OSS-Fuzz project, and more details can be found in the provided link.
How To Fix
Minimum fixed version
fd157b9a711dfd908392b2ddbaf13cb0ef292886
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
At the moment, there is no known workaround for this vulnerability. It is crucial to update the SerenityOS package to a patched version as soon as possible.
Conclusion
In conclusion, a heap-buffer-overflow vulnerability has been discovered in the Gfx::decode_bmp_pixel_data function of SerenityOS. This vulnerability can be mitigated by updating the SerenityOS package to a version that includes the fix. It is important to apply the patch as soon as possible to prevent potential crashes or arbitrary code execution. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for serenity →
FAQ
SerenityOS is an open-source operating system that aims to provide a modern and user-friendly interface.
This vulnerability can lead to a heap-buffer-overflow, potentially resulting in a crash or arbitrary code execution.
To fix this vulnerability, update the SerenityOS package to a version that includes the patch for this issue.
No, there is currently no known workaround for this vulnerability.
More information about this vulnerability can be found in the provided OSS-Fuzz report link.
References
Related vulnerabilities
Recent vulnerabilities recorded for serenity.