Bug 1416068 (CVE-2017-5505) - CVE-2017-5505 jasper: Invalid memory read in jas_matrix_asl
Summary: CVE-2017-5505 jasper: Invalid memory read in jas_matrix_asl
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2017-5505
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1406406 1406407 1406409 1434464
Blocks: 1449402
TreeView+ depends on / blocked
 
Reported: 2017-01-24 14:07 UTC by Andrej Nemec
Modified: 2020-12-12 00:47 UTC (History)
16 users (show)

Fixed In Version: jasper 2.0.17
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-12 00:47:05 UTC


Attachments (Terms of Use)

Description Andrej Nemec 2017-01-24 14:07:04 UTC
A vulnerability was found in jasper. A crafted file could cause an invalid memory read.

References:

http://seclists.org/oss-sec/2017/q1/109

Upstream bug:

https://github.com/mdadams/jasper/issues/88

Comment 1 Andrej Nemec 2017-01-24 14:24:11 UTC
Created mingw-jasper tracking bugs for this issue:

Affects: epel-7 [bug 1406409]

Comment 2 Andrej Nemec 2017-01-24 14:24:24 UTC
Created jasper tracking bugs for this issue:

Affects: epel-5 [bug 1406406]

Comment 3 Tomas Hoger 2017-03-02 13:15:31 UTC
Original reporter's advisory:

https://blogs.gentoo.org/ago/2017/01/16/jasper-invalid-memory-read-in-jas_matrix_asl-jas_seq-c/

Relevant info from the advisory:

Another round of fuzzing shows that a crafted image causes an invalid memory read.

The complete ASan output:

# imginfo -f $FILE
==26941==ERROR: AddressSanitizer: SEGV on unknown address 0x62c80000a400 (pc 0x7f28c74e48ee bp 0x7ffcececdb70 sp 0x7ffcececdaf0 T0)
==26941==The signal is caused by a READ memory access.
    #0 0x7f28c74e48ed in jas_matrix_asl /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/base/jas_seq.c:376:11
    #1 0x7f28c7545f0e in jpc_dec_tiledecode /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/jpc/jpc_dec.c:1107:6
    #2 0x7f28c7536cdf in jpc_dec_process_sod /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/jpc/jpc_dec.c:658:7
    #3 0x7f28c75406b3 in jpc_dec_decode /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/jpc/jpc_dec.c:425:10
    #4 0x7f28c75406b3 in jpc_decode /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/jpc/jpc_dec.c:262
    #5 0x7f28c74a2b84 in jas_image_decode /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/base/jas_image.c:444:16
    #6 0x509eed in main /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/appl/imginfo.c:219:16
    #7 0x7f28c65aa61f in __libc_start_main /var/tmp/portage/sys-libs/glibc-2.22-r4/work/glibc-2.22/csu/libc-start.c:289
    #8 0x419978 in _init (/usr/bin/imginfo+0x419978)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /tmp/portage/media-libs/jasper-1.900.27/work/jasper-1.900.27/src/libjasper/base/jas_seq.c:376:11 in jas_matrix_asl
==26941==ABORTING

Affected version: 1.900.27

The issue is still not fixed in the latest upstream 2.0.11.

Comment 5 Tomas Hoger 2017-03-02 13:18:12 UTC
This problem can only be reproduced with Jasper versions including this upstream commit:

https://github.com/mdadams/jasper/commit/d42b2388

It was first included in upstream version 1.900.25.  Earlier versions do not seem to be affected.

Comment 6 Tomas Hoger 2020-12-11 21:45:46 UTC
Upstream commit:

https://github.com/jasper-software/jasper/commit/e2f2e5f4022baef2386eec25c57b63debfe4cb20

Fixed upstream in jasper 2.0.17.

Comment 7 Product Security DevOps Team 2020-12-12 00:47:05 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-2017-5505


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