Bug 27746 - sam2p missing update for security issue CVE-2017-1462[89], CVE-2017-1463[0167], CVE-2017-16663, CVE-2018-7487, CVE-2018-755[134], CVE-2018-12578, CVE-2018-12601
Summary: sam2p missing update for security issue CVE-2017-1462[89], CVE-2017-1463[0167...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL: https://nvd.nist.gov/vuln/detail/CVE-...
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-12-04 23:49 CET by Zombie Ryushu
Modified: 2020-12-17 14:12 CET (History)
7 users (show)

See Also:
Source RPM: sam2p-0.49.3-2.mga7.src.rpm
CVE:
Status comment:


Attachments
Series of poc tests before sam2p update (6.21 KB, text/plain)
2020-12-15 15:13 CET, Len Lawrence
Details
Results of poc tests after update of sam2p (2.19 KB, text/plain)
2020-12-15 16:23 CET, Len Lawrence
Details
Series of poc tests on sam2p before update (6.21 KB, text/plain)
2020-12-15 16:25 CET, Len Lawrence
Details

Description Zombie Ryushu 2020-12-04 23:49:52 CET
There is a heap-based buffer overflow in ReadImage in input-tga.ci in sam2p 0.49.4 that leads to a denial of service or possibly unspecified other impact.
Zombie Ryushu 2020-12-05 02:46:14 CET

CVE: (none) => CVE-2018-12601

Comment 1 David Walser 2020-12-05 05:44:38 CET
Debian-LTS has issued an advisory on August 10, 2018:
https://www.debian.org/lts/security/2018/dla-1463

I wasn't tracking their advisories at the time, so I missed it.

Fix for the issue Zombie reported is here:
https://github.com/pts/sam2p/commit/8b2b7151991e07ef262857c2325e95c3b2867f80

Whiteboard: (none) => MGA7TOO
Summary: sam2p security vulnerability CVE-2018-12601 => sam2p missing update for security issue CVE-2018-12578 and CVE-2018-12601
Source RPM: sam2p-0.49.3-2.mga7.src => sam2p-0.49.3-2.mga7.src.rpm

Comment 2 Aurelien Oudelet 2020-12-07 10:31:20 CET
Hi, thanks for reporting this bug.
As there is no maintainer for this package I added the committers in CC.

(Please set the status to 'assigned' if you are working on it)

CC: (none) => cjw, jani.valimaa, olav, ouaurelien

Aurelien Oudelet 2020-12-07 10:31:30 CET

Assignee: bugsquad => pkg-bugs

Nicolas Salguero 2020-12-08 10:00:01 CET

Summary: sam2p missing update for security issue CVE-2018-12578 and CVE-2018-12601 => sam2p missing update for security issue CVE-2017-1462[89], CVE-2017-1463[0167], CVE-2017-16663, CVE-2018-7487, CVE-2018-755[134], CVE-2018-12578, CVE-2018-12601
CC: (none) => nicolas.salguero

Comment 3 Nicolas Salguero 2020-12-08 10:07:57 CET
Suggested advisory:
========================

The updated package fixes security vulnerabilities:

In sam2p 0.49.3, a heap-based buffer overflow exists in the pcxLoadImage24 function of the file in_pcx.cpp. (CVE-2017-14628)

In sam2p 0.49.3, the in_xpm_reader function in in_xpm.cpp has an integer signedness error, leading to a crash when writing to an out-of-bounds array element. (CVE-2017-14629)

In sam2p 0.49.3, an integer overflow exists in the pcxLoadImage24 function of the file in_pcx.cpp, leading to an invalid write operation. (CVE-2017-14630)

In sam2p 0.49.3, the pcxLoadRaster function in in_pcx.cpp has an integer signedness error leading to a heap-based buffer overflow. (CVE-2017-14631)

Because of an integer overflow in sam2p 0.49.3, a loop executes 0xffffffff times, ending with an invalid read of size 1 in the Image::Indexed::sortPal function in image.cpp. However, this also causes memory corruption because of an attempted write to the invalid d[0xfffffffe] array element. (CVE-2017-14636)

In sam2p 0.49.3, there is an invalid read of size 2 in the parse_rgb function in in_xpm.cpp. However, this can also cause a write to an illegal address. (CVE-2017-14637)

In sam2p 0.49.4, there are integer overflows (with resultant heap-based buffer overflows) in input-bmp.ci in the function ReadImage, because "width * height" multiplications occur unsafely. (CVE-2017-16663)

There is a heap-based buffer overflow in the LoadPCX function of in_pcx.cpp in sam2p 0.49.4. A Crafted input will lead to a denial of service or possibly unspecified other impact. (CVE-2018-7487)

There is an invalid free in MiniPS::delete0 in minips.cpp that leads to a Segmentation fault in sam2p 0.49.4. A crafted input will lead to a denial of service or possibly unspecified other impact. (CVE-2018-7551)

There is a heap-based buffer overflow in the pcxLoadRaster function of in_pcx.cpp in sam2p 0.49.4. A crafted input will lead to a denial of service or possibly unspecified other impact. (CVE-2018-7553)

There is an invalid free in ReadImage in input-bmp.ci that leads to a Segmentation fault in sam2p 0.49.4. A crafted input will lead to a denial of service or possibly unspecified other impact. (CVE-2018-7554)

There is a heap-based buffer overflow in bmp_compress1_row in appliers.cpp in sam2p 0.49.4 that leads to a denial of service or possibly unspecified other impact. (CVE-2018-12578)

There is a heap-based buffer overflow in ReadImage in input-tga.ci in sam2p 0.49.4 that leads to a denial of service or possibly unspecified other impact. (CVE-2018-12601)

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14628
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14629
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14630
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14631
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14636
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14637
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-16663
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7487
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7551
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7553
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-7554
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12578
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-12601
https://www.debian.org/lts/security/2018/dla-1463
========================

Updated package in core/updates_testing:
========================
sam2p-0.49.3-2.1.mga7

from SRPM:
sam2p-0.49.3-2.1.mga7.src.rpm

Version: Cauldron => 7
Status: NEW => ASSIGNED
CVE: CVE-2018-12601 => (none)
Assignee: pkg-bugs => qa-bugs
Whiteboard: MGA7TOO => (none)

Comment 4 David Walser 2020-12-08 11:12:09 CET
Where did you find all of those additional CVEs?
Comment 5 Nicolas Salguero 2020-12-08 11:21:00 CET
In the tarball from Debian (http://security.debian.org/debian-security/pool/updates/main/s/sam2p/sam2p_0.49.2-3+deb8u3.debian.tar.xz).  I had to slightly modify a few of them because the version in Debian is 0.49.2.
Comment 7 Len Lawrence 2020-12-15 12:42:09 CET
Testing this for mga7, x64.  In the process of assembling and testing poc files.  Shall attach test reports in due course.

CC: (none) => tarazed25

Comment 8 Len Lawrence 2020-12-15 15:13:47 CET
Created attachment 12083 [details]
Series of poc tests before sam2p update
Comment 9 Len Lawrence 2020-12-15 16:23:12 CET
Created attachment 12084 [details]
Results of poc tests after update of sam2p
Comment 10 Len Lawrence 2020-12-15 16:25:41 CET
Created attachment 12085 [details]
Series of poc tests on sam2p before update

Attachment 12083 is obsolete: 0 => 1

Comment 11 Len Lawrence 2020-12-15 17:02:21 CET
Ran poc tests before and after the update.  Two possible failures.

Used sam2p to transform input images into various output formats.$ sam2p jessica_1.tif PDF: jessica.pdf
This is sam2p 0.49.3.
Available Loaders: PS PDF JAI PNG JPEG TIFF PNM BMP LBM XPM PCX TGA.
Available Appliers: XWD Meta Empty BMP PNG TIFF6 TIFF6-JAI JPEG-JAI JPEG PNM XPM PSL1C PSL23+PDF PSL2+PDF-JAI P-TrOpBb.
sam2p: Notice: job: read InputFile: jessica_1.tif
sam2p: Notice: writeTTT: using template: p02bb
sam2p: Notice: applyProfile: applied OutputRule #22 using applier PSL23+PDF
sam2p: Notice: job: written OutputFile: jessica.pdf
Success.
$ xpdf jessica.pdf
<Works fine>
$ sam2p Glenview.png EPS: glenview.ps
$ gs glenview.ps
<Looks OK>
$ sam2p Pleiades_Fraile.jpg BMP: pleiades.bmp
$ display pleiades.bmp
<Perfect>

The conversions work.  Giving this the OK.

Whiteboard: (none) => MGA7-64-OK

Comment 12 Aurelien Oudelet 2020-12-17 10:49:49 CET
Validating
Advisory pushed to SVN.

Keywords: (none) => advisory, validated_update
CC: (none) => sysadmin-bugs

Comment 13 Mageia Robot 2020-12-17 14:12:11 CET
An update for this issue has been pushed to the Mageia Updates repository.

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

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


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