Stack buffer overflow in BDF file parsing

Bug #684952 reported by Louis Simard
260
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fontforge (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: fontforge

[Description taken from Red Hat bug [3]]

Ulrik Persson reported a stack-based buffer overflow
flaw in the way FontForge font editor processed certain
Bitmap Distribution Format (BDF) font files, with
specially-crafted value of the CHARSET_REGISTRY header.
A remote attacker could create a specially-crafted BDF
font file and trick a local, unsuspecting user into
opening it in FontForge, which could lead to fontforge
executable crash or, potentially, arbitrary code execution
with the privileges of the user running the executable.

References:
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=605537

Public PoC:
[2]
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=fontforge-overflow.txt;att=1;bug=605537

[3] Red Hat bug: https://bugzilla.redhat.com/show_bug.cgi?id=659359

Flaw severity note:
On systems with compile time buffer checks (FORTIFY_SOURCE)
feature enabled, the impact of this flaw is mitigated to
be only crash.

Tags: patch

CVE References

Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

Attached is a unified format patch which should copy strings correctly within
their allocated buffers, for many fields in the BDF file format, including
CHARSET_REGISTRY.

I have tested FontForge before and after the patch; it does not crash
predictably anymore.

visibility: private → public
Revision history for this message
Louis Simard (louis-simard-deactivatedaccount) wrote :

FontForge in Natty, Maverick and Lucid are affected by this vulnerability.

Since the package is compiled with stack smashing detection enabled, it may not be exploitable for arbitrary code execution via this vulnerability.

Kees Cook (kees)
security vulnerability: yes → no
security vulnerability: no → yes
tags: added: patch
Changed in fontforge (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This was fixed in 0.0.20100501-4ubuntu1.

Changed in fontforge (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.