Fix CVE-2018-10194: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-10194 https://bugs.ghostscript.com/show_bug.cgi?id=699255 Patch copied from upstream source repository: https://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=39b1e54b2968620723bf32e96764c88797714879 From 39b1e54b2968620723bf32e96764c88797714879 Mon Sep 17 00:00:00 2001 From: Ken Sharp Date: Wed, 18 Apr 2018 15:46:32 +0100 Subject: [PATCH] pdfwrite - Guard against trying to output an infinite number Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf" The file uses an enormous parameter to xyxhow, causing an overflow in the calculation of text positioning (value > 1e39). Since this is basically a nonsense value, and PostScript only supports real values up to 1e38, this patch follows the same approach as for a degenerate CTM, and treats it as 0. Adobe Acrobat Distiller throws a limitcheck error, so we could do that instead if this approach proves to be a problem. --- devices/vector/gdevpdts.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devices/vector/gdevpdts.c b/devices/vector/gdevpdts.c index 848ad781f..172fe6bc3 100644 --- a/devices/vector/gdevpdts.c +++ b/devices/vector/gdevpdts.c @@ -103,9 +103,14 @@ append_text_move(pdf_text_state_t *pts, double dw) static int set_text_distance(gs_point *pdist, double dx, double dy, const gs_matrix *pmat) { - int code = gs_distance_transform_inverse(dx, dy, pmat, pdist); + int code; double rounded; + if (dx > 1e38 || dy > 1e38) + code = gs_error_undefinedresult; + else + code = gs_distance_transform_inverse(dx, dy, pmat, pdist); + if (code == gs_error_undefinedresult) { /* The CTM is degenerate. Can't know the distance in user space. -- 2.18.0 /option>
path: root/gnu/build/file-systems.scm
AgeCommit message (Expand)Author
2021-05-04file-systems: Rewrite comment....Tobias Geerinckx-Rice
2021-05-04file-systems: Handle abnormal ‘bcachefs fsck’ exits....Tobias Geerinckx-Rice
2021-04-23file-systems: read-partition-{uuid,label} don't swallow ENOENT & co....Ludovic Courtès
2021-03-10file-systems: 'mount-file-system' preserves the right mount flags....Ludovic Courtès
2021-02-25file-systems: 'mount-file-system' preserves source flags for bind mounts....Ludovic Courtès
2020-12-06file-systems: Fix ‘bcachefs fsck’ exit value logic....Tobias Geerinckx-Rice
2020-11-07file-systems: Add support for bcachefs....Tobias Geerinckx-Rice
2020-10-30file-systems: Allow swap space lookup by UUID/label....Ludovic Courtès
2020-09-07linux-boot: Handle nfs-root device strings....Stefan
2020-07-31file-system: Add mount-may-fail? option....Mathieu Othacehe
2020-07-26file-systems: Add NTFS support....Mathieu Othacehe