RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1485287 - There are lots of memory leaks in JasPer which is trigged in function jas_strdup().
Summary: There are lots of memory leaks in JasPer which is trigged in function jas_str...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: jasper
Version: 7.5-Alt
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Josef Ridky
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: CVE-2017-13748
TreeView+ depends on / blocked
 
Reported: 2017-08-25 09:31 UTC by owl337
Modified: 2020-02-28 10:28 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-28 10:28:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Triggered by "./imginfo -f POC9" (312 bytes, application/x-rar)
2017-08-25 09:31 UTC, owl337
no flags Details

Description owl337 2017-08-25 09:31:58 UTC
Created attachment 1318072 [details]
Triggered by  "./imginfo -f POC9"

Description of problem:

There are lots of memory leaks in JasPer which is trigged in function jas_strdup().

Version-Release number of selected component (if applicable):

<= latest version

How reproducible:

./imginfo -f POC9

Steps to Reproduce:

Description:

The gdb debugging information is listed below:
(gdb) set args POC9
(gdb) r 
warning: ignoring unknown marker segment (0xff76)
type = 0xff76 (UNKNOWN); len = 20;10 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 RCT requires all components have the same domain
error: cannot decode code stream
cannot load image

=================================================================
==104593==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 16512 byte(s) in 86 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f40793576db  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e6db)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)
    #2 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)

Indirect leak of 10922744 byte(s) in 15458 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f40793576db  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e6db)

Indirect leak of 905976 byte(s) in 10296 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)

Indirect leak of 417584 byte(s) in 73 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f40793576db  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e6db)
    #2 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 246144 byte(s) in 34 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f40793576db  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e6db)
    #2 0x7f40793b005f  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xd705f)
    #3 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 246144 byte(s) in 34 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f40793576db  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e6db)
    #2 0x7f40793afff5  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xd6ff5)
    #3 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 816 byte(s) in 34 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)
    #2 0x7f40793afff5  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xd6ff5)
    #3 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 816 byte(s) in 34 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)
    #2 0x7f40793b005f  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xd705f)
    #3 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 48 byte(s) in 3 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079464228  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x18b228)
    #2 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x4b9278  (/home/icy/secreal/jasper/install_asan/bin/imginfo+0x4b9278)
    #1 0x7f4079357353  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0x7e353)
    #2 0x7f40793bd4d2  (/home/icy/secreal/jasper/install_asan/lib/libjasper.so.4+0xe44d2)

SUMMARY: AddressSanitizer: 12757032 byte(s) leaked in 26055 allocation(s).

Trigged in:
jas_strdup (s=0x7ffff7ba0600 <.str.1> "My Image Format (MIF)")
    at /home/icy/secreal/jasper/src/libjasper/base/jas_string.c:91
91		if (!(p = jas_malloc(n))) {
The programmer has applied for the memory but has not been released.


Actual results:

crash

Expected results:

crash

Additional info:


Credits:

Credits:

This vulnerability is detected by team OWL337, with our custom fuzzer collAFL. Please contact ganshuitao   and chaoz.cn if you need more info about the team, the tool or the vulnerability.

Comment 2 Josef Ridky 2017-08-25 10:37:39 UTC
Thank you for taking the time to report this issue to us. We appreciate the feedback and use reports such as this one to guide our efforts at improving our products. That being said, this bug tracking system is not a mechanism for requesting support, and we are not able to guarantee the timeliness or suitability of a resolution.

If this issue is critical or in any way time sensitive, please raise a ticket through the regular Red Hat support channels to ensure it receives the proper attention and prioritization to assure a timely resolution. 

For information on how to contact the Red Hat production support team, please visit:
    https://www.redhat.com/support/process/production/#howto

For proper identification of issue are required properly filled following information:

- Description of problem
- Version-Release number of selected component (if applicable)
- Steps to Reproduce
- Actual results
- Expected results
- Additional info

Comment 3 Tomas Hoger 2017-12-07 14:43:30 UTC
jas_strdup() is red herring and irrelevant, see upstream bug for more info:

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

Comment 4 Josef Ridky 2020-02-28 10:28:58 UTC
This vulnerability was evaluated by the sub-system, taking into account the kind of the component, and its use cases. It was not considered as a priority for the next release, so it's being closed now as WONTFIX. Feel free to re-open the bug if there is a business reason to deliver a fix for this issue, and contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com


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