CWE
416 415
Advisory Published
CVE Published
Updated

CVE-2015-5221: Use After Free

First published: Fri Aug 21 2015(Updated: )

A use-after-free which leads to double-free vulnerability was found in Jasper JPEG-2000 library, in src/libjasper/mif/mif_cod.c file. 553 case MIF_HSAMP: 554 cmpt-&gt;sampperx = atoi(jas_tvparser_getval(tvp)); 555 break; 556 case MIF_VSAMP: 557 cmpt-&gt;samppery = atoi(jas_tvparser_getval(tvp)); 558 break; 572 jas_tvparser_destroy(tvp); 573 if (!cmpt-&gt;sampperx || !cmpt-&gt;samppery) { 574 goto error; 575 } 576 if (mif_hdr_addcmpt(hdr, hdr-&gt;numcmpts, cmpt)) { 577 goto error; 578 } 579 return 0; 580 581 error: 582 if (cmpt) { 583 mif_cmpt_destroy(cmpt); 584 } 585 if (tvp) { 586 jas_tvparser_destroy(tvp); 587 } 588 return -1; Both tvp and tvp-&gt;buf are freed by jas_tvparser_destroy(tvp), but if one of the two following branch conditions is taken, a second call to jas_tvparser_destroy(tvp) occurs. It is a use-after-free because before calling free in jas_tvparser_destroy there is a check to tvp-&gt;buf, while tvp could have been freed. Two double free take place just after this check (on tvp-&gt;buf and tvp). Public via: <a href="http://seclists.org/oss-sec/2015/q3/408">http://seclists.org/oss-sec/2015/q3/408</a> Acknowledgements: Name: Josselin Feist

Credit: secalert@redhat.com secalert@redhat.com

Affected SoftwareAffected VersionHow to fix
debian/jasper
redhat/jasper<1.900.2
1.900.2
Fedoraproject Fedora=23
Fedoraproject Fedora=24
Fedoraproject Fedora=25
openSUSE Leap=42.2
openSUSE openSUSE=13.1
openSUSE openSUSE=13.2
Opensuse Project Leap=42.1
Jasper Project Jasper<=1.900.1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Reference Links

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203