BYVoid OpenCC Heap-Based Buffer Overflow Vulnerability in MaxMatchSegmentation Function
Vulnerability
A heap-based buffer overflow vulnerability has been identified in BYVoid OpenCC versions prior to 1.1.9. The issue arises in the MaxMatchSegmentation function within the file src/MaxMatchSegmentation.cpp. This vulnerability is triggered by improper handling of truncated UTF-8 input, leading to out-of-bounds reads. The vulnerability requires local execution to exploit.
Impact
Exploitation of this vulnerability causes a heap-based buffer overflow, where the application reads beyond the allocated memory buffer. This type of vulnerability can potentially be exploited to manipulate memory, leading to arbitrary code execution or other malicious outcomes.
Reproduction
The vulnerability can be reproduced by building OpenCC with release optimization and AddressSanitizer (ASan) enabled. After compiling the OpenCC harness with ASan, the application can be run with a crafted input file that triggers the buffer overflow. The ASan report will indicate the heap-buffer-overflow error, confirming the vulnerability.
Remediation
Users are advised to update to the patched version of BYVoid OpenCC. The patch is available in the commit 345c9a50ab07018f1b4439776bad78a0d40778ec on the official OpenCC GitHub repository.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
