CVE-2014-8157: Use After Free
oCERT reports an issue in jasper discovered by pyddeh:
"""
jpcdec.c:1204:
dec->numhtiles = JPCCEILDIV(dec->xend - dec->tilexoff, dec->tilewidth); dec->numvtiles = JPCCEILDIV(dec->yend - dec->tileyoff, dec->tileheight); dec->numtiles = dec->numhtiles dec->numvtiles; if (!(dec->tiles = jasmalloc(dec->numtiles sizeof(jpcdectilet)))) { return -1; }
the dec->XXX in JPCCEILDIV are all directly from the codestream, so dec->numtiles can be 0. In that case, the minimum-sized chunk returned by malloc can, depending on the code stream, be used later. I think this can cause the same problems as a use after free. Fix proposal:
if ( dec->numtiles == 0 || !(dec->tiles = jasmalloc(dec->numtiles sizeof(jpcdectilet)))) { return -1; }
"""
Acknowledgement:
Red Hat would like to thank oCERT for reporting this issue. oCERT acknowledges pyddeh as the original reporter.
Other sources
Off-by-one error in the jpcdecprocesssot function in JasPer 1.900.1 and earlier allows remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a crafted JPEG 2000 image, which triggers a heap-based buffer overflow.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2014-8157?
CVE-2014-8157 is considered a security vulnerability with potential implications for system integrity and data confidentiality.
How do I fix CVE-2014-8157?
To resolve CVE-2014-8157, upgrade the Jasper package to version 1.900.2 or later.
Which software is affected by CVE-2014-8157?
CVE-2014-8157 affects the Jasper library on various Linux distributions including specific versions of Red Hat, Debian, and openSUSE.
What are the potential impacts of CVE-2014-8157?
CVE-2014-8157 may lead to denial of service or arbitrary code execution if exploited.
What is the first step I should take after identifying CVE-2014-8157 on my system?
Immediately apply security patches or update the affected Jasper package to the recommended version to mitigate risks.