Bug 1768970 (CVE-2019-16167)

Summary: CVE-2019-16167 sysstat: memory corruption due to an integer overflow in remap_struct in sa_common.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: kasal, mcascell, msekleta, rskvaril
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sysstat 12.1.6 Doc Type: If docs needed, set a value
Doc Text:
An integer overflow vulnerability was found in sysstat in the way the `sadf` command processes the contents of data files created by the `sar` command. A local attacker could exploit this flaw by creating a specially crafted file with malformed data that, when loaded by a victim, causes the application to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:22:52 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: 1768971, 1790608, 2046688    
Bug Blocks: 1768972    

Description Guilherme de Almeida Suckevicz 2019-11-05 17:01:54 UTC
sysstat before 12.1.6 has memory corruption due to an Integer Overflow in remap_struct() in sa_common.c.

Reference:
https://github.com/sysstat/sysstat/issues/230

Upstream commit:
https://github.com/sysstat/sysstat/commit/edbf507678bf10914e9804ff8a06737fdcb2e781

Comment 1 Guilherme de Almeida Suckevicz 2019-11-05 17:02:06 UTC
Created sysstat tracking bugs for this issue:

Affects: fedora-all [bug 1768971]

Comment 2 Mauro Matteo Cascella 2020-01-13 16:01:15 UTC
Statement:

This issue did not affect the versions of sysstat as shipped with Red Hat Enterprise Linux 5, 6, and 7 as they did not include the vulnerable function, which was introduced in a newer version of the package.

Comment 3 Mauro Matteo Cascella 2020-01-13 16:22:25 UTC
The vulnerable function remap_struct() is used to map structures containing statistics from two different sysstat versions.
This function was introduced upstream in version v11.7.1 with the following commit: https://github.com/sysstat/sysstat/commit/65ac30359e49ee717397e39950d7c24a6610d57c

Comment 11 Product Security DevOps Team 2020-11-04 02:22:52 UTC
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-16167

Comment 12 errata-xmlrpc 2020-11-04 02:34:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2020:4638 https://access.redhat.com/errata/RHSA-2020:4638

Comment 13 errata-xmlrpc 2022-02-22 15:14:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:0633 https://access.redhat.com/errata/RHSA-2022:0633