Bug 709672 - Stack buffer overflow in gdevpsfx.c type1_callsubr(): unbounded ipstack push in pdfwrite Type 1->2 font converter (all versions since 8.00, unfixed in master)
Summary: Stack buffer overflow in gdevpsfx.c type1_callsubr(): unbounded ipstack push ...
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Security (public) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-08-25 03:15 UTC by lanlanwhh
Modified: 2026-10-01 08:32 UTC (History)
9 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Ken Sharp 2026-08-25 06:59:32 UTC
You need to attach the specimen file to this bug report.
Comment 2 lanlanwhh 2026-08-25 07:31:48 UTC
Created attachment 28495 [details]
PoC PostScript: inline Type 1 font, 20-level chained callsubr nesting, crashes pdfwrite
Comment 3 Ken Sharp 2026-08-25 13:38:35 UTC
Thanks for the report.

I've chosen to fix this slightly differently by using the defined macro in the font parsing loop rather than in the callsubr function, because this better matches the pattern of 'normal' usage. As such the commit is attributed to me, not you; if I've made a mistake the blame should go to me.

I have mentioned you in the commit log using your Bugzilla ID.

This report has now been changed to 'IN_PROGRESS', when a release is available with this commit included the status will be changed to 'FIXED'. Shortly after that (a few days) we will change the Product to 'Security (public)' which will make it accessible to all.
Comment 4 zdohnal 2026-10-01 08:32:18 UTC
This got CVE id by VulDB CNA as CVE-2026-103226 .