Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 1318062[details]
Triggered by "./imginfo -f POC3"
Description of problem:
There is a reachable assertion abort in function jpc_dequantize() of JasPer that will lead to remote denial of service attack.
Version-Release number of selected component (if applicable):
<= latest version
How reproducible:
./imginfo -f POC3
Steps to Reproduce:
The output information is as follows:
$ ./imginfo -f POC3
type = 0xff76 (UNKNOWN); len = 20;10 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 imginfo: /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883: void jpc_dequantize(jas_matrix_t *, jpc_fix_t): Assertion `absstepsize >= 0' failed.
Aborted (core dumped)
The gdb debugging information is listed below:
(gdb) set args POC3
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/icy/secreal/jasper/install/bin/imginfo -f fuzz/output/crashes/id\:000137\,sig\:06\,src\:000444\,op\:flip4\,pos\:127
s 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
Breakpoint 3, jpc_dec_tiledecode (dec=<optimized out>, tile=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1107
1107 jpc_dequantize(band->data, band->absstepsize);
(gdb) s
jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883
1883 assert(absstepsize >= 0);
(gdb) bt
#0 jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883
#1 jpc_dec_tiledecode (dec=<optimized out>, tile=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1107
#2 0x00007ffff7b4535b in jpc_dec_process_sod (dec=<optimized out>, ms=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:657
#3 0x00007ffff7b49ceb in jpc_dec_decode (dec=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:424
#4 jpc_decode (in=<optimized out>, optstr=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:261
#5 0x00007ffff7b2d030 in jp2_decode (in=<optimized out>, optstr=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/jp2/jp2_dec.c:218
#6 0x00007ffff7b059ce in jas_image_decode (in=<optimized out>, fmt=<optimized out>, optstr=<optimized out>)
at /home/icy/secreal/jasper/src/libjasper/base/jas_image.c:442
#7 0x0000000000401bab in main (argc=<optimized out>, argv=<optimized out>)
at /home/icy/secreal/jasper/src/appl/imginfo.c:238
(gdb) n
imginfo: /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883: void jpc_dequantize(jas_matrix_t *, jpc_fix_t): Assertion `absstepsize >= 0' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff71f8428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808)
at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883
1883 assert(absstepsize >= 0);
(gdb) list
1878 {
1879 int i;
1880 int j;
1881 int t;
1882
1883 assert(absstepsize >= 0);
1884 if (absstepsize == jpc_inttofix(1)) {
1885 return;
1886 }
1887
Actual results:
crash
Expected results:
crash
Additional info:
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.
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
The assertion failure in jpc_dequantize() was previously reported as CVE-2016-9397 (bug 1396979) and is tracked upstream via this issue report:
https://github.com/mdadams/jasper/issues/56
Code paths leading to the assertion using your test case and the one in the report for CVE-2016-9397 are the same. Can you provide reasoning why the new CVE is required / justified here? If you agree this is a dupe of the earlier CVE, please get the new CVE rejected as duplicate (similar to CVE-2017-13753).
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
Created attachment 1318062 [details] Triggered by "./imginfo -f POC3" Description of problem: There is a reachable assertion abort in function jpc_dequantize() of JasPer that will lead to remote denial of service attack. Version-Release number of selected component (if applicable): <= latest version How reproducible: ./imginfo -f POC3 Steps to Reproduce: The output information is as follows: $ ./imginfo -f POC3 type = 0xff76 (UNKNOWN); len = 20;10 40 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 imginfo: /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883: void jpc_dequantize(jas_matrix_t *, jpc_fix_t): Assertion `absstepsize >= 0' failed. Aborted (core dumped) The gdb debugging information is listed below: (gdb) set args POC3 (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/icy/secreal/jasper/install/bin/imginfo -f fuzz/output/crashes/id\:000137\,sig\:06\,src\:000444\,op\:flip4\,pos\:127 s 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 Breakpoint 3, jpc_dec_tiledecode (dec=<optimized out>, tile=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1107 1107 jpc_dequantize(band->data, band->absstepsize); (gdb) s jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883 1883 assert(absstepsize >= 0); (gdb) bt #0 jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883 #1 jpc_dec_tiledecode (dec=<optimized out>, tile=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1107 #2 0x00007ffff7b4535b in jpc_dec_process_sod (dec=<optimized out>, ms=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:657 #3 0x00007ffff7b49ceb in jpc_dec_decode (dec=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:424 #4 jpc_decode (in=<optimized out>, optstr=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:261 #5 0x00007ffff7b2d030 in jp2_decode (in=<optimized out>, optstr=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/jp2/jp2_dec.c:218 #6 0x00007ffff7b059ce in jas_image_decode (in=<optimized out>, fmt=<optimized out>, optstr=<optimized out>) at /home/icy/secreal/jasper/src/libjasper/base/jas_image.c:442 #7 0x0000000000401bab in main (argc=<optimized out>, argv=<optimized out>) at /home/icy/secreal/jasper/src/appl/imginfo.c:238 (gdb) n imginfo: /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883: void jpc_dequantize(jas_matrix_t *, jpc_fix_t): Assertion `absstepsize >= 0' failed. Program received signal SIGABRT, Aborted. 0x00007ffff71f8428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) jpc_dequantize (x=<optimized out>, absstepsize=-9223372036854775808) at /home/icy/secreal/jasper/src/libjasper/jpc/jpc_dec.c:1883 1883 assert(absstepsize >= 0); (gdb) list 1878 { 1879 int i; 1880 int j; 1881 int t; 1882 1883 assert(absstepsize >= 0); 1884 if (absstepsize == jpc_inttofix(1)) { 1885 return; 1886 } 1887 Actual results: crash Expected results: crash Additional info: 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.