Bug 27453 - freetype2 new security issue CVE-2020-15999
Summary: freetype2 new security issue CVE-2020-15999
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-10-20 04:07 CEST by David Walser
Modified: 2020-10-20 20:13 CEST (History)
5 users (show)

See Also:
Source RPM: freetype2-2.9.1-4.mga7.src.rpm
CVE: CVE-2020-15999
Status comment:


Attachments

Description David Walser 2020-10-20 04:07:46 CEST
A security issue in freetype2 has been announced today (October 19):
https://savannah.nongnu.org/bugs/?59308

It was fixed in this commit:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=a3bab162b2ae616074c8877a04556932998aeacd

and there's supposed to be a new release containing the fix tomorrow.

This issue is reportedly being exploited in the wild.

Mageia 7 is probably also affected.
David Walser 2020-10-20 04:07:53 CEST

Whiteboard: (none) => MGA7TOO

Comment 1 David Walser 2020-10-20 15:05:59 CEST
freetype2-2.10.4-1.mga8 uploaded for Cauldron by Stig-Ørjan.

Arch has issued an advisory for this today (October 20):
https://security.archlinux.org/ASA-202010-10/generate

Version: Cauldron => 7
Whiteboard: MGA7TOO => (none)
CC: (none) => smelror
Assignee: bugsquad => pkg-bugs

Comment 2 Nicolas Salguero 2020-10-20 15:34:01 CEST
Suggested advisory:
========================

The updated packages fix a security vulnerability:

A heap buffer overflow has been found in freetype2 before 2.10.4.
Malformed TTF files with PNG sbit glyphs can cause a heap buffer
overflow in Load_SBit_Png as libpng uses the original 32-bit values,
which are saved in png_struct. If the original width and/or height are
greater than 65535, the allocated buffer won't be able to fit the
bitmap. (CVE-2020-15999)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15999
https://savannah.nongnu.org/bugs/?59308
https://security.archlinux.org/ASA-202010-10/generate
========================

Updated packages in core/updates_testing:
========================
lib(64)freetype6-2.9.1-4.1.mga7
lib(64)freetype2-devel-2.9.1-4.1.mga7
freetype2-demos-2.9.1-4.1.mga7

from SRPM:
freetype2-2.9.1-4.1.mga7.src.rpm

Updated packages in tainted/updates_testing:
========================
lib(64)freetype6-2.9.1-4.1.mga7.tainted
lib(64)freetype2-devel-2.9.1-4.1.mga7.tainted
freetype2-demos-2.9.1-4.1.mga7.tainted

from SRPM:
freetype2-2.9.1-4.1.mga7.tainted.src.rpm

CC: (none) => nicolas.salguero
Source RPM: freetype2-2.10.3-1.mga8.src.rpm => freetype2-2.9.1-4.mga7.src.rpm
Status: NEW => ASSIGNED
Assignee: pkg-bugs => qa-bugs
CVE: (none) => CVE-2020-15999

Comment 3 Dave Hodgins 2020-10-20 17:35:27 CEST
Advisory committed to svn.

Testing of tainted version complete by restarted X11 after installing the update
and confirming opera, firefox, etc still display text ok.

Will test core version shortly.

CC: (none) => davidwhodgins
Keywords: (none) => advisory

Comment 4 Dave Hodgins 2020-10-20 17:42:48 CEST
Disabled the tainted repos, used rpm -e --nodeps to uninstall the packages and
then reinstalled them. Restarted x11 and confirmed applications are displaying
text ok.

Validating the update.

CC: (none) => sysadmin-bugs
Whiteboard: (none) => MGA7-64-OK
Keywords: (none) => validated_update

Comment 5 Len Lawrence 2020-10-20 17:47:32 CEST
With reference to comment 4:

This is a sticky one.  The tainted versions were already installed.
The PoC was run but the result was not helpful without an ASAN framework.

Trying to remove the tainted packages in favour of the free version threatened to break the system so --force is not an option.

$ urpmq --whatrequires lib64freetype6 | uniq | wc -l
269

How should QA handle this type of situation, for future reference?  Vague memory of something similar in the case of vlc.

CC: (none) => tarazed25

Comment 6 Len Lawrence 2020-10-20 17:50:06 CEST
Thanks Dave - comment 4 is the solution.
Comment 7 Dave Hodgins 2020-10-20 17:53:05 CEST
I wasn't aware there was a poc available. If it's not obvious how to test it,
I'm ok with skipping testing the poc for a critical security update.
Comment 8 Len Lawrence 2020-10-20 18:02:39 CEST
Yes, the PoC does not help much.  Before updates:

CVE-2020-15999
https://savannah.nongnu.org/bugs/?59308
$ ftview 150 font.ttf
Execution completed successfully.
Fails = 4

Upstream ASAN version resulted in an Abort.
Comment 9 Mageia Robot 2020-10-20 18:23:26 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2020-0389.html

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

Comment 10 David Walser 2020-10-20 20:13:45 CEST
Ubuntu has issued an advisory for this today (October 20):
https://ubuntu.com/security/notices/USN-4593-1

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