Bug 16860 - mkfontscale segfaults on /usr/share/fonts/default/ghostscript
Summary: mkfontscale segfaults on /usr/share/fonts/default/ghostscript
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 5
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: has_procedure MGA5-32-OK MGA5-64-OK a...
Keywords: PATCH, UPSTREAM, validated_update
Depends on:
Blocks:
 
Reported: 2015-09-30 05:45 CEST by w unruh
Modified: 2015-10-09 20:48 CEST (History)
5 users (show)

See Also:
Source RPM: mkfontscale
CVE:
Status comment:


Attachments
strace mkfontscale /usr/share/fonts/default/ghostscript (6.18 KB, text/plain)
2015-09-30 05:54 CEST, w unruh
Details

Description w unruh 2015-09-30 05:45:11 CEST
Description of problem:
mkfontscale  /usr/share/fonts/default/ghostscript
Segmentation fault


Version-Release number of selected component (if applicable):


How reproducible: Always



Reproducible: 

Steps to Reproduce:
Comment 1 w unruh 2015-09-30 05:54:41 CEST
Created attachment 7072 [details]
strace mkfontscale /usr/share/fonts/default/ghostscript

Here is the strace. 
While it is possible that one should not run mkfontscale on the ghostscript fonts, mkfont should NOT SegFault.
Comment 2 w unruh 2015-09-30 06:39:25 CEST
Found the patch which works to prevent the segfault on ghostscript fonts.
Have tested it and it works. (the fonts have no family names or weights)
https://bugs.freedesktop.org/attachment.cgi?id=113951

The following patch 113952 I have not tested. This apparently substitutes the 
Font name for the Family name if the latter does not exist.
Comment 3 w unruh 2015-09-30 06:48:38 CEST
The bug report for which those are the patches is

https://bugs.freedesktop.org/show_bug.cgi?id=89409
Comment 4 Samuel Verschelde 2015-09-30 09:29:43 CEST
Thanks for the report.

Unfortunately there is no dedicated maintainer for this package, though I'm adding two packages in CC who updated it at some point.

Maybe you should consider joining the packager team so that you could fix some bugs yourself? https://wiki.mageia.org/en/Becoming_a_Mageia_Packager

Keywords: (none) => PATCH, UPSTREAM
CC: (none) => luigiwalser, thierry.vignaud

Comment 5 David Walser 2015-09-30 15:12:40 CEST
Actually there's two patches in the fdo bug; I'll add them soon.

Also, the fonts it's breaking on are buggy and RedHat removed them:
https://bugzilla.redhat.com/show_bug.cgi?id=707007

I've done the same in Cauldron.
Comment 6 David Walser 2015-09-30 16:18:49 CEST
Thanks for the report!

Patched packages uploaded for Mageia 5 and Cauldron.

Testing procedure in Comment 0 (ghostscript-fonts must be installed).

Advisory:
----------------------------------------

The mkfontscale program has been patched to not crash on certain buggy fonts,
such as the Hershey fonts included in the ghostscript-fonts package
(fdo#89409).

References:
https://bugs.freedesktop.org/show_bug.cgi?id=89409
----------------------------------------

Updated packages in core/updates_testing:
----------------------------------------
mkfontscale-1.1.2-1.1.mga5

from mkfontscale-1.1.2-1.1.mga5.src.rpm

Hardware: x86_64 => All
Assignee: bugsquad => qa-bugs

David Walser 2015-09-30 16:19:35 CEST

Whiteboard: (none) => has_procedure

Comment 7 w unruh 2015-09-30 18:59:13 CEST
I can confirm that the Hershey fonts do not work in Abiword. (Besides being ugly and unreadable, their carriage return does not do a linefeed.)
 And removing the hr* fonts from /usr/share/fonts/default/ghostscript removes the Hershey fonts from Abiword.
Comment 8 David Walser 2015-10-01 23:19:41 CEST
Verified the fixed mkfontscale works on Mageia 5 i586.

Whiteboard: has_procedure => has_procedure MGA5-32-OK

Comment 9 Yann Cantin 2015-10-04 13:37:56 CEST
mga5 x86_64

mkfontscale-1.1.2-1.mga5.x86_64 :
# mkfontscale /usr/share/fonts/default/ghostscript : segfault


Installed packages :
mkfontscale-1.1.2-1.1.mga5.x86_64.rpm

# mkfontscale /usr/share/fonts/default/ghostscript
Couldn't determine full name for hrpldi.pfa
Couldn't determine weight for hrpldi.pfa
 etc.

no segfault

Update OK.

CC: (none) => yann.cantin
Whiteboard: has_procedure MGA5-32-OK => has_procedure MGA5-32-OK MGA5-64-OK

Comment 10 Rémi Verschelde 2015-10-04 14:25:58 CEST
Thanks, feel free to validated the update when it has both MGA5_*_OK Yann (by adding the "validated_update" keyword).
Dave Hodgins 2015-10-09 01:45:41 CEST

Keywords: (none) => validated_update
Whiteboard: has_procedure MGA5-32-OK MGA5-64-OK => has_procedure MGA5-32-OK MGA5-64-OK advisory
CC: (none) => davidwhodgins, sysadmin-bugs

Comment 11 Mageia Robot 2015-10-09 20:48:44 CEST
An update for this issue has been pushed to Mageia Updates repository.

http://advisories.mageia.org/MGAA-2015-0148.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.