Bug 1629985

Summary: mgetty: Out-of-bound access in putwhitespan() function g3/g32pbm.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, dbaker, jokerman, msekleta, rschiron, sthangav, trankin, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mgetty 1.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-22 09:49:42 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: 1629986    
Bug Blocks: 1629987    
Attachments:
Description Flags
upstream patch none

Description Pedro Sampaio 2018-09-17 17:50:29 UTC
When converting pbm files using g3/pbm2g3.c, out of bounds accesses can occur with malformed input files in putwhitespan().

References:

https://www.x41-dsec.de/lab/advisories/x41-2018-007-mgetty

Comment 1 Pedro Sampaio 2018-09-17 17:50:58 UTC
Created mgetty tracking bugs for this issue:

Affects: fedora-all [bug 1629986]

Comment 2 Riccardo Schirone 2018-09-24 08:44:32 UTC
The main function in g3/pbm2g3.c does not check whether `xsize` and `ysize` variables are negative, which result in an out-of-bounds read in putwhitespan() when called from convert_pbm().

Comment 3 Riccardo Schirone 2018-09-24 08:48:34 UTC
Created attachment 1486347 [details]
upstream patch

This patch was extracted from mgetty-1.2.1.

Comment 4 Riccardo Schirone 2018-10-22 09:49:42 UTC
Closing as NOTABUG as it was not deemed to be CVE-worthy.

Comment 5 Fedora Update System 2019-02-27 01:15:33 UTC
mgetty-1.1.37-10.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2019-02-27 03:28:23 UTC
mgetty-1.1.37-11.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.