Bug 1777938 (CVE-2019-19308)
Summary: | CVE-2019-19308 gnome-font-viewer: NULL pointer dereference in text_to_glyphs in sushi-font-widget.c | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Guilherme de Almeida Suckevicz <gsuckevi> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | alexl, cosimo.cecchi, gnome-sig, tiagomatos |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: |
A NULL pointer dereference was discovered in the gnome-font-viewer in the way it deals with fonts without a family name. A user may be tricked into opening a specially crafted font, which could make the gnome-font-viewer crash.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-01-14 14:09:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1777939 | ||
Bug Blocks: | 1777940 |
Description
Guilherme de Almeida Suckevicz
2019-11-28 18:06:24 UTC
Created gnome-font-viewer tracking bugs for this issue: Affects: fedora-all [bug 1777939] Upstream fix: https://gitlab.gnome.org/GNOME/gnome-font-viewer/commit/9661683379806e2bad6a52ce6dde776a33f4f981 While parsing a TTF font file without the name section, function build_strings_for_face() sets the font_name as the result of `g_strconcat(family_name, " ", style_name, NULL)`. Function g_strconcat() concatenates a variable number of arguments until a NULL is found. If the very first argument is NULL, the result is NULL as well. With a specially crafted TTF font file it is possible to make family_name NULL, thus resulting in a NULL font_name which cause a NULL pointer dereference in function text_to_glyphs(), when trying to compute the length of the font_name string. First vulnerable commit: https://gitlab.gnome.org/GNOME/gnome-font-viewer/commit/7da6cf11bc3a00412a9f9e2073509fd640133e49 which was first introduced in upstream version 3.33.4. This commit removes the NULL checks in sushi_font_widget_size_request() and build_strings_for_face() for family_name and font_name, assuming font_name will always be set. However, the commit does not handle the case where family_name is NULL, thus creating this vulnerability. This is barely a real security flaw as gnome-font-viewer is not a service, but just a short living program, which is not really impacted by a single crash that cannot be exploited, as a NULL dereference like this. Statement: This issue did not affect the versions of gnome-font-viewer as shipped with Red Hat Enterprise Linux 7, and 8 as they did not include the vulnerable code. This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2019-19308 |