The calculation of the buffer size was being done with int values, and overflowing that data type. The bug has existed since the creation of the file contrib/japanese/gdevnpdl.c
The calculation of the buffer size was being done with int values, and overflowing that data type. By leaving the total size calculation to the memory manager, the calculation ends up being done in size_t values, and avoiding the overflow in this case, but also meaning the memory manager overflow protection will be effective.
Fixed in ghostpdl-10.05.0
Info: https://bugs.ghostscript.com/show_bug.cgi?id=708133
Patch: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=57291c846334f1585552010faa42d7cb2cbd5c41
Platform | Package | Release Date | Advisory |
---|---|---|---|
Amazon Linux 1 | ghostscript | 2025-04-09 20:55 | ALAS-2025-1967 |
Amazon Linux 2 - Core | ghostscript | 2025-03-26 19:24 | ALAS2-2025-2805 |
Amazon Linux 2023 | ghostscript | 2025-03-26 20:44 | ALAS2023-2025-907 |
Score Type | Score | Vector | |
---|---|---|---|
Amazon Linux | CVSSv3 | 8.4 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |