Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allocation failure in jp2_colr_getdata #207

Closed
ResearchReview opened this issue Jun 24, 2019 · 1 comment
Closed

allocation failure in jp2_colr_getdata #207

ResearchReview opened this issue Jun 24, 2019 · 1 comment

Comments

@ResearchReview
Copy link

The AddressSanitizer report allocation failure in function jp2_colr_getdata.

Command
jasper --input @@ --output test.bmp --output-format bmp

testcase
POC.zip

==23746==WARNING: AddressSanitizer failed to allocate 0xffffffffffff0004 bytes
==23746==AddressSanitizer's allocator is terminating the process instead of returning 0
==23746==If you don't like this behavior set allocator_may_return_null=1
==23746==AddressSanitizer CHECK failed: /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:225 "((0)) != (0)" (0x0, 0x0)
    #0 0x4ede5f in __asan::AsanCheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/asan/asan_rtl.cc:69
    #1 0x50add5 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc:79
    #2 0x4f3c86 in __sanitizer::ReportAllocatorCannotReturnNull() /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:225
    #3 0x4f3cc3 in __sanitizer::ReturnNullOrDieOnFailure::OnBadRequest() /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc:241
    #4 0x424d96 in __asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*) /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/asan/asan_allocator.cc:856
    #5 0x4e4944 in malloc /home/hjwang/Tools/llvm-6.0.1/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:89
    #6 0x56d523 in jas_malloc /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/base/jas_malloc.c:241:11
    #7 0x56db1d in jas_alloc2 /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/base/jas_malloc.c:274:9
    #8 0x6f8483 in jp2_colr_getdata /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/jp2/jp2_cod.c:440:22
    #9 0x6fd2f2 in jp2_box_get /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/jp2/jp2_cod.c:312:8
    #10 0x59c25f in jp2_decode /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/jp2/jp2_dec.c:159:16
    #11 0x557149 in jas_image_decode /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/libjasper/base/jas_image.c:442:16
    #12 0x51db00 in main /home/hjwang/Mem_Obj/jasper-version-2.0.14/src/appl/jasper.c:236:16
    #13 0x7faa193de82f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
    #14 0x420738 in _start (/home/hjwang/Mem_Obj/jasper/build/bin/jasper+0x420738)

Similar to #148

@MaxKellermann
Copy link
Contributor

Duplicate of #215, #166 and #175, jasper-maint/jasper#8
Fixed by jasper-maint/jasper@fcbabda in our fork

@jubalh jubalh closed this as completed in 1c70608 Jul 28, 2020
jubalh added a commit to jubalh/buildroot that referenced this issue Jul 28, 2020
Changes:
* Fix CVE-2018-9154
  jasper-software/jasper#215
  jasper-software/jasper#166
  jasper-software/jasper#175
  jasper-maint/jasper#8

* Fix CVE-2018-19541
  jasper-software/jasper#199
  jasper-maint/jasper#6

* Fix CVE-2016-9399, CVE-2017-13751
  jasper-maint/jasper#1

* Fix CVE-2018-19540
  jasper-software/jasper#182
  jasper-maint/jasper#22

* Fix CVE-2018-9055
  jasper-maint/jasper#9

* Fix CVE-2017-13748
  jasper-software/jasper#168

* Fix CVE-2017-5503, CVE-2017-5504, CVE-2017-5505
  jasper-maint/jasper#3
  jasper-maint/jasper#4
  jasper-maint/jasper#5
  jasper-software/jasper#88
  jasper-software/jasper#89
  jasper-software/jasper#90

* Fix CVE-2018-9252
  jasper-maint/jasper#16

* Fix CVE-2018-19139
  jasper-maint/jasper#14

* Fix CVE-2018-19543, CVE-2017-9782
  jasper-maint/jasper#13
  jasper-maint/jasper#18
  jasper-software/jasper#140
  jasper-software/jasper#182

* Fix CVE-2018-20570
  jasper-maint/jasper#11
  jasper-software/jasper#191

* Fix CVE-2018-20622
  jasper-maint/jasper#12
  jasper-software/jasper#193

* Fix CVE-2016-9398
  jasper-maint/jasper#10

* Fix CVE-2017-14132
  jasper-maint/jasper#17

* Fix CVE-2017-5499
  jasper-maint/jasper#2
  jasper-software/jasper#63

* Fix CVE-2018-18873
  jasper-maint/jasper#15
  jasper-software/jasper#184

* Fix jasper-software/jasper#207

* Fix jasper-software/jasper#194 part 1

* Fix CVE-2017-13750
  jasper-software/jasper#165
  jasper-software/jasper#174

* New option -DJAS_ENABLE_HIDDEN=true to not export internal symbols in the public symbol table

* Fix various memory leaks

* Plenty of code cleanups, and performance improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants