Bug 1679544 (CVE-2018-19517)

Summary: CVE-2018-19517 sysstat: Out of bounds read in remap_struct function in sa_common.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, dbaker, jokerman, kasal, msekleta, sthangav, trankin
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sysstat 12.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-27 03:25:43 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: 1679545, 1686622    
Bug Blocks: 1679546    

Description Pedro Sampaio 2019-02-21 11:49:57 UTC
An issue was discovered in sysstat 12.1.1. The remap_struct function in sa_common.c has an out-of-bounds read during a memset call, as demonstrated by sadf.

Upstream issue:

https://github.com/sysstat/sysstat/issues/199

Upstream patch:

https://github.com/sysstat/sysstat/commit/fbc691eaaa10d0bcea6741d5a223dc3906106548

Comment 1 Pedro Sampaio 2019-02-21 11:50:06 UTC
Created sysstat tracking bugs for this issue:

Affects: fedora-all [bug 1679545]

Comment 2 Riccardo Schirone 2019-03-07 21:14:07 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 newer version of the package.

Comment 3 Riccardo Schirone 2019-03-07 21:17:23 UTC
The vulnerable function, remap_struct, was introduced upstream with the following commit in version v11.7.1:
https://github.com/sysstat/sysstat/commit/65ac30359e49ee717397e39950d7c24a6610d57c