issue_owner_repo
sequencelengths
2
2
issue_body
stringlengths
0
261k
issue_title
stringlengths
1
953
issue_comments_url
stringlengths
56
81
issue_comments_count
int64
0
726
issue_created_at
unknown
issue_updated_at
unknown
issue_html_url
stringlengths
37
62
issue_github_id
int64
285M
2.37B
issue_number
int64
1
168k
msg
stringlengths
159
261k
n_tokens
int64
159
261k
__index_level_0__
int64
38
208k
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master 37b8725) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17282/poc8-DataValue%20copy gdb info: ``` Program received signal SIGSEGV, Segmentation fault. __memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:164 164 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. (gdb) bt #0 __memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:164 #1 0x00007ffff797d3e0 in std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char> ( __first=0x65c0c0 <incomplete sequence \350>, __last=0x65c0c1 "", __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:384 #2 0x00007ffff799f6a7 in std::__copy_move_a<false, unsigned char const*, unsigned char*> (__first=0x65c0c0 <incomplete sequence \350>, __last=0x65c0c1 "", __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:402 #3 0x00007ffff79bef6c in std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*> (__first=232 '\350', __last=0 '\000', __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:440 #4 0x00007ffff79be1b1 in std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*> (__first=232 '\350', __last=0 '\000', __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:472 #5 0x00007ffff79b867e in Exiv2::DataValue::copy (this=0x65c090, buf=0x0) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/value.cpp:242 #6 0x00007ffff795c798 in Exiv2::Exifdatum::copy (this=0x65bfc0, buf=0x0, byteOrder=Exiv2::littleEndian) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/exif.cpp:357 #7 0x00007ffff79b3824 in Exiv2::TiffImage::readMetadata (this=0x659a50) e/marsman/Desktop/crashana/exiv2/exiv2/src/tiffimage.cpp:195 #8 0x0000000000422097 in Action::Print::printSummary (this=0x65acb0) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:286 #9 0x0000000000421d7d in Action::Print::run (this=0x65acb0, path="../../poc8-DataValue::copy") at /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:246 #10 0x0000000000412bc3 in main (argc=2, argv=0x7fffffffddc8) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/exiv2.cpp:167 ``` Asan info: ``` ==130778==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f113fb20934 bp 0x7ffdf01f55d0 sp 0x7ffdf01f4d58 T0) #0 0x7f113fb20933 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xaa933) #1 0x7f113fb02e8d in __asan_memmove (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8ce8d) #2 0x7f113f36b9b5 in unsigned char* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char>(unsigned char const*, unsigned char const*, unsigned char*) /usr/include/c++/5/bits/stl_algobase.h:384 #3 0x7f113f3a54d6 in unsigned char* std::__copy_move_a<false, unsigned char const*, unsigned char*>(unsigned char const*, unsigned char const*, unsigned char*) /usr/include/c++/5/bits/stl_algobase.h:402 #4 0x7f113f3dc03f in unsigned char* std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/lib/libexiv2.so.0+0x31503f) #5 0x7f113f3daa6d in unsigned char* std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/lib/libexiv2.so.0+0x313a6d) #6 0x7f113f3d02f7 in Exiv2::DataValue::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2/src/value.cpp:242 #7 0x7f113f335c0a in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2/src/exif.cpp:357 #8 0x7f113f3c662a in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2/src/tiffimage.cpp:195 #9 0x42b5bd in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:286 #10 0x42ae35 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:246 #11 0x413757 in main /home/marsman/Desktop/crashana/exiv2/exiv2/src/exiv2.cpp:167 #12 0x7f113e78582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #13 0x413168 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/bin/exiv2+0x413168) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 ?? ==130778==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
CVE-2018-17282: SEGV in Exiv2::DataValue::copy at value.cpp:242
https://api.github.com/repos/Exiv2/exiv2/issues/457/comments
1
"2018-09-20T14:54:34"
"2018-11-07T23:54:15Z"
https://github.com/Exiv2/exiv2/issues/457
362,226,893
457
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-17282: SEGV in Exiv2::DataValue::copy at value.cpp:242 Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master 37b8725) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17282/poc8-DataValue%20copy gdb info: ``` Program received signal SIGSEGV, Segmentation fault. __memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:164 164 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. (gdb) bt #0 __memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:164 #1 0x00007ffff797d3e0 in std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char> ( __first=0x65c0c0 <incomplete sequence \350>, __last=0x65c0c1 "", __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:384 #2 0x00007ffff799f6a7 in std::__copy_move_a<false, unsigned char const*, unsigned char*> (__first=0x65c0c0 <incomplete sequence \350>, __last=0x65c0c1 "", __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:402 #3 0x00007ffff79bef6c in std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*> (__first=232 '\350', __last=0 '\000', __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:440 #4 0x00007ffff79be1b1 in std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*> (__first=232 '\350', __last=0 '\000', __result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:472 #5 0x00007ffff79b867e in Exiv2::DataValue::copy (this=0x65c090, buf=0x0) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/value.cpp:242 #6 0x00007ffff795c798 in Exiv2::Exifdatum::copy (this=0x65bfc0, buf=0x0, byteOrder=Exiv2::littleEndian) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/exif.cpp:357 #7 0x00007ffff79b3824 in Exiv2::TiffImage::readMetadata (this=0x659a50) e/marsman/Desktop/crashana/exiv2/exiv2/src/tiffimage.cpp:195 #8 0x0000000000422097 in Action::Print::printSummary (this=0x65acb0) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:286 #9 0x0000000000421d7d in Action::Print::run (this=0x65acb0, path="../../poc8-DataValue::copy") at /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:246 #10 0x0000000000412bc3 in main (argc=2, argv=0x7fffffffddc8) at /home/marsman/Desktop/crashana/exiv2/exiv2/src/exiv2.cpp:167 ``` Asan info: ``` ==130778==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f113fb20934 bp 0x7ffdf01f55d0 sp 0x7ffdf01f4d58 T0) #0 0x7f113fb20933 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xaa933) #1 0x7f113fb02e8d in __asan_memmove (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8ce8d) #2 0x7f113f36b9b5 in unsigned char* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char>(unsigned char const*, unsigned char const*, unsigned char*) /usr/include/c++/5/bits/stl_algobase.h:384 #3 0x7f113f3a54d6 in unsigned char* std::__copy_move_a<false, unsigned char const*, unsigned char*>(unsigned char const*, unsigned char const*, unsigned char*) /usr/include/c++/5/bits/stl_algobase.h:402 #4 0x7f113f3dc03f in unsigned char* std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/lib/libexiv2.so.0+0x31503f) #5 0x7f113f3daa6d in unsigned char* std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/lib/libexiv2.so.0+0x313a6d) #6 0x7f113f3d02f7 in Exiv2::DataValue::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2/src/value.cpp:242 #7 0x7f113f335c0a in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2/src/exif.cpp:357 #8 0x7f113f3c662a in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2/src/tiffimage.cpp:195 #9 0x42b5bd in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:286 #10 0x42ae35 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2/src/actions.cpp:246 #11 0x413757 in main /home/marsman/Desktop/crashana/exiv2/exiv2/src/exiv2.cpp:167 #12 0x7f113e78582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #13 0x413168 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2/build_asan/bin/exiv2+0x413168) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 ?? ==130778==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,755
208,009
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/poc7-s2Data ``` ./build_asan/bin/exiv2 ../poc7-s2Data ================================================================= ==32777==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000009e8e at pc 0x7f0eef7aaae2 bp 0x7fff03e52fa0 sp 0x7fff03e52f90 WRITE of size 1 at 0x611000009e8e thread T0 #0 0x7f0eef7aaae1 in Exiv2::s2Data(unsigned char*, short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:404 #1 0x7f0eef70acd1 in long Exiv2::toData<short>(unsigned char*, short, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bcd1) #2 0x7f0eef719103 in Exiv2::ValueType<short>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f0eef704e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f0eef7a6083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f0eeea8d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x611000009e8e is located 0 bytes to the right of 206-byte region [0x611000009dc0,0x611000009e8e) allocated by thread T0 here: #0 0x7f0eefeea6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f0eef7a851f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f0eef7a5fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f0eeea8d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:404 Exiv2::s2Data(unsigned char*, short, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c227fff9380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9390: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93b0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c227fff93c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c227fff93d0: 00[06]fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c227fff93f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c227fff9400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9420: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32777==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
AddressSanitizer: heap-buffer-overflow in Exiv2::s2Data
https://api.github.com/repos/Exiv2/exiv2/issues/456/comments
1
"2018-09-17T14:18:58"
"2018-11-07T23:54:26Z"
https://github.com/Exiv2/exiv2/issues/456
360,891,525
456
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow in Exiv2::s2Data Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/poc7-s2Data ``` ./build_asan/bin/exiv2 ../poc7-s2Data ================================================================= ==32777==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000009e8e at pc 0x7f0eef7aaae2 bp 0x7fff03e52fa0 sp 0x7fff03e52f90 WRITE of size 1 at 0x611000009e8e thread T0 #0 0x7f0eef7aaae1 in Exiv2::s2Data(unsigned char*, short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:404 #1 0x7f0eef70acd1 in long Exiv2::toData<short>(unsigned char*, short, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bcd1) #2 0x7f0eef719103 in Exiv2::ValueType<short>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f0eef704e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f0eef7a6083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f0eeea8d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x611000009e8e is located 0 bytes to the right of 206-byte region [0x611000009dc0,0x611000009e8e) allocated by thread T0 here: #0 0x7f0eefeea6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f0eef7a851f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f0eef7a5fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f0eeea8d82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:404 Exiv2::s2Data(unsigned char*, short, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c227fff9380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9390: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93b0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c227fff93c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c227fff93d0: 00[06]fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff93e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c227fff93f0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c227fff9400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff9420: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32777==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,326
208,010
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17230/poc6-ul2Data ``` ./bin/exiv2 ../../poc6-ul2Data ================================================================= ==29742==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000cf59 at pc 0x7f79f092888f bp 0x7ffe74e0c920 sp 0x7ffe74e0c910 WRITE of size 1 at 0x60300000cf59 thread T0 #0 0x7f79f092888e in Exiv2::ul2Data(unsigned char*, unsigned int, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:383 #1 0x7f79f0928988 in Exiv2::ur2Data(unsigned char*, std::pair<unsigned int, unsigned int>, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:392 #2 0x7f79f0888ca5 in long Exiv2::toData<std::pair<unsigned int, unsigned int> >(unsigned char*, std::pair<unsigned int, unsigned int>, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bca5) #3 0x7f79f0899a90 in Exiv2::ValueType<std::pair<unsigned int, unsigned int> >::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #4 0x7f79f0882e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #5 0x7f79f0924083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #6 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #7 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #8 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #9 0x7f79efc0b82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #10 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60300000cf59 is located 0 bytes to the right of 25-byte region [0x60300000cf40,0x60300000cf59) allocated by thread T0 here: #0 0x7f79f10686b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f79f092651f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f79f0923fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f79efc0b82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:383 Exiv2::ul2Data(unsigned char*, unsigned int, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c067fff9990: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff99e0: fa fa fa fa fa fa fa fa 00 00 00[01]fa fa fd fd 0x0c067fff99f0: fd fd fa fa fd fd fd fa fa fa fd fd fd fd fa fa 0x0c067fff9a00: 00 00 00 07 fa fa fd fd fd fd fa fa fd fd fd fa 0x0c067fff9a10: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00 0x0c067fff9a20: 00 05 fa fa fd fd fd fd fa fa fd fd fd fd fa fa 0x0c067fff9a30: fd fd fd fd fa fa fd fd fd fa fa fa 00 00 07 fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==29742==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
CVE-2018-17230: AddressSanitizer: heap-buffer-overflow in Exiv2::ul2Data
https://api.github.com/repos/Exiv2/exiv2/issues/455/comments
3
"2018-09-17T14:18:56"
"2018-11-07T23:54:49Z"
https://github.com/Exiv2/exiv2/issues/455
360,891,510
455
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-17230: AddressSanitizer: heap-buffer-overflow in Exiv2::ul2Data Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17230/poc6-ul2Data ``` ./bin/exiv2 ../../poc6-ul2Data ================================================================= ==29742==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000cf59 at pc 0x7f79f092888f bp 0x7ffe74e0c920 sp 0x7ffe74e0c910 WRITE of size 1 at 0x60300000cf59 thread T0 #0 0x7f79f092888e in Exiv2::ul2Data(unsigned char*, unsigned int, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:383 #1 0x7f79f0928988 in Exiv2::ur2Data(unsigned char*, std::pair<unsigned int, unsigned int>, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:392 #2 0x7f79f0888ca5 in long Exiv2::toData<std::pair<unsigned int, unsigned int> >(unsigned char*, std::pair<unsigned int, unsigned int>, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bca5) #3 0x7f79f0899a90 in Exiv2::ValueType<std::pair<unsigned int, unsigned int> >::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #4 0x7f79f0882e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #5 0x7f79f0924083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #6 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #7 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #8 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #9 0x7f79efc0b82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #10 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60300000cf59 is located 0 bytes to the right of 25-byte region [0x60300000cf40,0x60300000cf59) allocated by thread T0 here: #0 0x7f79f10686b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f79f092651f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f79f0923fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f79efc0b82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:383 Exiv2::ul2Data(unsigned char*, unsigned int, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c067fff9990: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff99d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff99e0: fa fa fa fa fa fa fa fa 00 00 00[01]fa fa fd fd 0x0c067fff99f0: fd fd fa fa fd fd fd fa fa fa fd fd fd fd fa fa 0x0c067fff9a00: 00 00 00 07 fa fa fd fd fd fd fa fa fd fd fd fa 0x0c067fff9a10: fa fa fd fd fd fa fa fa fd fd fd fd fa fa 00 00 0x0c067fff9a20: 00 05 fa fa fd fd fd fd fa fa fd fd fd fd fa fa 0x0c067fff9a30: fd fd fd fd fa fa fd fd fd fa fa fa 00 00 07 fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==29742==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,682
208,011
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC`AddressSanitizer: heap-buffer-overflow in Exiv2::d2Data https://github.com/Marsman1996/pocs/blob/master/exiv2/poc5-l2Data ``` ./build_asan/bin/exiv2 ../poc5-l2Data ================================================================= ==32768==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000edc0 at pc 0x7f6ccb2dacb5 bp 0x7fffcc342080 sp 0x7fffcc342070 WRITE of size 1 at 0x60200000edc0 thread T0 #0 0x7f6ccb2dacb4 in Exiv2::l2Data(unsigned char*, int, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:419 #1 0x7f6ccb23acf9 in long Exiv2::toData<int>(unsigned char*, int, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bcf9) #2 0x7f6ccb24836f in Exiv2::ValueType<int>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f6ccb234e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f6ccb2d6083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f6cca5bd82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000edc0 is located 0 bytes to the right of 16-byte region [0x60200000edb0,0x60200000edc0) allocated by thread T0 here: #0 0x7f6ccba1a6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f6ccb2d851f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f6ccb2d5fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f6cca5bd82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:419 Exiv2::l2Data(unsigned char*, int, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa fa fa fa fa 00 00[fa]fa 00 00 fa fa fd fd 0x0c047fff9dc0: fa fa 02 fa fa fa 00 00 fa fa fd fa fa fa fd fd 0x0c047fff9dd0: fa fa fd fd fa fa fd fa fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32768==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
AddressSanitizer: heap-buffer-overflow in Exiv2::l2Data
https://api.github.com/repos/Exiv2/exiv2/issues/454/comments
1
"2018-09-17T14:18:55"
"2018-11-07T23:54:58Z"
https://github.com/Exiv2/exiv2/issues/454
360,891,498
454
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow in Exiv2::l2Data Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC`AddressSanitizer: heap-buffer-overflow in Exiv2::d2Data https://github.com/Marsman1996/pocs/blob/master/exiv2/poc5-l2Data ``` ./build_asan/bin/exiv2 ../poc5-l2Data ================================================================= ==32768==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000edc0 at pc 0x7f6ccb2dacb5 bp 0x7fffcc342080 sp 0x7fffcc342070 WRITE of size 1 at 0x60200000edc0 thread T0 #0 0x7f6ccb2dacb4 in Exiv2::l2Data(unsigned char*, int, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:419 #1 0x7f6ccb23acf9 in long Exiv2::toData<int>(unsigned char*, int, Exiv2::ByteOrder) (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/lib/libexiv2.so.0+0x33bcf9) #2 0x7f6ccb24836f in Exiv2::ValueType<int>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f6ccb234e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f6ccb2d6083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f6cca5bd82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000edc0 is located 0 bytes to the right of 16-byte region [0x60200000edb0,0x60200000edc0) allocated by thread T0 here: #0 0x7f6ccba1a6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f6ccb2d851f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f6ccb2d5fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f6cca5bd82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:419 Exiv2::l2Data(unsigned char*, int, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa fa fa fa fa 00 00[fa]fa 00 00 fa fa fd fd 0x0c047fff9dc0: fa fa 02 fa fa fa 00 00 fa fa fd fa fa fa fd fd 0x0c047fff9dd0: fa fa fd fd fa fa fd fa fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32768==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,370
208,012
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17229/poc4-d2Data ``` ./bin/exiv2 ../../poc4-d2Data ================================================================= ==29719==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000edda at pc 0x7f380fbee411 bp 0x7ffe90b43600 sp 0x7ffe90b435f0 WRITE of size 1 at 0x60200000edda thread T0 #0 0x7f380fbee410 in Exiv2::d2Data(unsigned char*, double, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:473 #1 0x7f380fbfc1e7 in long Exiv2::toData<double>(unsigned char*, double, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1512 #2 0x7f380fc03803 in Exiv2::ValueType<double>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f380fb47e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f380fbe9083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f380eed082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000edda is located 0 bytes to the right of 10-byte region [0x60200000edd0,0x60200000edda) allocated by thread T0 here: #0 0x7f381032d6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f380fbeb51f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f380fbe8fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f380eed082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:473 Exiv2::d2Data(unsigned char*, double, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa 00[02]fa fa 00 00 0x0c047fff9dc0: fa fa fd fd fa fa 02 fa fa fa 00 00 fa fa fd fa 0x0c047fff9dd0: fa fa fd fd fa fa fd fd fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==29719==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
CVE-2018-17229: AddressSanitizer: heap-buffer-overflow in Exiv2::d2Data
https://api.github.com/repos/Exiv2/exiv2/issues/453/comments
5
"2018-09-17T14:18:53"
"2018-11-07T23:55:09Z"
https://github.com/Exiv2/exiv2/issues/453
360,891,479
453
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-17229: AddressSanitizer: heap-buffer-overflow in Exiv2::d2Data Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-17229/poc4-d2Data ``` ./bin/exiv2 ../../poc4-d2Data ================================================================= ==29719==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000edda at pc 0x7f380fbee411 bp 0x7ffe90b43600 sp 0x7ffe90b435f0 WRITE of size 1 at 0x60200000edda thread T0 #0 0x7f380fbee410 in Exiv2::d2Data(unsigned char*, double, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:473 #1 0x7f380fbfc1e7 in long Exiv2::toData<double>(unsigned char*, double, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1512 #2 0x7f380fc03803 in Exiv2::ValueType<double>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7f380fb47e58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7f380fbe9083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7f380eed082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000edda is located 0 bytes to the right of 10-byte region [0x60200000edd0,0x60200000edda) allocated by thread T0 here: #0 0x7f381032d6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f380fbeb51f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7f380fbe8fe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7f380eed082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:473 Exiv2::d2Data(unsigned char*, double, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa 00[02]fa fa 00 00 0x0c047fff9dc0: fa fa fd fd fa fa 02 fa fa fa 00 00 fa fa fd fa 0x0c047fff9dd0: fa fa fd fd fa fa fd fd fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==29719==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,342
208,013
[ "Exiv2", "exiv2" ]
Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/poc3-us2Data ``` ./build_asan/bin/exiv2 ../poc3-us2Data ================================================================= ==32757==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed9d at pc 0x7ffa7b2f16b5 bp 0x7ffce41c48e0 sp 0x7ffce41c48d0 WRITE of size 1 at 0x60200000ed9d thread T0 #0 0x7ffa7b2f16b4 in Exiv2::us2Data(unsigned char*, unsigned short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:368 #1 0x7ffa7b251c52 in long Exiv2::toData<unsigned short>(unsigned char*, unsigned short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1449 #2 0x7ffa7b261cd9 in Exiv2::ValueType<unsigned short>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7ffa7b24be58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7ffa7b2ed083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7ffa7a5d482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000ed9d is located 0 bytes to the right of 13-byte region [0x60200000ed90,0x60200000ed9d) allocated by thread T0 here: #0 0x7ffa7ba316b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7ffa7b2ef51f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7ffa7b2ecfe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7ffa7a5d482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:368 Exiv2::us2Data(unsigned char*, unsigned short, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa 00[05]fa fa 00 00 fa fa fd fd fa fa 02 fa 0x0c047fff9dc0: fa fa 00 00 fa fa fd fa fa fa fd fd fa fa fd fd 0x0c047fff9dd0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32757==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com)
AddressSanitizer: heap-buffer-overflow in Exiv2::us2Data
https://api.github.com/repos/Exiv2/exiv2/issues/452/comments
1
"2018-09-17T14:18:50"
"2018-11-07T23:55:30Z"
https://github.com/Exiv2/exiv2/issues/452
360,891,453
452
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow in Exiv2::us2Data Issue date: --- start body --- Tested in Ubuntu 16.04, 64bit, Exiv2(master b6a8d39) `$ exiv2 $POC` https://github.com/Marsman1996/pocs/blob/master/exiv2/poc3-us2Data ``` ./build_asan/bin/exiv2 ../poc3-us2Data ================================================================= ==32757==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed9d at pc 0x7ffa7b2f16b5 bp 0x7ffce41c48e0 sp 0x7ffce41c48d0 WRITE of size 1 at 0x60200000ed9d thread T0 #0 0x7ffa7b2f16b4 in Exiv2::us2Data(unsigned char*, unsigned short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:368 #1 0x7ffa7b251c52 in long Exiv2::toData<unsigned short>(unsigned char*, unsigned short, Exiv2::ByteOrder) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1449 #2 0x7ffa7b261cd9 in Exiv2::ValueType<unsigned short>::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/include/exiv2/value.hpp:1611 #3 0x7ffa7b24be58 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exif.cpp:357 #4 0x7ffa7b2ed083 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:199 #5 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #6 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #7 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #8 0x7ffa7a5d482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x421ce8 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/build_asan/bin/exiv2+0x421ce8) 0x60200000ed9d is located 0 bytes to the right of 13-byte region [0x60200000ed90,0x60200000ed9d) allocated by thread T0 here: #0 0x7ffa7ba316b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7ffa7b2ef51f in Exiv2::DataBuf::alloc(long) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:156 #2 0x7ffa7b2ecfe6 in Exiv2::TiffImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/tiffimage.cpp:198 #3 0x43a413 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:287 #4 0x439c8b in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/actions.cpp:247 #5 0x4222d7 in main /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/exiv2.cpp:167 #6 0x7ffa7a5d482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-b6a8d39613a28603a989bd5278798db8a54eeb1e/src/types.cpp:368 Exiv2::us2Data(unsigned char*, unsigned short, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9db0: fa fa 00[05]fa fa 00 00 fa fa fd fd fa fa 02 fa 0x0c047fff9dc0: fa fa 00 00 fa fa fd fa fa fa fd fd fa fa fd fd 0x0c047fff9dd0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa 0x0c047fff9de0: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==32757==ABORTING ``` Addition: This bug was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) --- end body --- comments : --- start comments --- --- end comments ---
5,364
208,014
[ "Exiv2", "exiv2" ]
I am trying to add Xmp.drone-dji.GimbalRollDegree attribute to a image but I get following error. ``` Alienware-2:~$ exiv2 -M 'set Xmp.drone-dji.GimbalRollDegree +0.00' test001.jpg -M option 1: Invalid key 'Xmp.drone-dji.GimbalRollDegree' exiv2: Error parsing -M option arguments Usage: exiv2 [ options ] [ action ] file ... Manipulate the Exif metadata of images. ``` Is this because only DJI can set this metadata and not anyone else?
Unable to set Xmp.drone-dji
https://api.github.com/repos/Exiv2/exiv2/issues/449/comments
2
"2018-09-13T15:56:30"
"2018-09-14T13:37:35Z"
https://github.com/Exiv2/exiv2/issues/449
359,959,507
449
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Unable to set Xmp.drone-dji Issue date: --- start body --- I am trying to add Xmp.drone-dji.GimbalRollDegree attribute to a image but I get following error. ``` Alienware-2:~$ exiv2 -M 'set Xmp.drone-dji.GimbalRollDegree +0.00' test001.jpg -M option 1: Invalid key 'Xmp.drone-dji.GimbalRollDegree' exiv2: Error parsing -M option arguments Usage: exiv2 [ options ] [ action ] file ... Manipulate the Exif metadata of images. ``` Is this because only DJI can set this metadata and not anyone else? --- end body --- comments : --- start comments --- --- end comments ---
638
208,015
[ "Exiv2", "exiv2" ]
When setting the following CMake variables: ``` set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) ``` We get many linking errors when trying to link **exiv2lib** with any of the apps. The problem is in the file **include/exiv2/config.h**, in the configuration for the End symbol visibility. On Linux/Mac, gcc and clang export all the symbols by default, which is a different behaviour than MSVC when building static libraries. The current code for Linux/Mac is: ``` # ifdef EXV_WANT_VISIBILITY_SUPPORT # if defined(__GNUC__) && (__GNUC__ >= 4) # define EXV_IMPORT __attribute__ ((visibility("default"))) # define EXV_EXPORT __attribute__ ((visibility("default"))) # define EXV_DLLLOCAL __attribute__ ((visibility("hidden"))) # define EXV_DLLPUBLIC __attribute__ ((visibility("default"))) # elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) # define EXV_IMPORT __global # define EXV_EXPORT __global # define EXV_DLLLOCAL __hidden # define EXV_DLLPUBLIC __global # else # define EXV_IMPORT # define EXV_EXPORT # define EXV_DLLLOCAL # define EXV_DLLPUBLIC # endif # else /* ! EXV_WANT_VISIBILITY_SUPPORT */ # define EXV_IMPORT # define EXV_EXPORT # define EXV_DLLLOCAL # define EXV_DLLPUBLIC # endif /* ! EXV_WANT_VISIBILITY_SUPPORT */ ``` Since `EXV_WANT_VISIBILITY_SUPPORT` is not defined in any place we end up doing nothing about exporting/importing the symbols. To fix this issue, let's kill that code in **include/exiv2/config.h** and use the GenerateExportHeader functionality from CMake.
Modernise symbol exportation
https://api.github.com/repos/Exiv2/exiv2/issues/448/comments
0
"2018-09-13T15:28:21"
"2018-09-14T11:20:24Z"
https://github.com/Exiv2/exiv2/issues/448
359,948,015
448
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Modernise symbol exportation Issue date: --- start body --- When setting the following CMake variables: ``` set(CMAKE_CXX_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) ``` We get many linking errors when trying to link **exiv2lib** with any of the apps. The problem is in the file **include/exiv2/config.h**, in the configuration for the End symbol visibility. On Linux/Mac, gcc and clang export all the symbols by default, which is a different behaviour than MSVC when building static libraries. The current code for Linux/Mac is: ``` # ifdef EXV_WANT_VISIBILITY_SUPPORT # if defined(__GNUC__) && (__GNUC__ >= 4) # define EXV_IMPORT __attribute__ ((visibility("default"))) # define EXV_EXPORT __attribute__ ((visibility("default"))) # define EXV_DLLLOCAL __attribute__ ((visibility("hidden"))) # define EXV_DLLPUBLIC __attribute__ ((visibility("default"))) # elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) # define EXV_IMPORT __global # define EXV_EXPORT __global # define EXV_DLLLOCAL __hidden # define EXV_DLLPUBLIC __global # else # define EXV_IMPORT # define EXV_EXPORT # define EXV_DLLLOCAL # define EXV_DLLPUBLIC # endif # else /* ! EXV_WANT_VISIBILITY_SUPPORT */ # define EXV_IMPORT # define EXV_EXPORT # define EXV_DLLLOCAL # define EXV_DLLPUBLIC # endif /* ! EXV_WANT_VISIBILITY_SUPPORT */ ``` Since `EXV_WANT_VISIBILITY_SUPPORT` is not defined in any place we end up doing nothing about exporting/importing the symbols. To fix this issue, let's kill that code in **include/exiv2/config.h** and use the GenerateExportHeader functionality from CMake. --- end body --- comments : --- start comments --- --- end comments ---
1,780
208,016
[ "Exiv2", "exiv2" ]
Here's the structure of the tarball for v0.26 http://www.exiv2.org/builds/exiv2-0.26-linux.tar.gz The first version of exiv2-0.27.0-Darwin/ has the essential output of the build. However, the v0.26 tarballs have more content: ``` 569 rmills@rmillsmbp:~/Downloads/dist $ dir -rw-r--r--@ 1 rmills staff 5.4K 17 May 2017 ReadMe.txt drwxr-xr-x@ 3 rmills staff 96B 17 May 2017 contrib/ drwxr-xr-x@ 41 rmills staff 1.3K 17 May 2017 samples/ drwxr-xr-x@ 6 rmills staff 192B 17 May 2017 linux/ drwxr-xr-x@ 4 rmills staff 128B 17 May 2017 logs/ 570 rmills@rmillsmbp:~/Downloads/dist $ ``` The ReadMe.txt is generated by the buildserver from contrib/buildserver/dailyReadMe.txt contrib/ is a straight copy of the contrib/ directory in the repos samples/ is a straight copy of the samples/directory linux/ contains bin, include, lib, share (this is the stuff that CPack is packaging at the moment). logs/ contains build.log and test.log **Testing the build** Jenkins did the build and runs the test suite. There's another script run after the build to test the tarball. It compiles and executes one of the samples to be certain that the build is good. I don't think we need to test the build automatically. Once our build process is stable, the builds will be OK and we can inspect GM builds manually before release.
Structure of a v0.27 tarball
https://api.github.com/repos/Exiv2/exiv2/issues/446/comments
4
"2018-09-13T08:38:18"
"2018-10-28T20:36:35Z"
https://github.com/Exiv2/exiv2/issues/446
359,796,537
446
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Structure of a v0.27 tarball Issue date: --- start body --- Here's the structure of the tarball for v0.26 http://www.exiv2.org/builds/exiv2-0.26-linux.tar.gz The first version of exiv2-0.27.0-Darwin/ has the essential output of the build. However, the v0.26 tarballs have more content: ``` 569 rmills@rmillsmbp:~/Downloads/dist $ dir -rw-r--r--@ 1 rmills staff 5.4K 17 May 2017 ReadMe.txt drwxr-xr-x@ 3 rmills staff 96B 17 May 2017 contrib/ drwxr-xr-x@ 41 rmills staff 1.3K 17 May 2017 samples/ drwxr-xr-x@ 6 rmills staff 192B 17 May 2017 linux/ drwxr-xr-x@ 4 rmills staff 128B 17 May 2017 logs/ 570 rmills@rmillsmbp:~/Downloads/dist $ ``` The ReadMe.txt is generated by the buildserver from contrib/buildserver/dailyReadMe.txt contrib/ is a straight copy of the contrib/ directory in the repos samples/ is a straight copy of the samples/directory linux/ contains bin, include, lib, share (this is the stuff that CPack is packaging at the moment). logs/ contains build.log and test.log **Testing the build** Jenkins did the build and runs the test suite. There's another script run after the build to test the tarball. It compiles and executes one of the samples to be certain that the build is good. I don't think we need to test the build automatically. Once our build process is stable, the builds will be OK and we can inspect GM builds manually before release. --- end body --- comments : --- start comments --- --- end comments ---
1,553
208,017
[ "Exiv2", "exiv2" ]
When we run `exiv2 --version` we obtain a string like this: ``` $ bin/exiv2 --version exiv2 0.27.0.1 001a00 (64 bit build) ``` We want to remove the 3rd column there (Hexadecimal number). This functionality is actually broken right now, since it is using some hard-coded values for the project version. We also want to provide the full version string (major, minor, patch, tweak) in the packages generated by CPack.
Cleanup version information when running 'exiv2 --version'
https://api.github.com/repos/Exiv2/exiv2/issues/445/comments
0
"2018-09-13T08:19:02"
"2018-09-14T06:42:35Z"
https://github.com/Exiv2/exiv2/issues/445
359,790,307
445
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Cleanup version information when running 'exiv2 --version' Issue date: --- start body --- When we run `exiv2 --version` we obtain a string like this: ``` $ bin/exiv2 --version exiv2 0.27.0.1 001a00 (64 bit build) ``` We want to remove the 3rd column there (Hexadecimal number). This functionality is actually broken right now, since it is using some hard-coded values for the project version. We also want to provide the full version string (major, minor, patch, tweak) in the packages generated by CPack. --- end body --- comments : --- start comments --- --- end comments ---
642
208,018
[ "Exiv2", "exiv2" ]
This isn't a single issue. It's an collection of thoughts about how to achieve this. I propose: 1) Remove test/testMSVC.sh as obsolete. 2) Dan to investigate/explain why `( cd ../tests ; python3 runner.py --verbose )` is failing 3) Robin to document how to run the test suite for every platform (probably in README.md) The schedule dictates that we retain the bash scripts (such as test/icc-test.sh) for v0.27. These can be easily run from the test directory using the Cygwin bash shell as follows: ``` 505 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ cygpath -aw .. C:\Users\rmills\gnu\github\exiv2\exiv2 506 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ for i in ../build/bin/*.exe; do cygpath -aw $i; done C:\Users\rmills\gnu\github\exiv2\exiv2\build\bin\addmoddel.exe C:\Users\rmills\gnu\github\exiv2\exiv2\build\bin\conntest.exe ... 507 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make test mkdir -p tmp rm -rf tmp/test-failed Running addmoddel.sh ... all testcases passed. Running bugfixes-test.sh ... 426 440 443 444 445 447 452 make: *** [Makefile:105: test] Interrupt 508 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin ./addmoddel.sh all testcases passed. 509 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make newtests ( cd ../tests ; python3 runner.py --verbose ) test_run (bugfixes.github.test_CVE_2017_1000126.TestCvePoC) ... FAIL ... ```
Running the test suite on MSVC builds on v0.27
https://api.github.com/repos/Exiv2/exiv2/issues/440/comments
3
"2018-09-11T15:17:51"
"2018-10-16T06:12:19Z"
https://github.com/Exiv2/exiv2/issues/440
359,095,560
440
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Running the test suite on MSVC builds on v0.27 Issue date: --- start body --- This isn't a single issue. It's an collection of thoughts about how to achieve this. I propose: 1) Remove test/testMSVC.sh as obsolete. 2) Dan to investigate/explain why `( cd ../tests ; python3 runner.py --verbose )` is failing 3) Robin to document how to run the test suite for every platform (probably in README.md) The schedule dictates that we retain the bash scripts (such as test/icc-test.sh) for v0.27. These can be easily run from the test directory using the Cygwin bash shell as follows: ``` 505 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ cygpath -aw .. C:\Users\rmills\gnu\github\exiv2\exiv2 506 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ for i in ../build/bin/*.exe; do cygpath -aw $i; done C:\Users\rmills\gnu\github\exiv2\exiv2\build\bin\addmoddel.exe C:\Users\rmills\gnu\github\exiv2\exiv2\build\bin\conntest.exe ... 507 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make test mkdir -p tmp rm -rf tmp/test-failed Running addmoddel.sh ... all testcases passed. Running bugfixes-test.sh ... 426 440 443 444 445 447 452 make: *** [Makefile:105: test] Interrupt 508 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin ./addmoddel.sh all testcases passed. 509 rmills@rmillsmm-w7:/c/Users/rmills/gnu/github/exiv2/exiv2/test $ env EXIV2_BINDIR=${PWD}/../build/bin make newtests ( cd ../tests ; python3 runner.py --verbose ) test_run (bugfixes.github.test_CVE_2017_1000126.TestCvePoC) ... FAIL ... ``` --- end body --- comments : --- start comments --- --- end comments ---
1,808
208,019
[ "Exiv2", "exiv2" ]
There are two different issues with the bash test suite on MinGW msys/2: 1) MinGW msys/2 is not detected as PLATFORM=mingw 2) There are issues with individual scripts (such as test/icc-test.sh crashing) This is a simple patch to ensure that MinGW msys/2 is correctly detected. I'll investigate the crashes and report them as individual issues. ``` diff --git a/test/functions.source b/test/functions.source index c95edbd1..a8cfe22b 100644 --- a/test/functions.source +++ b/test/functions.source @@ -450,9 +450,8 @@ prepareTest() os=$(uname) if [ "${os:0:4}" == "CYGW" ]; then export PLATFORM=cygwin - elif [ "${os:0:4}" == "MING" ]; then + elif [ "${os:0:4}" == "MING" -o "${os:0:4}" == "MSYS" ]; then export PLATFORM=mingw - # bin=$(dirname $(which exiv2)) else export PLATFORM=$os fi @@ -504,32 +503,16 @@ prepareTest() #fi diffargs="$da1 $da2" - if [ $PLATFORM == mingw ]; then - # export "PATH=${bin}/:$PATH" - export "PATH=$PATH:${bin}" - bin='' - # echo ---- PATH $PATH ---- ; (IFS=:;for i in $PATH; do echo $i; done) ; echo -------------------- - fi - ## # test that exiv2 and some sample apps are in the bin! for e in exiv2 exifprint easyaccess-test metacopy ; do - if [ $PLATFORM == mingw ]; then - if [ -z $(which $e) ]; then - echo '******************************************' - echo '***' $e is not on path - echo '******************************************' - exit 37 - fi - else - e="${bin}${e}${exe}" - if [ ! -e "$e" ]; then - echo '******************************************' - echo '***' $(real_path "$e") does not exist - echo '******************************************' - exit 42 - fi - fi + e="${bin}${e}${exe}" + if [ ! -e "$e" ]; then + echo '******************************************' + echo '***' $(real_path "$e") does not exist + echo '******************************************' + exit 42 + fi done } ```
Changes to bash test suite for MinGW msys/2
https://api.github.com/repos/Exiv2/exiv2/issues/439/comments
0
"2018-09-11T14:01:29"
"2018-09-13T06:35:40Z"
https://github.com/Exiv2/exiv2/issues/439
359,061,814
439
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Changes to bash test suite for MinGW msys/2 Issue date: --- start body --- There are two different issues with the bash test suite on MinGW msys/2: 1) MinGW msys/2 is not detected as PLATFORM=mingw 2) There are issues with individual scripts (such as test/icc-test.sh crashing) This is a simple patch to ensure that MinGW msys/2 is correctly detected. I'll investigate the crashes and report them as individual issues. ``` diff --git a/test/functions.source b/test/functions.source index c95edbd1..a8cfe22b 100644 --- a/test/functions.source +++ b/test/functions.source @@ -450,9 +450,8 @@ prepareTest() os=$(uname) if [ "${os:0:4}" == "CYGW" ]; then export PLATFORM=cygwin - elif [ "${os:0:4}" == "MING" ]; then + elif [ "${os:0:4}" == "MING" -o "${os:0:4}" == "MSYS" ]; then export PLATFORM=mingw - # bin=$(dirname $(which exiv2)) else export PLATFORM=$os fi @@ -504,32 +503,16 @@ prepareTest() #fi diffargs="$da1 $da2" - if [ $PLATFORM == mingw ]; then - # export "PATH=${bin}/:$PATH" - export "PATH=$PATH:${bin}" - bin='' - # echo ---- PATH $PATH ---- ; (IFS=:;for i in $PATH; do echo $i; done) ; echo -------------------- - fi - ## # test that exiv2 and some sample apps are in the bin! for e in exiv2 exifprint easyaccess-test metacopy ; do - if [ $PLATFORM == mingw ]; then - if [ -z $(which $e) ]; then - echo '******************************************' - echo '***' $e is not on path - echo '******************************************' - exit 37 - fi - else - e="${bin}${e}${exe}" - if [ ! -e "$e" ]; then - echo '******************************************' - echo '***' $(real_path "$e") does not exist - echo '******************************************' - exit 42 - fi - fi + e="${bin}${e}${exe}" + if [ ! -e "$e" ]; then + echo '******************************************' + echo '***' $(real_path "$e") does not exist + echo '******************************************' + exit 42 + fi done } ``` --- end body --- comments : --- start comments --- --- end comments ---
2,230
208,020
[ "Exiv2", "exiv2" ]
Fix is to use the flag --text in $diffargs and to use $diffargs when comparing temporary files. I've only tested this on Cygwin and MacOS-X. I'll test later on MinGW/Linux/msvc/ ``` diff --git a/test/exiv2-test.sh b/test/exiv2-test.sh index ef3058fd..f951bc52 100755 --- a/test/exiv2-test.sh +++ b/test/exiv2-test.sh @@ -2,6 +2,7 @@ # Test driver for exiv2 utility tests source ./functions.source +diffargs="-w --text $diffargs" ( cd "$testdir" @@ -88,7 +89,7 @@ source ./functions.source runTest exiv2 -u -v -b -pt print $image3 > jjj echo echo "Compare image data and extracted data ------------------------------------" - diff iii jjj + diff $diffargs iii jjj echo echo "Delete Thumbnail ---------------------------------------------------------" runTest exiv2 -u -v -dt delete $image2 @@ -103,12 +104,11 @@ source ./functions.source runTest exiv2 -u -v -b -pt print $image3 > kkk echo echo "Compare original and inserted image data ---------------------------------" - diff iii kkk + diff $diffargs iii kkk ) > $results 2>&1 -diffargs="-w $diffargs" reportTest # That's all Folks! -## \ No newline at end of file +## ```
test/exiv2-test.sh fails on Cygwin
https://api.github.com/repos/Exiv2/exiv2/issues/438/comments
1
"2018-09-11T08:53:37"
"2018-09-14T06:43:52Z"
https://github.com/Exiv2/exiv2/issues/438
358,948,995
438
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : test/exiv2-test.sh fails on Cygwin Issue date: --- start body --- Fix is to use the flag --text in $diffargs and to use $diffargs when comparing temporary files. I've only tested this on Cygwin and MacOS-X. I'll test later on MinGW/Linux/msvc/ ``` diff --git a/test/exiv2-test.sh b/test/exiv2-test.sh index ef3058fd..f951bc52 100755 --- a/test/exiv2-test.sh +++ b/test/exiv2-test.sh @@ -2,6 +2,7 @@ # Test driver for exiv2 utility tests source ./functions.source +diffargs="-w --text $diffargs" ( cd "$testdir" @@ -88,7 +89,7 @@ source ./functions.source runTest exiv2 -u -v -b -pt print $image3 > jjj echo echo "Compare image data and extracted data ------------------------------------" - diff iii jjj + diff $diffargs iii jjj echo echo "Delete Thumbnail ---------------------------------------------------------" runTest exiv2 -u -v -dt delete $image2 @@ -103,12 +104,11 @@ source ./functions.source runTest exiv2 -u -v -b -pt print $image3 > kkk echo echo "Compare original and inserted image data ---------------------------------" - diff iii kkk + diff $diffargs iii kkk ) > $results 2>&1 -diffargs="-w $diffargs" reportTest # That's all Folks! -## \ No newline at end of file +## ``` --- end body --- comments : --- start comments --- --- end comments ---
1,441
208,021
[ "Exiv2", "exiv2" ]
Currently Exiv2 is not building with VS 2012 and 2013 due to the usage of snprintf. See errors here: https://ci.appveyor.com/project/piponazo/exiv2/build/1.0.582 Although we have plans to move to modern C++ in the next months, it is worth it to fix this situation for the next release: 0.27.0. Some other projects have had to deal with this issue and in these links we can find the solution: https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 https://github.com/opencv/opencv/pull/8771/files
Add Visual Studio 2012 and 2013 to the Appveyor Build Matrix
https://api.github.com/repos/Exiv2/exiv2/issues/434/comments
1
"2018-09-08T18:54:31"
"2018-09-10T08:31:49Z"
https://github.com/Exiv2/exiv2/issues/434
358,319,534
434
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Add Visual Studio 2012 and 2013 to the Appveyor Build Matrix Issue date: --- start body --- Currently Exiv2 is not building with VS 2012 and 2013 due to the usage of snprintf. See errors here: https://ci.appveyor.com/project/piponazo/exiv2/build/1.0.582 Although we have plans to move to modern C++ in the next months, it is worth it to fix this situation for the next release: 0.27.0. Some other projects have had to deal with this issue and in these links we can find the solution: https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 https://github.com/opencv/opencv/pull/8771/files --- end body --- comments : --- start comments --- --- end comments ---
747
208,022
[ "Exiv2", "exiv2" ]
The program samples/stringto-test.cpp crashes when built with ASAN. ``` cmake .. -G "Unix Makefiles" -DEXIV2_TEAM_USE_SANITIZERS=On ``` $ bin/stringto-test ``` 1644 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/build $ bin/stringto-test string long float Rational True 1 1 1/1 False 0 0 0/1 t 1 1 1/1 /Users/rmills/gnu/github/exiv2/exiv2/src/types.cpp:667:50: runtime error: nan is outside the range of representable values of type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/rmills/gnu/github/exiv2/exiv2/src/types.cpp:667:50 in f Abort trap: 6 1645 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/build $ ``` The fix is tiny (in types.cpp). There's an issue in the test suite prevents tests being run from directory test/ ``` 1649 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/test $ ./stringto-test.sh ****************************************** *** /bin/exiv2 does not exist ****************************************** 1650 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/test $ ``` ``` diff --git a/src/types.cpp b/src/types.cpp index 6db7071b..4598153a 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -659,7 +659,7 @@ namespace Exiv2 { Rational floatToRationalCast(float f) { - if (isinf(f)) { + if (isinf(f)||isnan(f)) { return Rational(f > 0 ? 1 : -1, 0); } // Beware: primitive conversion algorithm diff --git a/test/functions.source b/test/functions.source index bb89d53a..00163993 100644 --- a/test/functions.source +++ b/test/functions.source @@ -442,11 +442,11 @@ prepareTest() datadir="../data" if [ -z "$EXIV2_BINDIR" ] ; then - if [ -z "$EXIV2_BUILDDIR" ]; then - bin="$EXIV2_BUILDDIR/bin/" - else - bin="$here/../build/bin/" - fi + if [ -z "$EXIV2_BUILDDIR" ]; then + bin="$here/../build/bin/" + else + bin="$EXIV2_BUILDDIR/bin/" + fi else bin="$EXIV2_BINDIR/" fi @@ -456,7 +456,6 @@ prepareTest() export PLATFORM=cygwin elif [ "${os:0:4}" == "MING" ]; then export PLATFORM=mingw - # bin=$(dirname $(which exiv2)) else export PLATFORM=$os fi ```
ASAN issue with stringto-test.cpp
https://api.github.com/repos/Exiv2/exiv2/issues/433/comments
2
"2018-09-07T11:38:32"
"2018-11-07T23:56:23Z"
https://github.com/Exiv2/exiv2/issues/433
358,032,999
433
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : ASAN issue with stringto-test.cpp Issue date: --- start body --- The program samples/stringto-test.cpp crashes when built with ASAN. ``` cmake .. -G "Unix Makefiles" -DEXIV2_TEAM_USE_SANITIZERS=On ``` $ bin/stringto-test ``` 1644 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/build $ bin/stringto-test string long float Rational True 1 1 1/1 False 0 0 0/1 t 1 1 1/1 /Users/rmills/gnu/github/exiv2/exiv2/src/types.cpp:667:50: runtime error: nan is outside the range of representable values of type 'long' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/rmills/gnu/github/exiv2/exiv2/src/types.cpp:667:50 in f Abort trap: 6 1645 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/build $ ``` The fix is tiny (in types.cpp). There's an issue in the test suite prevents tests being run from directory test/ ``` 1649 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/test $ ./stringto-test.sh ****************************************** *** /bin/exiv2 does not exist ****************************************** 1650 rmills@rmillsmm:~/gnu/github/exiv2/exiv2/test $ ``` ``` diff --git a/src/types.cpp b/src/types.cpp index 6db7071b..4598153a 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -659,7 +659,7 @@ namespace Exiv2 { Rational floatToRationalCast(float f) { - if (isinf(f)) { + if (isinf(f)||isnan(f)) { return Rational(f > 0 ? 1 : -1, 0); } // Beware: primitive conversion algorithm diff --git a/test/functions.source b/test/functions.source index bb89d53a..00163993 100644 --- a/test/functions.source +++ b/test/functions.source @@ -442,11 +442,11 @@ prepareTest() datadir="../data" if [ -z "$EXIV2_BINDIR" ] ; then - if [ -z "$EXIV2_BUILDDIR" ]; then - bin="$EXIV2_BUILDDIR/bin/" - else - bin="$here/../build/bin/" - fi + if [ -z "$EXIV2_BUILDDIR" ]; then + bin="$here/../build/bin/" + else + bin="$EXIV2_BUILDDIR/bin/" + fi else bin="$EXIV2_BINDIR/" fi @@ -456,7 +456,6 @@ prepareTest() export PLATFORM=cygwin elif [ "${os:0:4}" == "MING" ]; then export PLATFORM=mingw - # bin=$(dirname $(which exiv2)) else export PLATFORM=$os fi ``` --- end body --- comments : --- start comments --- --- end comments ---
2,572
208,023
[ "Exiv2", "exiv2" ]
Hi, I have a problem tagging jpeg images using the pexif Python library, but I can reproduce the bug with exiv2 tool alone. I set the following value of latitude: `exiv2 -n UTF-8 -k -M "set Exif.GPSInfo.GPSLatitude 43/1 51/1 2576100059/50000000" image.jpg` With **exiv2 -PExgnycv** I can confirm that the rational for seconds of latitude is correct: `0x0002 GPSInfo GPSLatitude Rational 3 43/1 51/1 2576100059/50000000` but if I check with **exiv2 -Pkyct** I see a wrong number: `Exif.GPSInfo.GPSLatitude Rational 3 43deg 51' -34.377"` It seems that Exiv2 consider the numerator of the rational as a signed long integer (so the overflow to negative number when the value is above 2^32/2). As far as I can understand, the Exif standard says that the rational should be two unsigned long integer instead. I tried exiv2 version 0.25, on a Debian 9 (Stretch), someone shoul check the new 0.26 version...
Wrong values in GPS tags: negative number for seconds of latitude or longitude
https://api.github.com/repos/Exiv2/exiv2/issues/432/comments
3
"2018-09-03T15:54:15"
"2018-09-03T16:39:54Z"
https://github.com/Exiv2/exiv2/issues/432
356,552,321
432
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Wrong values in GPS tags: negative number for seconds of latitude or longitude Issue date: --- start body --- Hi, I have a problem tagging jpeg images using the pexif Python library, but I can reproduce the bug with exiv2 tool alone. I set the following value of latitude: `exiv2 -n UTF-8 -k -M "set Exif.GPSInfo.GPSLatitude 43/1 51/1 2576100059/50000000" image.jpg` With **exiv2 -PExgnycv** I can confirm that the rational for seconds of latitude is correct: `0x0002 GPSInfo GPSLatitude Rational 3 43/1 51/1 2576100059/50000000` but if I check with **exiv2 -Pkyct** I see a wrong number: `Exif.GPSInfo.GPSLatitude Rational 3 43deg 51' -34.377"` It seems that Exiv2 consider the numerator of the rational as a signed long integer (so the overflow to negative number when the value is above 2^32/2). As far as I can understand, the Exif standard says that the rational should be two unsigned long integer instead. I tried exiv2 version 0.25, on a Debian 9 (Stretch), someone shoul check the new 0.26 version... --- end body --- comments : --- start comments --- --- end comments ---
1,171
208,024
[ "Exiv2", "exiv2" ]
When running `exiv2 $FILE` (5940c6f) against png files, , ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_pngchunk_int.cpp:635_1.png https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_pngchunk_int.cpp:635_2.png ASAN output: ``` ================================================================= ==32119==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6070000001bf at pc 0x7fea19eca9aa bp 0x7ffd00c71d70 sp 0x7ffd00c71d68 READ of size 1 at 0x6070000001bf thread T0 #0 0x7fea19eca9a9 in Exiv2::Internal::PngChunk::readRawProfile(Exiv2::DataBuf const&, bool) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:635:16 #1 0x7fea19ec7228 in Exiv2::Internal::PngChunk::parseChunkContent(Exiv2::Image*, unsigned char const*, long, Exiv2::DataBuf) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:258:32 #2 0x7fea19ec4f6f in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:91:9 #3 0x7fea19d74647 in Exiv2::PngImage::readMetadata() /home/hongxu/FOT/exiv2/src/pngimage.cpp:495:21 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7fea18220b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x6070000001bf is located 0 bytes to the right of 79-byte region [0x607000000170,0x6070000001bf) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x7fea19ce7af9 in Exiv2::DataBuf::DataBuf(unsigned char const*, long) /home/hongxu/FOT/exiv2/src/types.cpp:138:22 #2 0x7fea19ec6831 in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:216:27 #3 0x7fea19ec4dcc in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:85:23 #4 0x7fea19d74647 in Exiv2::PngImage::readMetadata() /home/hongxu/FOT/exiv2/src/pngimage.cpp:495:21 #5 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #6 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #7 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #8 0x7fea18220b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:635:16 in Exiv2::Internal::PngChunk::readRawProfile(Exiv2::DataBuf const&, bool) Shadow bytes around the buggy address: 0x0c0e7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0e7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0e7fff8000: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fa fa 0x0c0e7fff8010: fa fa 00 00 00 00 00 00 00 00 00 03 fa fa fa fa 0x0c0e7fff8020: fd fd fd fd fd fd fd fd fd fd fa fa fa fa 00 00 =>0x0c0e7fff8030: 00 00 00 00 00 00 00[07]fa fa fa fa fa fa fa fa 0x0c0e7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==32119==ABORTING ```
CVE-2018-19535: AddressSanitizer: heap-buffer-overflow at pngchunk_int.cpp:635
https://api.github.com/repos/Exiv2/exiv2/issues/428/comments
10
"2018-09-01T05:40:24"
"2018-12-01T08:49:04Z"
https://github.com/Exiv2/exiv2/issues/428
356,174,622
428
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-19535: AddressSanitizer: heap-buffer-overflow at pngchunk_int.cpp:635 Issue date: --- start body --- When running `exiv2 $FILE` (5940c6f) against png files, , ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_pngchunk_int.cpp:635_1.png https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_pngchunk_int.cpp:635_2.png ASAN output: ``` ================================================================= ==32119==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6070000001bf at pc 0x7fea19eca9aa bp 0x7ffd00c71d70 sp 0x7ffd00c71d68 READ of size 1 at 0x6070000001bf thread T0 #0 0x7fea19eca9a9 in Exiv2::Internal::PngChunk::readRawProfile(Exiv2::DataBuf const&, bool) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:635:16 #1 0x7fea19ec7228 in Exiv2::Internal::PngChunk::parseChunkContent(Exiv2::Image*, unsigned char const*, long, Exiv2::DataBuf) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:258:32 #2 0x7fea19ec4f6f in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:91:9 #3 0x7fea19d74647 in Exiv2::PngImage::readMetadata() /home/hongxu/FOT/exiv2/src/pngimage.cpp:495:21 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7fea18220b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x6070000001bf is located 0 bytes to the right of 79-byte region [0x607000000170,0x6070000001bf) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x7fea19ce7af9 in Exiv2::DataBuf::DataBuf(unsigned char const*, long) /home/hongxu/FOT/exiv2/src/types.cpp:138:22 #2 0x7fea19ec6831 in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:216:27 #3 0x7fea19ec4dcc in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:85:23 #4 0x7fea19d74647 in Exiv2::PngImage::readMetadata() /home/hongxu/FOT/exiv2/src/pngimage.cpp:495:21 #5 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #6 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #7 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #8 0x7fea18220b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/pngchunk_int.cpp:635:16 in Exiv2::Internal::PngChunk::readRawProfile(Exiv2::DataBuf const&, bool) Shadow bytes around the buggy address: 0x0c0e7fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0e7fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c0e7fff8000: fa fa fa fa fd fd fd fd fd fd fd fd fd fd fa fa 0x0c0e7fff8010: fa fa 00 00 00 00 00 00 00 00 00 03 fa fa fa fa 0x0c0e7fff8020: fd fd fd fd fd fd fd fd fd fd fa fa fa fa 00 00 =>0x0c0e7fff8030: 00 00 00 00 00 00 00[07]fa fa fa fa fa fa fa fa 0x0c0e7fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c0e7fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==32119==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
4,871
208,025
[ "Exiv2", "exiv2" ]
When running `exiv2 $FILE` (5940c6f) against psd files, , ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_iptc.cpp:464_1.psd?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_iptc.cpp:464_2.psd?raw=true ASAN output: ``` ================================================================= ==16384==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000140 at pc 0x7ffa566b54a2 bp 0x7ffec76dfe10 sp 0x7ffec76dfe08 READ of size 1 at 0x611000000140 thread T0 #0 0x7ffa566b54a1 in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) /home/hongxu/FOT/exiv2/src/iptc.cpp:464:33 #1 0x7ffa567442d3 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:246:21 #2 0x7ffa56743675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #3 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #4 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #5 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #6 0x7ffa54cb7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #7 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x611000000140 is located 0 bytes to the right of 256-byte region [0x611000000040,0x611000000140) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x58c8df in Exiv2::DataBuf::DataBuf(long) /home/hongxu/FOT/exiv2/include/exiv2/types.hpp:215:46 #2 0x7ffa56743f58 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:243:25 #3 0x7ffa56743675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7ffa54cb7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/iptc.cpp:464:33 in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) Shadow bytes around the buggy address: 0x0c227fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c227fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c227fff8020: 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa 0x0c227fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==16384==ABORTING ```
AddressSanitizer: heap-buffer-overflow at iptc.cpp:464
https://api.github.com/repos/Exiv2/exiv2/issues/427/comments
9
"2018-09-01T05:37:20"
"2018-11-08T13:42:16Z"
https://github.com/Exiv2/exiv2/issues/427
356,174,488
427
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow at iptc.cpp:464 Issue date: --- start body --- When running `exiv2 $FILE` (5940c6f) against psd files, , ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_iptc.cpp:464_1.psd?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_iptc.cpp:464_2.psd?raw=true ASAN output: ``` ================================================================= ==16384==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000140 at pc 0x7ffa566b54a2 bp 0x7ffec76dfe10 sp 0x7ffec76dfe08 READ of size 1 at 0x611000000140 thread T0 #0 0x7ffa566b54a1 in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) /home/hongxu/FOT/exiv2/src/iptc.cpp:464:33 #1 0x7ffa567442d3 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:246:21 #2 0x7ffa56743675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #3 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #4 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #5 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #6 0x7ffa54cb7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #7 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x611000000140 is located 0 bytes to the right of 256-byte region [0x611000000040,0x611000000140) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x58c8df in Exiv2::DataBuf::DataBuf(long) /home/hongxu/FOT/exiv2/include/exiv2/types.hpp:215:46 #2 0x7ffa56743f58 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:243:25 #3 0x7ffa56743675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7ffa54cb7b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/iptc.cpp:464:33 in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) Shadow bytes around the buggy address: 0x0c227fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c227fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c227fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c227fff8020: 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa 0x0c227fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c227fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==16384==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
4,349
208,026
[ "Exiv2", "exiv2" ]
There seems an infinite loop inside Exiv2::PsdImage::readMetadata at https://github.com/Exiv2/exiv2/blob/disable-printStructure/src/psdimage.cpp#L200-L233 (5940c6f3). It checks `while (resourcesLength > 0)` at line 200, `resourcesLength` is updated at line 232. However sometimes `resourceNameLength + resourceSize` may be 0xfffffff4, and it will be truncated to 0 when adding 12, making the subtraction to have no effect. A concrete input is available [h01](https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/hangs/h01.psd?raw=true) and [h02](https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/hangs/h02.psd?raw=true).
Infinite loop inside Exiv2::PsdImage::readMetadata (psdimage.cpp)
https://api.github.com/repos/Exiv2/exiv2/issues/426/comments
4
"2018-08-31T13:49:18"
"2018-11-08T13:42:12Z"
https://github.com/Exiv2/exiv2/issues/426
355,988,509
426
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Infinite loop inside Exiv2::PsdImage::readMetadata (psdimage.cpp) Issue date: --- start body --- There seems an infinite loop inside Exiv2::PsdImage::readMetadata at https://github.com/Exiv2/exiv2/blob/disable-printStructure/src/psdimage.cpp#L200-L233 (5940c6f3). It checks `while (resourcesLength > 0)` at line 200, `resourcesLength` is updated at line 232. However sometimes `resourceNameLength + resourceSize` may be 0xfffffff4, and it will be truncated to 0 when adding 12, making the subtraction to have no effect. A concrete input is available [h01](https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/hangs/h01.psd?raw=true) and [h02](https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/hangs/h02.psd?raw=true). --- end body --- comments : --- start comments --- --- end comments ---
867
208,027
[ "Exiv2", "exiv2" ]
When running `exiv2 $FILE` (5940c6f3) against psd files, ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_types.cpp:245_1.psd?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_types.cpp:245_2.psd?raw=true ASAN output: ``` ================================================================= ==18441==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6120000002d0 at pc 0x7f674455ec35 bp 0x7fff9ece6600 sp 0x7fff9ece65f8 READ of size 1 at 0x6120000002d0 thread T0 #0 0x7f674455ec34 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) /home/hongxu/FOT/exiv2/src/types.cpp:245:46 #1 0x7f674449351e in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) /home/hongxu/FOT/exiv2/src/iptc.cpp:469:28 #2 0x7f67445222d3 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:246:21 #3 0x7f6744521675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7f6742a95b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x6120000002d0 is located 0 bytes to the right of 272-byte region [0x6120000001c0,0x6120000002d0) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x58c8df in Exiv2::DataBuf::DataBuf(long) /home/hongxu/FOT/exiv2/include/exiv2/types.hpp:215:46 #2 0x7f6744521f58 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:243:25 #3 0x7f6744521675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7f6742a95b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/types.cpp:245:46 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c247fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c247fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c247fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 0x0c247fff8030: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c247fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c247fff8050: 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa 0x0c247fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==18441==ABORTING ```
AddressSanitizer: heap-buffer-overflow at types.cpp:245
https://api.github.com/repos/Exiv2/exiv2/issues/425/comments
6
"2018-08-31T11:58:40"
"2018-11-21T07:26:17Z"
https://github.com/Exiv2/exiv2/issues/425
355,952,227
425
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow at types.cpp:245 Issue date: --- start body --- When running `exiv2 $FILE` (5940c6f3) against psd files, ASAN reports a heap-buffer-overflow error. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_types.cpp:245_1.psd?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/hbo_types.cpp:245_2.psd?raw=true ASAN output: ``` ================================================================= ==18441==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6120000002d0 at pc 0x7f674455ec35 bp 0x7fff9ece6600 sp 0x7fff9ece65f8 READ of size 1 at 0x6120000002d0 thread T0 #0 0x7f674455ec34 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) /home/hongxu/FOT/exiv2/src/types.cpp:245:46 #1 0x7f674449351e in Exiv2::IptcParser::decode(Exiv2::IptcData&, unsigned char const*, unsigned int) /home/hongxu/FOT/exiv2/src/iptc.cpp:469:28 #2 0x7f67445222d3 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:246:21 #3 0x7f6744521675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7f6742a95b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #8 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) 0x6120000002d0 is located 0 bytes to the right of 272-byte region [0x6120000001c0,0x6120000002d0) allocated by thread T0 here: #0 0x52e0f0 in operator new[](unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x52e0f0) #1 0x58c8df in Exiv2::DataBuf::DataBuf(long) /home/hongxu/FOT/exiv2/include/exiv2/types.hpp:215:46 #2 0x7f6744521f58 in Exiv2::PsdImage::readResourceBlock(unsigned short, unsigned int) /home/hongxu/FOT/exiv2/src/psdimage.cpp:243:25 #3 0x7f6744521675 in Exiv2::PsdImage::readMetadata() /home/hongxu/FOT/exiv2/src/psdimage.cpp:229:13 #4 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #5 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #6 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #7 0x7f6742a95b96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hongxu/FOT/exiv2/src/types.cpp:245:46 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c247fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c247fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c247fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa 0x0c247fff8030: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 0x0c247fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c247fff8050: 00 00 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa 0x0c247fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c247fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==18441==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
4,456
208,028
[ "Exiv2", "exiv2" ]
When running `exiv2 $FILE` (5940c6f, disable-printStructure) on some crafted tiff files, ASAN reports an invalid write on a NULL pointer. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/npe_w_value.cpp:212_1.tiff?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/npe_w_value.cpp:212_2.tiff?raw=true ASAN output: ``` Error: Directory Image: Next pointer is out of bounds; ignored. Error: Directory Image, entry 0x00fe has invalid size 318767105*2; skipping entry. Error: Upper boundary of data for directory Image, entry 0x0115 is out of bounds: Offset = 0x00000001, size = 16386, exceeds buffer size by 15405 Bytes; truncating the entry Error: Directory Image, entry 0x0136 has invalid size 774778414*8; skipping entry. Warning: Directory Image, entry 0x2e2e has unknown Exif (TIFF) type 11822; setting type size 1. Error: Directory Image, entry 0x2e2e has invalid size 774778414*1; skipping entry. Warning: Directory Image, entry 0x8773 has unknown Exif (TIFF) type 65031; setting type size 1. Warning: Directory Image, entry 0x0280 has unknown Exif (TIFF) type 0; setting type size 1. Error: Offset of directory Image, entry 0x0004 is out of bounds: Offset = 0x01120000; truncating the entry Error: Offset of directory Image, entry 0x0003 is out of bounds: Offset = 0x66669999; truncating the entry Warning: Directory Image, entry 0x3333 has unknown Exif (TIFF) type 0; setting type size 1. Warning: Directory Image, entry 0x0000 has unknown Exif (TIFF) type 0; setting type size 1. Error: Offset of directory Image, entry 0x0000 is out of bounds: Offset = 0x16000000; truncating the entry AddressSanitizer:DEADLYSIGNAL ================================================================= ==10074==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000051196a bp 0x7ffe5d9325e0 sp 0x7ffe5d931d60 T0) ==10074==The signal is caused by a WRITE memory access. ==10074==Hint: address points to the zero page. #0 0x511969 in __sanitizer::internal_memmove(void*, void const*, unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x511969) #1 0x4f4ff4 in __asan_memmove (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x4f4ff4) #2 0x7f022fbcc295 in unsigned char* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char>(unsigned char const*, unsigned char const*, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368:6 #3 0x7f022fc4bb88 in unsigned char* std::__copy_move_a<false, unsigned char const*, unsigned char*>(unsigned char const*, unsigned char const*, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:385:14 #4 0x7f022fcd8feb in unsigned char* std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:422:18 #5 0x7f022fcc55af in unsigned char* std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:454:15 #6 0x7f022fcb4d94 in Exiv2::DataValue::copy(unsigned char*, Exiv2::ByteOrder) const /home/hongxu/FOT/exiv2/src/value.cpp:212:13 #7 0x7f022fb60d65 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/hongxu/FOT/exiv2/src/exif.cpp:358:48 #8 0x7f022fca17f9 in Exiv2::TiffImage::readMetadata() /home/hongxu/FOT/exiv2/src/tiffimage.cpp:196:18 #9 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #10 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #11 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #12 0x7f022e1deb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #13 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x511969) in __sanitizer::internal_memmove(void*, void const*, unsigned long) ==10074==ABORTING ```
AddressSanitizer: invalid write (NPE) at value.cpp:212
https://api.github.com/repos/Exiv2/exiv2/issues/423/comments
6
"2018-08-31T09:12:30"
"2018-11-07T23:58:11Z"
https://github.com/Exiv2/exiv2/issues/423
355,901,165
423
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: invalid write (NPE) at value.cpp:212 Issue date: --- start body --- When running `exiv2 $FILE` (5940c6f, disable-printStructure) on some crafted tiff files, ASAN reports an invalid write on a NULL pointer. POCs: https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/npe_w_value.cpp:212_1.tiff?raw=true https://github.com/ntu-sec/pocs/blob/master/exiv2-5940c6f3/crashes/npe_w_value.cpp:212_2.tiff?raw=true ASAN output: ``` Error: Directory Image: Next pointer is out of bounds; ignored. Error: Directory Image, entry 0x00fe has invalid size 318767105*2; skipping entry. Error: Upper boundary of data for directory Image, entry 0x0115 is out of bounds: Offset = 0x00000001, size = 16386, exceeds buffer size by 15405 Bytes; truncating the entry Error: Directory Image, entry 0x0136 has invalid size 774778414*8; skipping entry. Warning: Directory Image, entry 0x2e2e has unknown Exif (TIFF) type 11822; setting type size 1. Error: Directory Image, entry 0x2e2e has invalid size 774778414*1; skipping entry. Warning: Directory Image, entry 0x8773 has unknown Exif (TIFF) type 65031; setting type size 1. Warning: Directory Image, entry 0x0280 has unknown Exif (TIFF) type 0; setting type size 1. Error: Offset of directory Image, entry 0x0004 is out of bounds: Offset = 0x01120000; truncating the entry Error: Offset of directory Image, entry 0x0003 is out of bounds: Offset = 0x66669999; truncating the entry Warning: Directory Image, entry 0x3333 has unknown Exif (TIFF) type 0; setting type size 1. Warning: Directory Image, entry 0x0000 has unknown Exif (TIFF) type 0; setting type size 1. Error: Offset of directory Image, entry 0x0000 is out of bounds: Offset = 0x16000000; truncating the entry AddressSanitizer:DEADLYSIGNAL ================================================================= ==10074==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000051196a bp 0x7ffe5d9325e0 sp 0x7ffe5d931d60 T0) ==10074==The signal is caused by a WRITE memory access. ==10074==Hint: address points to the zero page. #0 0x511969 in __sanitizer::internal_memmove(void*, void const*, unsigned long) (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x511969) #1 0x4f4ff4 in __asan_memmove (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x4f4ff4) #2 0x7f022fbcc295 in unsigned char* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<unsigned char>(unsigned char const*, unsigned char const*, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368:6 #3 0x7f022fc4bb88 in unsigned char* std::__copy_move_a<false, unsigned char const*, unsigned char*>(unsigned char const*, unsigned char const*, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:385:14 #4 0x7f022fcd8feb in unsigned char* std::__copy_move_a2<false, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:422:18 #5 0x7f022fcc55af in unsigned char* std::copy<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char> > >, unsigned char*) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:454:15 #6 0x7f022fcb4d94 in Exiv2::DataValue::copy(unsigned char*, Exiv2::ByteOrder) const /home/hongxu/FOT/exiv2/src/value.cpp:212:13 #7 0x7f022fb60d65 in Exiv2::Exifdatum::copy(unsigned char*, Exiv2::ByteOrder) const /home/hongxu/FOT/exiv2/src/exif.cpp:358:48 #8 0x7f022fca17f9 in Exiv2::TiffImage::readMetadata() /home/hongxu/FOT/exiv2/src/tiffimage.cpp:196:18 #9 0x55b70c in Action::Print::printSummary() /home/hongxu/FOT/exiv2/src/actions.cpp:288:16 #10 0x55a19a in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hongxu/FOT/exiv2/src/actions.cpp:248:48 #11 0x532dcb in main /home/hongxu/FOT/exiv2/src/exiv2.cpp:166:29 #12 0x7f022e1deb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310 #13 0x435ac9 in _start (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x435ac9) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/hongxu/FOT/exiv2/install/bin/exiv2+0x511969) in __sanitizer::internal_memmove(void*, void const*, unsigned long) ==10074==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
5,180
208,029
[ "Exiv2", "exiv2" ]
Our fuzzer detected an infinite loop inside Image::printIFDStructure (src/image.cpp) (as of 5940c6f3) when running `exiv2 -ep 2 $FILE`. Some of the test inputs are available [here](https://github.com/ntu-sec/pocs/tree/master/exiv2-5940c6f3/hangs). For example, for `h_01.tiff`, `dirLength==0`, `bSwap==0`, `tooBig==0`, and consequently `start==0xc0000` remain unchanged.
Hangs inside Image::printIFDStructure
https://api.github.com/repos/Exiv2/exiv2/issues/422/comments
2
"2018-08-31T05:37:02"
"2018-11-07T23:58:28Z"
https://github.com/Exiv2/exiv2/issues/422
355,845,640
422
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Hangs inside Image::printIFDStructure Issue date: --- start body --- Our fuzzer detected an infinite loop inside Image::printIFDStructure (src/image.cpp) (as of 5940c6f3) when running `exiv2 -ep 2 $FILE`. Some of the test inputs are available [here](https://github.com/ntu-sec/pocs/tree/master/exiv2-5940c6f3/hangs). For example, for `h_01.tiff`, `dirLength==0`, `bSwap==0`, `tooBig==0`, and consequently `start==0xc0000` remain unchanged. --- end body --- comments : --- start comments --- --- end comments ---
574
208,030
[ "Exiv2", "exiv2" ]
Since the upgrade to gcc 8.2.0 I can not build exiv2 anymore. Maybe someone here has experience or an idea about the problem? If not, we can maybe just leave this issue hanging for other people to share insight? With gcc 8.2.0 on MSYS2 I get the following linker error: ``` cmd.exe /C "cd . && D:\bda-ci\msys2\bda\mingw64\bin\c++.exe -ggdb3 -O0 -m64 -march=nehalem -mtune=haswell -DDEBUG -g -m64 src/CMakeFiles/exiv2.dir/exiv2.cpp.obj src/CMakeFiles/exiv2.dir/actions.cpp.obj src/CMakeFiles/exiv2.dir/utils.cpp.obj src/CMakeFiles/exiv2.dir/localtime.c.obj -o bin\exiv2.exe -Wl,--major-image-version,0,--minor-image-version,0 src/libexiv2.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/bda-ci/msys2/bda/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/CMakeFiles/exiv2.dir/exiv2.cpp.obj: in function `Exiv2::BasicError<char>::BasicError<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': D:/Debug/Shared/exiv2-0.26/include/exiv2/error.hpp:282: undefined reference to `__imp__ZN5Exiv210BasicErrorIcE6setMsgEv' ``` I checked the symbols in `libexiv2.dll` and there the symbol is defined: ``` #> nm bin/libexiv2.dll | grep setMsg 000000006ed35174 T _ZN5Exiv210BasicErrorIcE6setMsgEv ``` I do not know why the linker step could fail, and why only for this symbol. Is there a chance that this is related to a `char` vs `wchar` issue? But I did not mix and mingle object files, this is one consistent clean build.
MinGW / MSYS2 build fails for v0.26 with gcc 8.2.0
https://api.github.com/repos/Exiv2/exiv2/issues/421/comments
31
"2018-08-30T14:24:26"
"2024-03-16T19:00:13Z"
https://github.com/Exiv2/exiv2/issues/421
355,609,713
421
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : MinGW / MSYS2 build fails for v0.26 with gcc 8.2.0 Issue date: --- start body --- Since the upgrade to gcc 8.2.0 I can not build exiv2 anymore. Maybe someone here has experience or an idea about the problem? If not, we can maybe just leave this issue hanging for other people to share insight? With gcc 8.2.0 on MSYS2 I get the following linker error: ``` cmd.exe /C "cd . && D:\bda-ci\msys2\bda\mingw64\bin\c++.exe -ggdb3 -O0 -m64 -march=nehalem -mtune=haswell -DDEBUG -g -m64 src/CMakeFiles/exiv2.dir/exiv2.cpp.obj src/CMakeFiles/exiv2.dir/actions.cpp.obj src/CMakeFiles/exiv2.dir/utils.cpp.obj src/CMakeFiles/exiv2.dir/localtime.c.obj -o bin\exiv2.exe -Wl,--major-image-version,0,--minor-image-version,0 src/libexiv2.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/bda-ci/msys2/bda/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/CMakeFiles/exiv2.dir/exiv2.cpp.obj: in function `Exiv2::BasicError<char>::BasicError<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': D:/Debug/Shared/exiv2-0.26/include/exiv2/error.hpp:282: undefined reference to `__imp__ZN5Exiv210BasicErrorIcE6setMsgEv' ``` I checked the symbols in `libexiv2.dll` and there the symbol is defined: ``` #> nm bin/libexiv2.dll | grep setMsg 000000006ed35174 T _ZN5Exiv210BasicErrorIcE6setMsgEv ``` I do not know why the linker step could fail, and why only for this symbol. Is there a chance that this is related to a `char` vs `wchar` issue? But I did not mix and mingle object files, this is one consistent clean build. --- end body --- comments : --- start comments --- --- end comments ---
1,875
208,031
[ "Exiv2", "exiv2" ]
I recently noticed that the travis [CI job](https://travis-ci.org/Exiv2/exiv2/jobs/418189810) is failing on Mac OSX due to this error: ``` +brew install gettext libssh md5sha1sum openssl pyenv-virtualenv Warning: gettext 0.19.8.1 is already installed and up-to-date To reinstall 0.19.8.1, run `brew reinstall gettext` Error: openssl 1.0.2l is already installed To upgrade to 1.0.2p, run `brew upgrade openssl` Error: libssh 0.7.5 is already installed To upgrade to 0.8.1, run `brew upgrade libssh` ``` Investigate the issue and fix it ASAP.
Fix TravisCI for OSX
https://api.github.com/repos/Exiv2/exiv2/issues/408/comments
0
"2018-08-20T12:07:00"
"2018-08-21T11:32:38Z"
https://github.com/Exiv2/exiv2/issues/408
352,106,471
408
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Fix TravisCI for OSX Issue date: --- start body --- I recently noticed that the travis [CI job](https://travis-ci.org/Exiv2/exiv2/jobs/418189810) is failing on Mac OSX due to this error: ``` +brew install gettext libssh md5sha1sum openssl pyenv-virtualenv Warning: gettext 0.19.8.1 is already installed and up-to-date To reinstall 0.19.8.1, run `brew reinstall gettext` Error: openssl 1.0.2l is already installed To upgrade to 1.0.2p, run `brew upgrade openssl` Error: libssh 0.7.5 is already installed To upgrade to 0.8.1, run `brew upgrade libssh` ``` Investigate the issue and fix it ASAP. --- end body --- comments : --- start comments --- --- end comments ---
733
208,032
[ "Exiv2", "exiv2" ]
I'm trying to use exiv2 as a metadatawriter in a ios app that is written in react-native framework. I have made a bridge using djinni to call c++ code which is where I intend to use exiv2. In Xcode I have set the header search paths to exiv2 and it can be found. Running this code is fine: `Exiv2::ExifData exifData;` But when I start using it more like this code `exifData["Exif.Image.VersionApp"] = 'TestingVersion'; // AsciiValue` ` Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri);` ` assert(image.get() != 0);` ` image->setExifData(exifData);` ` image->writeMetadata();` Then I get `Undefined symbols for architecture arm64:` ` "Exiv2::ImageFactory::open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:` ` ExifdataHandler::exifdataProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in exifdataHandler.o` `ld: symbol(s) not found for architecture arm64` `clang: error: linker command failed with exit code 1 (use -v to see invocation)` Any ideas on what is needed to run this ?
Unable to run with arm64 architecture / ios
https://api.github.com/repos/Exiv2/exiv2/issues/405/comments
8
"2018-08-16T14:00:55"
"2018-08-31T10:06:20Z"
https://github.com/Exiv2/exiv2/issues/405
351,218,801
405
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Unable to run with arm64 architecture / ios Issue date: --- start body --- I'm trying to use exiv2 as a metadatawriter in a ios app that is written in react-native framework. I have made a bridge using djinni to call c++ code which is where I intend to use exiv2. In Xcode I have set the header search paths to exiv2 and it can be found. Running this code is fine: `Exiv2::ExifData exifData;` But when I start using it more like this code `exifData["Exif.Image.VersionApp"] = 'TestingVersion'; // AsciiValue` ` Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri);` ` assert(image.get() != 0);` ` image->setExifData(exifData);` ` image->writeMetadata();` Then I get `Undefined symbols for architecture arm64:` ` "Exiv2::ImageFactory::open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:` ` ExifdataHandler::exifdataProcess(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in exifdataHandler.o` `ld: symbol(s) not found for architecture arm64` `clang: error: linker command failed with exit code 1 (use -v to see invocation)` Any ideas on what is needed to run this ? --- end body --- comments : --- start comments --- --- end comments ---
1,380
208,033
[ "Exiv2", "exiv2" ]
Running `exiv2 ex -e e` on the attached image fails. I'm not sure what the problem is, the output is: ``` Warning: Exif tag Exif.PentaxDng.0x0406 not encoded Warning: Exif tag Exif.PentaxDng.0x0406 not encoded ./IMG_1587.exv: Could not write metadata to file: Size of Exif JPEG segment is larger than 65535 bytes ``` but printing with `exiv2 pr -pv` does not produce an error and the output is less than 65535 bytes (13333) and I assume it is stored more efficiently in the file. The folks with digiKam thought the PentaxDng tag mentioned in the warning needed to be added to a blacklist. I tried with the ubuntu package 0.25-3.1ubuntu0.18.04.1 and building from the 0.26 branch and master and found the same problem. If it is just that the size of exif data is larger than 65535 then this may be a duplicate of #396, but it may still be good to blacklist the tag that produces the warning. ![img_1587](https://user-images.githubusercontent.com/4392238/44069984-08b86b76-9f47-11e8-993a-28204d67c49a.JPG)
Failure to Export Due to Size or Unrecognized Tag
https://api.github.com/repos/Exiv2/exiv2/issues/401/comments
6
"2018-08-15T01:19:30"
"2018-11-07T23:59:23Z"
https://github.com/Exiv2/exiv2/issues/401
350,652,380
401
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Failure to Export Due to Size or Unrecognized Tag Issue date: --- start body --- Running `exiv2 ex -e e` on the attached image fails. I'm not sure what the problem is, the output is: ``` Warning: Exif tag Exif.PentaxDng.0x0406 not encoded Warning: Exif tag Exif.PentaxDng.0x0406 not encoded ./IMG_1587.exv: Could not write metadata to file: Size of Exif JPEG segment is larger than 65535 bytes ``` but printing with `exiv2 pr -pv` does not produce an error and the output is less than 65535 bytes (13333) and I assume it is stored more efficiently in the file. The folks with digiKam thought the PentaxDng tag mentioned in the warning needed to be added to a blacklist. I tried with the ubuntu package 0.25-3.1ubuntu0.18.04.1 and building from the 0.26 branch and master and found the same problem. If it is just that the size of exif data is larger than 65535 then this may be a duplicate of #396, but it may still be good to blacklist the tag that produces the warning. ![img_1587](https://user-images.githubusercontent.com/4392238/44069984-08b86b76-9f47-11e8-993a-28204d67c49a.JPG) --- end body --- comments : --- start comments --- --- end comments ---
1,233
208,034
[ "Exiv2", "exiv2" ]
Following bugs was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) both tested in Ubuntu 16.04, 64bit, Exiv2(master ce516ed && v0.26) `$ exiv2 $POC` ### POC1 https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-16336/poc1-heapoverflow ``` ./bin/exiv2 ../../poc1-heapoverflow ================================================================= ==27206==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef31 at pc 0x7feaa8b0e155 bp 0x7ffdafb8d0c0 sp 0x7ffdafb8d0b0 READ of size 1 at 0x60200000ef31 thread T0 #0 0x7feaa8b0e154 in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:140 #1 0x7feaa8b0d9e7 in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:83 #2 0x7feaa8a4ddc1 in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:488 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7feaa7cea82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #7 0x421e18 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/build_asan/bin/exiv2+0x421e18) 0x60200000ef31 is located 0 bytes to the right of 1-byte region [0x60200000ef30,0x60200000ef31) allocated by thread T0 here: #0 0x7feaa914a6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x453bb9 in Exiv2::DataBuf::DataBuf(long) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/include/exiv2/types.hpp:214 #2 0x7feaa8a4db3a in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:450 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7feaa7cea82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:140 Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa[01]fa fa fa fd fd fa fa 00 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==27206==ABORTING ``` ### POC2 https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-16336/poc2-heapoverflow ``` ./bin/exiv2 ../../poc2-heapoverflow ================================================================= ==27229==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef5e at pc 0x7f109485cf94 bp 0x7ffded4341f0 sp 0x7ffded4341e0 READ of size 1 at 0x60200000ef5e thread T0 #0 0x7f109485cf93 in bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*) /usr/include/c++/5/bits/predefined_ops.h:194 #1 0x7f109485cebd in std::iterator_traits<unsigned char*>::difference_type std::__count_if<unsigned char*, __gnu_cxx::__ops::_Iter_equals_val<char const> >(unsigned char*, unsigned char*, __gnu_cxx::__ops::_Iter_equals_val<char const>) /usr/include/c++/5/bits/stl_algo.h:3193 #2 0x7f109485cd63 in std::iterator_traits<unsigned char*>::difference_type std::count<unsigned char*, char>(unsigned char*, unsigned char*, char const&) /usr/include/c++/5/bits/stl_algo.h:3968 #3 0x7f10948583ef in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:167 #4 0x7f10948579e7 in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:83 #5 0x7f1094797e07 in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:495 #6 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #7 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #8 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #9 0x7f1093a3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #10 0x421e18 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/build_asan/bin/exiv2+0x421e18) 0x60200000ef5e is located 1 bytes to the right of 13-byte region [0x60200000ef50,0x60200000ef5d) allocated by thread T0 here: #0 0x7f1094e946b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x453bb9 in Exiv2::DataBuf::DataBuf(long) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/include/exiv2/types.hpp:214 #2 0x7f1094797b3a in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:450 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7f1093a3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/include/c++/5/bits/predefined_ops.h:194 bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa 00 03 fa fa 00[05]fa fa 00 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==27229==ABORTING ```
CVE-2018-16336: AddressSanitizer: 2 heap-buffer-overflow problems ( Exiv2::Internal::PngChunk::parseTXTChunk() && bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*))
https://api.github.com/repos/Exiv2/exiv2/issues/400/comments
4
"2018-08-14T02:17:50"
"2018-11-07T23:59:43Z"
https://github.com/Exiv2/exiv2/issues/400
350,256,835
400
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-16336: AddressSanitizer: 2 heap-buffer-overflow problems ( Exiv2::Internal::PngChunk::parseTXTChunk() && bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*)) Issue date: --- start body --- Following bugs was found with mem-AFL, which is based on AFL. Mem-AFL is developed by Yanhao(unfuzzable123@gmail.com) & Marsman1996(lqliuyuwei@outlook.com) both tested in Ubuntu 16.04, 64bit, Exiv2(master ce516ed && v0.26) `$ exiv2 $POC` ### POC1 https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-16336/poc1-heapoverflow ``` ./bin/exiv2 ../../poc1-heapoverflow ================================================================= ==27206==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef31 at pc 0x7feaa8b0e155 bp 0x7ffdafb8d0c0 sp 0x7ffdafb8d0b0 READ of size 1 at 0x60200000ef31 thread T0 #0 0x7feaa8b0e154 in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:140 #1 0x7feaa8b0d9e7 in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:83 #2 0x7feaa8a4ddc1 in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:488 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7feaa7cea82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #7 0x421e18 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/build_asan/bin/exiv2+0x421e18) 0x60200000ef31 is located 0 bytes to the right of 1-byte region [0x60200000ef30,0x60200000ef31) allocated by thread T0 here: #0 0x7feaa914a6b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x453bb9 in Exiv2::DataBuf::DataBuf(long) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/include/exiv2/types.hpp:214 #2 0x7feaa8a4db3a in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:450 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7feaa7cea82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:140 Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa[01]fa fa fa fd fd fa fa 00 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==27206==ABORTING ``` ### POC2 https://github.com/Marsman1996/pocs/blob/master/exiv2/CVE-2018-16336/poc2-heapoverflow ``` ./bin/exiv2 ../../poc2-heapoverflow ================================================================= ==27229==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef5e at pc 0x7f109485cf94 bp 0x7ffded4341f0 sp 0x7ffded4341e0 READ of size 1 at 0x60200000ef5e thread T0 #0 0x7f109485cf93 in bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*) /usr/include/c++/5/bits/predefined_ops.h:194 #1 0x7f109485cebd in std::iterator_traits<unsigned char*>::difference_type std::__count_if<unsigned char*, __gnu_cxx::__ops::_Iter_equals_val<char const> >(unsigned char*, unsigned char*, __gnu_cxx::__ops::_Iter_equals_val<char const>) /usr/include/c++/5/bits/stl_algo.h:3193 #2 0x7f109485cd63 in std::iterator_traits<unsigned char*>::difference_type std::count<unsigned char*, char>(unsigned char*, unsigned char*, char const&) /usr/include/c++/5/bits/stl_algo.h:3968 #3 0x7f10948583ef in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:167 #4 0x7f10948579e7 in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngchunk_int.cpp:83 #5 0x7f1094797e07 in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:495 #6 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #7 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #8 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #9 0x7f1093a3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #10 0x421e18 in _start (/home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/build_asan/bin/exiv2+0x421e18) 0x60200000ef5e is located 1 bytes to the right of 13-byte region [0x60200000ef50,0x60200000ef5d) allocated by thread T0 here: #0 0x7f1094e946b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x453bb9 in Exiv2::DataBuf::DataBuf(long) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/include/exiv2/types.hpp:214 #2 0x7f1094797b3a in Exiv2::PngImage::readMetadata() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/pngimage.cpp:450 #3 0x43a4b7 in Action::Print::printSummary() /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:291 #4 0x439d2f in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/actions.cpp:251 #5 0x422407 in main /home/marsman/Desktop/crashana/exiv2/exiv2-ce516eddefbebd31749b361a540832f41f9fe5d0/src/exiv2.cpp:166 #6 0x7f1093a3482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/include/c++/5/bits/predefined_ops.h:194 bool __gnu_cxx::__ops::_Iter_equals_val<char const>::operator()<unsigned char*>(unsigned char*) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa 00 03 fa fa 00[05]fa fa 00 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==27229==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
10,525
208,035
[ "Exiv2", "exiv2" ]
I used exiv2 in my linux , it run well on command line ,in ipython ,and in Jupyter notebook by python3.4 ,but in Jupyter notebook by python3.6 , run following code: cmd = 'exiv2 -pa xxx.tif ' os.system(cmd) only print Exif.Image , parts as Exif.Photo, Exif.GPSInfo, Xmp.Camera and etc haven't print, and error present. Error: exiv2: symbol lookup error: exiv2: undefined symbol: _Z11_exvGettextPKc
[bug] print incompleted in Jupyter notebook by python3.6
https://api.github.com/repos/Exiv2/exiv2/issues/399/comments
2
"2018-08-10T11:21:35"
"2018-08-13T14:32:34Z"
https://github.com/Exiv2/exiv2/issues/399
349,478,352
399
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : [bug] print incompleted in Jupyter notebook by python3.6 Issue date: --- start body --- I used exiv2 in my linux , it run well on command line ,in ipython ,and in Jupyter notebook by python3.4 ,but in Jupyter notebook by python3.6 , run following code: cmd = 'exiv2 -pa xxx.tif ' os.system(cmd) only print Exif.Image , parts as Exif.Photo, Exif.GPSInfo, Xmp.Camera and etc haven't print, and error present. Error: exiv2: symbol lookup error: exiv2: undefined symbol: _Z11_exvGettextPKc --- end body --- comments : --- start comments --- --- end comments ---
627
208,036
[ "Exiv2", "exiv2" ]
On a Canon 450D camera, the Sigma lens "Sigma 17-50mm F2.8 EX DC OS HSM" is wrongly identified as "Canon EF-S 17-55mm f/2.8 IS USM". Canon 450D with firmware 1.1.0 Darktable 2.4.4 on Windows 10
Sigma 17-50mm identified wrong on Canon 450D
https://api.github.com/repos/Exiv2/exiv2/issues/397/comments
5
"2018-08-03T22:14:51"
"2018-08-06T04:35:02Z"
https://github.com/Exiv2/exiv2/issues/397
347,550,933
397
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Sigma 17-50mm identified wrong on Canon 450D Issue date: --- start body --- On a Canon 450D camera, the Sigma lens "Sigma 17-50mm F2.8 EX DC OS HSM" is wrongly identified as "Canon EF-S 17-55mm f/2.8 IS USM". Canon 450D with firmware 1.1.0 Darktable 2.4.4 on Windows 10 --- end body --- comments : --- start comments --- --- end comments ---
404
208,037
[ "Exiv2", "exiv2" ]
What is the maximum length of string that can be accepted by `XMP.dc.description`?
[Question] Length of description in XMP
https://api.github.com/repos/Exiv2/exiv2/issues/396/comments
26
"2018-08-03T22:11:14"
"2021-04-12T17:30:49Z"
https://github.com/Exiv2/exiv2/issues/396
347,550,284
396
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : [Question] Length of description in XMP Issue date: --- start body --- What is the maximum length of string that can be accepted by `XMP.dc.description`? --- end body --- comments : --- start comments --- --- end comments ---
283
208,038
[ "Exiv2", "exiv2" ]
I used 'exiv2 -pa in.tif' ,got following results: ``` Exif.Image.ImageWidth Short 1 1280 Exif.Image.ImageLength Short 1 960 Exif.Image.BitsPerSample Short 1 16 Exif.Image.Compression Short 1 Uncompressed Exif.Image.PhotometricInterpretation Short 1 Black Is Zero Exif.Image.ImageDescription Ascii 7 660 nm Exif.Image.Make Ascii 7 Parrot Exif.Image.Model Ascii 8 Sequoia Exif.Image.StripOffsets Long 1 8 Exif.Image.Orientation Short 1 bottom, right Exif.Image.SamplesPerPixel Short 1 1 Exif.Image.StripByteCounts Long 1 2457600 Exif.Image.PlanarConfiguration Short 1 1 Exif.Image.Software Ascii 7 v1.4.1 Exif.Image.DateTime Ascii 20 2017:07:15 09:24:44 Exif.Image.XMLPacket Byte 4096 (Binary value suppressed) Exif.Image.ExifTag Ifd 1 2457962 Exif.Photo.ExposureTime Rational 1 0.000761538 s Exif.Photo.FNumber Rational 1 F2.2 Exif.Photo.SpectralSensitivity Ascii 7 660 nm Exif.Photo.ISOSpeedRatings Short 1 100 Exif.Photo.DateTimeOriginal Ascii 20 2017:07:15 09:24:44 Exif.Photo.DateTimeDigitized Ascii 20 1970:01:01 00:16:12 Exif.Photo.ShutterSpeedValue SRational 1 1/1313 s Exif.Photo.ApertureValue Rational 1 F2.2 Exif.Photo.MaxApertureValue Rational 1 F2.2 Exif.Photo.FocalLength Rational 1 4.0 mm Exif.Photo.SubSecTime Ascii 7 567898 Exif.Photo.SubSecTimeOriginal Ascii 7 567898 Exif.Photo.SubSecTimeDigitized Ascii 7 140503 Exif.Photo.PixelXDimension Long 1 1280 Exif.Photo.PixelYDimension Long 1 960 Exif.Photo.FocalPlaneXResolution Rational 1 266.667 Exif.Photo.FocalPlaneYResolution Rational 1 266.667 Exif.Photo.FocalPlaneResolutionUnit Short 1 (4) Exif.Photo.ExposureMode Short 1 Auto Exif.Photo.FocalLengthIn35mmFilm Short 1 30.0 mm Exif.Photo.ImageUniqueID Ascii 33 3926CAAE2B8AA99F6EC80DFE6B9EA495 Exif.Photo.BodySerialNumber Ascii 19 PI040378AD7D003106 Exif.Image.GPSTag Ifd 1 2458434 Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North Exif.GPSInfo.GPSLatitude Rational 3 44deg 23' 36.574" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East Exif.GPSInfo.GPSLongitude Rational 3 85deg 54' 53.616" Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 532.7 m Exif.GPSInfo.GPSTimeStamp Rational 3 09:24:42.8 Exif.GPSInfo.GPSStatus Ascii 2 Measurement in progress Exif.GPSInfo.GPSSpeedRef Ascii 2 km/h Exif.GPSInfo.GPSSpeed Rational 1 2147483647/32703466 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 Exif.GPSInfo.GPSDateStamp Ascii 11 2017:07:15 Exif.Image.BlackLevelRepeatDim Short 2 2 2 Exif.Image.BlackLevel Long 4 7445 7523 7481 7483 Exif.Image.CameraSerialNumber Ascii 19 PI040378AD7D003106 Exif.Image.OriginalRawFileName Byte 31 73 77 71 95 49 55 48 55 49 53 95 48 57 50 52 52 52 95 48 52 48 54 95 82 69 68 46 84 73 70 0 Xmp.Camera.RigName XmpText 7 Sequoia Xmp.Camera.RigCameraIndex XmpText 1 1 Xmp.Camera.Yaw XmpText 10 -20.153639 Xmp.Camera.Pitch XmpText 9 -2.306569 Xmp.Camera.Roll XmpText 8 7.731934 Xmp.Camera.BandGain XmpText 8 1.000000 Xmp.Camera.SensorTemperature XmpText 9 73.571411 Xmp.Camera.LineReadoutTime XmpText 5 23076 Xmp.Camera.RigRelatives XmpText 58 -0.204075992967256,-0.131260584800942,-0.00715957119893822 Xmp.Camera.PrincipalPoint XmpText 17 2.556034,1.768705 Xmp.Camera.ModelType XmpText 7 fisheye Xmp.Camera.FisheyeAffineSymmetric XmpText 1 1 Xmp.Camera.FisheyeAffineMatrix XmpText 33 1657.439789335,0,0,1657.439789335 Xmp.Camera.FisheyePolynomial XmpText 28 0,1,0.016237875,-0.156401792 Xmp.Camera.GPSXYAccuracy XmpText 8 0.596798 Xmp.Camera.GPSZAccuracy XmpText 8 0.914000 Xmp.Camera.FlightUUID XmpText 32 DD4B2E9EAC666AD9F4565ACD0D56F0CE Xmp.Camera.CaptureUUID XmpText 32 D374699AEA53001990F3CF980EB16AE3 Xmp.Camera.SunshineSerialNumber XmpText 18 PI040379BB7D003235 Xmp.Camera.IrradianceCalibrationMeasurement XmpText 59 0,600,34,9,1,600,826,222,2,600,13821,3630,3,600,65535,65535 Xmp.Camera.CalibrationMeasurement XmpText 25 1,0.00258397932816537,472 Xmp.Camera.CalibrationPicture XmpText 1 0 Xmp.Camera.IrradianceCalibrationMeasurementGolden XmpText 63 0,600,33,8 ,1,600,818,210 ,2,600,13685,3462 ,3,600,65535,65535 Xmp.Camera.IrradianceSensitivitiesGolden XmpText 20 367.84662,97.5327952 Xmp.Camera.IrradianceUnitScale XmpText 18 1.7873713395012918 Xmp.Camera.SensorModel XmpSeq 1 284151.2689060456,4771.694691528466,2797.1620265741567 Xmp.Camera.BandName XmpSeq 1 Red Xmp.Camera.CentralWavelength XmpSeq 1 660.000000 Xmp.Camera.WavelengthFWHM XmpSeq 1 40.000000 Xmp.Camera.BlackCurrent XmpSeq 1 76.000000 Xmp.Camera.VignettingPolynomial2DName XmpSeq 1 0,0,1,0,2,0,3,0,4,0,0,1,0,2,0,3,0,4,1,1,1,2,1,3,2,1,2,2,3,1 Xmp.Camera.VignettingPolynomial2D XmpSeq 1 0.7089477528133445,1.1704369645811359,-2.1554127203967468,1.9882022411451421,-0.8729387111138820,0.3923627372846291,-0.4593519006320445,0.1123857772576540,-0.0805605979731263,-0.9200345519459264,0.8342438121532845,0.0305598321600225,0.9638772215100829,-0.8419755426105473,-0.0780893133094093 Xmp.Camera.InvalidPixel XmpSeq 1 1148,118,1148,118,249,618,182,709 Xmp.Camera.IrradianceList XmpText 338 6a/YOQAAAABMD/UDAQBkABBjM0JnZhVBgxBJwKeu2zkAAAAAHg/pAwEAZADqgjVCGOkQQdNlvL9Xv945AAAAAA0P5QMBAGQAYm81QtDkC0FT4g/Akc7hOQAAAAAPD+UDAQBkAKO0NUK7gxBBYsYhwKvn5DkAAAAAGA/nAwEAZACyRDVCS8UcQVfjKsDP6+c5AAAAAMcO0gMBAGQAE1c2QoXwGkF2Epu/lvnqOQAAAADeDtgDAQBkAJF6OEJuIC9Bp4MLvRsH7jkAAAAA/w7hAwEAZAArajdCkA8mQZSeLsDdDvE5AAAAAA0P5QMBAGQAFX84QpmuL0HGvxTA ``` and used `$ exiv2 -ex a in.tif`, I got in.exv, as follows: ``` Exif.Image.ImageWidth Short 1 1280 Exif.Image.ImageLength Short 1 960 Exif.Image.BitsPerSample Short 3 8 8 8 Exif.Image.Compression Short 1 Uncompressed Exif.Image.PhotometricInterpretation Short 1 RGB Exif.Image.SamplesPerPixel Short 1 3 Exif.Image.RowsPerStrip Short 1 2 ▽ ÿ^AExiv2ÿá^T^Bhttp://ns.adobe.com/xap/1.0/^@<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:Camera="http://pix4d.com/camera/1.0/" Camera:RigName="Sequoia" Camera:RigCameraIndex="1" Camera:Yaw="-20.153639" Camera:Pitch="-2.306569" Camera:Roll="7.731934" Camera:BandGain="1.000000" Camera:SensorTemperature="73.571411" Camera:LineReadoutTime="23076" Camera:RigRelatives="-0.204075992967256,-0.131260584800942,-0.00715957119893822" Camera:PrincipalPoint="2.556034,1.768705" Camera:ModelType="fisheye" Camera:FisheyeAffineSymmetric="1" Camera:FisheyeAffineMatrix="1657.439789335,0,0,1657.439789335" Camera:FisheyePolynomial="0,1,0.016237875,-0.156401792" Camera:GPSXYAccuracy="0.596798" Camera:GPSZAccuracy="0.914000" Camera:FlightUUID="DD4B2E9EAC666AD9F4565ACD0D56F0CE" Camera:CaptureUUID="D374699AEA53001990F3CF980EB16AE3" Camera:SunshineSerialNumber="PI040379BB7D003235" Camera:IrradianceCalibrationMeasurement="0,600,34,9,1,600,826,222,2,600,13821,3630,3,600,65535,65535" Camera:CalibrationMeasurement="1,0.00258397932816537,472" Camera:CalibrationPicture="0" Camera:IrradianceCalibrationMeasurementGolden="0,600,33,8 ,1,600,818,210 ,2,600,13685,3462 ,3,600,65535,65535 " Camera:IrradianceSensitivitiesGolden="367.84662,97.5327952" Camera:IrradianceUnitScale="1.7873713395012918" Camera:IrradianceList="&#xA;6a/YOQAAAABMD/UDAQBkABBjM0JnZhVBgxBJwKeu2zkAAAAAHg/pAwEAZADqgjVCGOkQQdNlvL9Xv945AAAAAA0P5QMBAGQAYm81QtDkC0FT4g/Akc7hOQAAAAAPD+UDAQBkAKO0NUK7gxBBYsYhwKvn5DkAAAAAGA/nAwEAZACyRDVCS8UcQVfjKsDP6+c5AAAAAMcO0gMBAGQAE1c2QoXwGkF2Epu/lvnqOQAAAADeDtgDAQBkAJF6OEJuIC9Bp4MLvRsH7jkAAAAA/w7hAwEAZAArajdCkA8mQZSe "IMG_170715_092444_0406.exv" [noeol][converted] 1L, 5141C 1,1 All ``` How can I get the results showing in `$ exiv2 -pa in.tif` and insert to out.jpg?
how to deep copy metadata from one image to another
https://api.github.com/repos/Exiv2/exiv2/issues/392/comments
14
"2018-08-01T09:37:12"
"2019-01-25T09:48:36Z"
https://github.com/Exiv2/exiv2/issues/392
346,523,164
392
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : how to deep copy metadata from one image to another Issue date: --- start body --- I used 'exiv2 -pa in.tif' ,got following results: ``` Exif.Image.ImageWidth Short 1 1280 Exif.Image.ImageLength Short 1 960 Exif.Image.BitsPerSample Short 1 16 Exif.Image.Compression Short 1 Uncompressed Exif.Image.PhotometricInterpretation Short 1 Black Is Zero Exif.Image.ImageDescription Ascii 7 660 nm Exif.Image.Make Ascii 7 Parrot Exif.Image.Model Ascii 8 Sequoia Exif.Image.StripOffsets Long 1 8 Exif.Image.Orientation Short 1 bottom, right Exif.Image.SamplesPerPixel Short 1 1 Exif.Image.StripByteCounts Long 1 2457600 Exif.Image.PlanarConfiguration Short 1 1 Exif.Image.Software Ascii 7 v1.4.1 Exif.Image.DateTime Ascii 20 2017:07:15 09:24:44 Exif.Image.XMLPacket Byte 4096 (Binary value suppressed) Exif.Image.ExifTag Ifd 1 2457962 Exif.Photo.ExposureTime Rational 1 0.000761538 s Exif.Photo.FNumber Rational 1 F2.2 Exif.Photo.SpectralSensitivity Ascii 7 660 nm Exif.Photo.ISOSpeedRatings Short 1 100 Exif.Photo.DateTimeOriginal Ascii 20 2017:07:15 09:24:44 Exif.Photo.DateTimeDigitized Ascii 20 1970:01:01 00:16:12 Exif.Photo.ShutterSpeedValue SRational 1 1/1313 s Exif.Photo.ApertureValue Rational 1 F2.2 Exif.Photo.MaxApertureValue Rational 1 F2.2 Exif.Photo.FocalLength Rational 1 4.0 mm Exif.Photo.SubSecTime Ascii 7 567898 Exif.Photo.SubSecTimeOriginal Ascii 7 567898 Exif.Photo.SubSecTimeDigitized Ascii 7 140503 Exif.Photo.PixelXDimension Long 1 1280 Exif.Photo.PixelYDimension Long 1 960 Exif.Photo.FocalPlaneXResolution Rational 1 266.667 Exif.Photo.FocalPlaneYResolution Rational 1 266.667 Exif.Photo.FocalPlaneResolutionUnit Short 1 (4) Exif.Photo.ExposureMode Short 1 Auto Exif.Photo.FocalLengthIn35mmFilm Short 1 30.0 mm Exif.Photo.ImageUniqueID Ascii 33 3926CAAE2B8AA99F6EC80DFE6B9EA495 Exif.Photo.BodySerialNumber Ascii 19 PI040378AD7D003106 Exif.Image.GPSTag Ifd 1 2458434 Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0 Exif.GPSInfo.GPSLatitudeRef Ascii 2 North Exif.GPSInfo.GPSLatitude Rational 3 44deg 23' 36.574" Exif.GPSInfo.GPSLongitudeRef Ascii 2 East Exif.GPSInfo.GPSLongitude Rational 3 85deg 54' 53.616" Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level Exif.GPSInfo.GPSAltitude Rational 1 532.7 m Exif.GPSInfo.GPSTimeStamp Rational 3 09:24:42.8 Exif.GPSInfo.GPSStatus Ascii 2 Measurement in progress Exif.GPSInfo.GPSSpeedRef Ascii 2 km/h Exif.GPSInfo.GPSSpeed Rational 1 2147483647/32703466 Exif.GPSInfo.GPSMapDatum Ascii 7 WGS-84 Exif.GPSInfo.GPSDateStamp Ascii 11 2017:07:15 Exif.Image.BlackLevelRepeatDim Short 2 2 2 Exif.Image.BlackLevel Long 4 7445 7523 7481 7483 Exif.Image.CameraSerialNumber Ascii 19 PI040378AD7D003106 Exif.Image.OriginalRawFileName Byte 31 73 77 71 95 49 55 48 55 49 53 95 48 57 50 52 52 52 95 48 52 48 54 95 82 69 68 46 84 73 70 0 Xmp.Camera.RigName XmpText 7 Sequoia Xmp.Camera.RigCameraIndex XmpText 1 1 Xmp.Camera.Yaw XmpText 10 -20.153639 Xmp.Camera.Pitch XmpText 9 -2.306569 Xmp.Camera.Roll XmpText 8 7.731934 Xmp.Camera.BandGain XmpText 8 1.000000 Xmp.Camera.SensorTemperature XmpText 9 73.571411 Xmp.Camera.LineReadoutTime XmpText 5 23076 Xmp.Camera.RigRelatives XmpText 58 -0.204075992967256,-0.131260584800942,-0.00715957119893822 Xmp.Camera.PrincipalPoint XmpText 17 2.556034,1.768705 Xmp.Camera.ModelType XmpText 7 fisheye Xmp.Camera.FisheyeAffineSymmetric XmpText 1 1 Xmp.Camera.FisheyeAffineMatrix XmpText 33 1657.439789335,0,0,1657.439789335 Xmp.Camera.FisheyePolynomial XmpText 28 0,1,0.016237875,-0.156401792 Xmp.Camera.GPSXYAccuracy XmpText 8 0.596798 Xmp.Camera.GPSZAccuracy XmpText 8 0.914000 Xmp.Camera.FlightUUID XmpText 32 DD4B2E9EAC666AD9F4565ACD0D56F0CE Xmp.Camera.CaptureUUID XmpText 32 D374699AEA53001990F3CF980EB16AE3 Xmp.Camera.SunshineSerialNumber XmpText 18 PI040379BB7D003235 Xmp.Camera.IrradianceCalibrationMeasurement XmpText 59 0,600,34,9,1,600,826,222,2,600,13821,3630,3,600,65535,65535 Xmp.Camera.CalibrationMeasurement XmpText 25 1,0.00258397932816537,472 Xmp.Camera.CalibrationPicture XmpText 1 0 Xmp.Camera.IrradianceCalibrationMeasurementGolden XmpText 63 0,600,33,8 ,1,600,818,210 ,2,600,13685,3462 ,3,600,65535,65535 Xmp.Camera.IrradianceSensitivitiesGolden XmpText 20 367.84662,97.5327952 Xmp.Camera.IrradianceUnitScale XmpText 18 1.7873713395012918 Xmp.Camera.SensorModel XmpSeq 1 284151.2689060456,4771.694691528466,2797.1620265741567 Xmp.Camera.BandName XmpSeq 1 Red Xmp.Camera.CentralWavelength XmpSeq 1 660.000000 Xmp.Camera.WavelengthFWHM XmpSeq 1 40.000000 Xmp.Camera.BlackCurrent XmpSeq 1 76.000000 Xmp.Camera.VignettingPolynomial2DName XmpSeq 1 0,0,1,0,2,0,3,0,4,0,0,1,0,2,0,3,0,4,1,1,1,2,1,3,2,1,2,2,3,1 Xmp.Camera.VignettingPolynomial2D XmpSeq 1 0.7089477528133445,1.1704369645811359,-2.1554127203967468,1.9882022411451421,-0.8729387111138820,0.3923627372846291,-0.4593519006320445,0.1123857772576540,-0.0805605979731263,-0.9200345519459264,0.8342438121532845,0.0305598321600225,0.9638772215100829,-0.8419755426105473,-0.0780893133094093 Xmp.Camera.InvalidPixel XmpSeq 1 1148,118,1148,118,249,618,182,709 Xmp.Camera.IrradianceList XmpText 338 6a/YOQAAAABMD/UDAQBkABBjM0JnZhVBgxBJwKeu2zkAAAAAHg/pAwEAZADqgjVCGOkQQdNlvL9Xv945AAAAAA0P5QMBAGQAYm81QtDkC0FT4g/Akc7hOQAAAAAPD+UDAQBkAKO0NUK7gxBBYsYhwKvn5DkAAAAAGA/nAwEAZACyRDVCS8UcQVfjKsDP6+c5AAAAAMcO0gMBAGQAE1c2QoXwGkF2Epu/lvnqOQAAAADeDtgDAQBkAJF6OEJuIC9Bp4MLvRsH7jkAAAAA/w7hAwEAZAArajdCkA8mQZSeLsDdDvE5AAAAAA0P5QMBAGQAFX84QpmuL0HGvxTA ``` and used `$ exiv2 -ex a in.tif`, I got in.exv, as follows: ``` Exif.Image.ImageWidth Short 1 1280 Exif.Image.ImageLength Short 1 960 Exif.Image.BitsPerSample Short 3 8 8 8 Exif.Image.Compression Short 1 Uncompressed Exif.Image.PhotometricInterpretation Short 1 RGB Exif.Image.SamplesPerPixel Short 1 3 Exif.Image.RowsPerStrip Short 1 2 ▽ ÿ^AExiv2ÿá^T^Bhttp://ns.adobe.com/xap/1.0/^@<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:Camera="http://pix4d.com/camera/1.0/" Camera:RigName="Sequoia" Camera:RigCameraIndex="1" Camera:Yaw="-20.153639" Camera:Pitch="-2.306569" Camera:Roll="7.731934" Camera:BandGain="1.000000" Camera:SensorTemperature="73.571411" Camera:LineReadoutTime="23076" Camera:RigRelatives="-0.204075992967256,-0.131260584800942,-0.00715957119893822" Camera:PrincipalPoint="2.556034,1.768705" Camera:ModelType="fisheye" Camera:FisheyeAffineSymmetric="1" Camera:FisheyeAffineMatrix="1657.439789335,0,0,1657.439789335" Camera:FisheyePolynomial="0,1,0.016237875,-0.156401792" Camera:GPSXYAccuracy="0.596798" Camera:GPSZAccuracy="0.914000" Camera:FlightUUID="DD4B2E9EAC666AD9F4565ACD0D56F0CE" Camera:CaptureUUID="D374699AEA53001990F3CF980EB16AE3" Camera:SunshineSerialNumber="PI040379BB7D003235" Camera:IrradianceCalibrationMeasurement="0,600,34,9,1,600,826,222,2,600,13821,3630,3,600,65535,65535" Camera:CalibrationMeasurement="1,0.00258397932816537,472" Camera:CalibrationPicture="0" Camera:IrradianceCalibrationMeasurementGolden="0,600,33,8 ,1,600,818,210 ,2,600,13685,3462 ,3,600,65535,65535 " Camera:IrradianceSensitivitiesGolden="367.84662,97.5327952" Camera:IrradianceUnitScale="1.7873713395012918" Camera:IrradianceList="&#xA;6a/YOQAAAABMD/UDAQBkABBjM0JnZhVBgxBJwKeu2zkAAAAAHg/pAwEAZADqgjVCGOkQQdNlvL9Xv945AAAAAA0P5QMBAGQAYm81QtDkC0FT4g/Akc7hOQAAAAAPD+UDAQBkAKO0NUK7gxBBYsYhwKvn5DkAAAAAGA/nAwEAZACyRDVCS8UcQVfjKsDP6+c5AAAAAMcO0gMBAGQAE1c2QoXwGkF2Epu/lvnqOQAAAADeDtgDAQBkAJF6OEJuIC9Bp4MLvRsH7jkAAAAA/w7hAwEAZAArajdCkA8mQZSe "IMG_170715_092444_0406.exv" [noeol][converted] 1L, 5141C 1,1 All ``` How can I get the results showing in `$ exiv2 -pa in.tif` and insert to out.jpg? --- end body --- comments : --- start comments --- --- end comments ---
10,305
208,039
[ "Exiv2", "exiv2" ]
We are very close to finish the migration of tests from the old bash system to the new python framework (for details, check #250). Before accomplishing this task, it would be good to have some code coverage statistics to guarantee that the code coverage achieved by the unit tests and python tests is equal or greater than the code exercised by the bash test suite. In this [project](https://github.com/ainfosec/ci_helloworld) we can find some examples showing how to integrate the reports in markdown.
Add code coverage metrics
https://api.github.com/repos/Exiv2/exiv2/issues/390/comments
1
"2018-07-31T16:32:50"
"2018-08-01T06:09:39Z"
https://github.com/Exiv2/exiv2/issues/390
346,265,724
390
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Add code coverage metrics Issue date: --- start body --- We are very close to finish the migration of tests from the old bash system to the new python framework (for details, check #250). Before accomplishing this task, it would be good to have some code coverage statistics to guarantee that the code coverage achieved by the unit tests and python tests is equal or greater than the code exercised by the bash test suite. In this [project](https://github.com/ainfosec/ci_helloworld) we can find some examples showing how to integrate the reports in markdown. --- end body --- comments : --- start comments --- --- end comments ---
699
208,040
[ "Exiv2", "exiv2" ]
I'm trying to locate the enumerated color space value in jp2 files. I cannot find a way to do this for jp2 or any other image formats in Exiv2's API documentation. Can Exiv2 currently locate this information?
Question: is it possible to extract the enumerated color space from an image?
https://api.github.com/repos/Exiv2/exiv2/issues/386/comments
2
"2018-07-23T15:12:05"
"2018-07-24T07:55:38Z"
https://github.com/Exiv2/exiv2/issues/386
343,675,480
386
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Question: is it possible to extract the enumerated color space from an image? Issue date: --- start body --- I'm trying to locate the enumerated color space value in jp2 files. I cannot find a way to do this for jp2 or any other image formats in Exiv2's API documentation. Can Exiv2 currently locate this information? --- end body --- comments : --- start comments --- --- end comments ---
446
208,041
[ "Exiv2", "exiv2" ]
I know, its not a code issue but www.exiv2.org is down.
www.exiv2.org is down
https://api.github.com/repos/Exiv2/exiv2/issues/385/comments
2
"2018-07-20T10:36:25"
"2018-07-21T17:29:58Z"
https://github.com/Exiv2/exiv2/issues/385
343,058,496
385
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : www.exiv2.org is down Issue date: --- start body --- I know, its not a code issue but www.exiv2.org is down. --- end body --- comments : --- start comments --- --- end comments ---
237
208,042
[ "Exiv2", "exiv2" ]
File: geotag.cpp ``` #if defined(_MSC_VER) || defined(__MINGW__) #include <windows.h> char* realpath(const char* file,char* path); #define lstat _stat #define stat _stat #if _MSC_VER < 1400 #define strcpy_s(d,l,s) strcpy(d,s) #define strcat_s(d,l,s) strcat(d,s) #endif #endif ``` and ``` #ifdef __APPLE__ char buffer[1024]; #else char* buffer = NULL; #endif char* path = realpath(arg,buffer); if ( t && path ) { if ( options.verbose) printf("%s %ld %s",path,(long int)t,asctime(localtime(&t))); gFiles.push_back(path); } if ( path && path != buffer ) ::free((void*) path); } if ( type == typeUnknown ) { fprintf(stderr,"error: illegal syntax %s\n",arg); result = resultSyntaxError ; } } break; } } ``` According to the documentation of `realpath()` the output buffer needs to be at least of size `PATH_MAX` specifying output buffers large enough to handle the maximum-size possible result from path manipulation functions. In that instance, buf's size comes from `uv__fs_pathmax_size()`. That function attempts to use `pathconf(path, _PC_PATH_MAX)` as noted in the realpath(3) docs. But over here `uv__fs_pathmax_size()` nor `pathconf(path, _PC_PATH_MAX)` is used. Passing an inadequately-sized output buffer to a path manipulation function can result in a buffer overflow. Such functions include `realpath()` `readlink()` `PathAppend()` and others.
Potential buffer overflow in geotag.cpp on non-glibc systems
https://api.github.com/repos/Exiv2/exiv2/issues/382/comments
11
"2018-07-14T15:29:09"
"2018-11-06T05:51:33Z"
https://github.com/Exiv2/exiv2/issues/382
341,244,259
382
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Potential buffer overflow in geotag.cpp on non-glibc systems Issue date: --- start body --- File: geotag.cpp ``` #if defined(_MSC_VER) || defined(__MINGW__) #include <windows.h> char* realpath(const char* file,char* path); #define lstat _stat #define stat _stat #if _MSC_VER < 1400 #define strcpy_s(d,l,s) strcpy(d,s) #define strcat_s(d,l,s) strcat(d,s) #endif #endif ``` and ``` #ifdef __APPLE__ char buffer[1024]; #else char* buffer = NULL; #endif char* path = realpath(arg,buffer); if ( t && path ) { if ( options.verbose) printf("%s %ld %s",path,(long int)t,asctime(localtime(&t))); gFiles.push_back(path); } if ( path && path != buffer ) ::free((void*) path); } if ( type == typeUnknown ) { fprintf(stderr,"error: illegal syntax %s\n",arg); result = resultSyntaxError ; } } break; } } ``` According to the documentation of `realpath()` the output buffer needs to be at least of size `PATH_MAX` specifying output buffers large enough to handle the maximum-size possible result from path manipulation functions. In that instance, buf's size comes from `uv__fs_pathmax_size()`. That function attempts to use `pathconf(path, _PC_PATH_MAX)` as noted in the realpath(3) docs. But over here `uv__fs_pathmax_size()` nor `pathconf(path, _PC_PATH_MAX)` is used. Passing an inadequately-sized output buffer to a path manipulation function can result in a buffer overflow. Such functions include `realpath()` `readlink()` `PathAppend()` and others. --- end body --- comments : --- start comments --- --- end comments ---
1,908
208,043
[ "Exiv2", "exiv2" ]
``` $ exiv2 -pp $POC ================================================================= ==23==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef32 at pc 0x7f19a962fc0e bp 0x7fff01cdcc00 sp 0x7fff01cdcbf0 READ of size 3 at 0x60200000ef32 thread T0 #0 0x7f19a962fc0d in Exiv2::WebPImage::decodeChunks(unsigned long) /src/exiv2/src/webpimage.cpp:563 #1 0x7f19a9634cbe in Exiv2::WebPImage::readMetadata() /src/exiv2/src/webpimage.cpp:496 #2 0x462b13 in Action::Print::printPreviewList() /src/exiv2/src/actions.cpp:801 #3 0x46f837 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /src/exiv2/src/actions.cpp:254 #4 0x40c735 in main /src/exiv2/src/exiv2.cpp:166 #5 0x7f19a87b482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #6 0x40d688 in _start (/src/aflbuild/installed/bin/exiv2+0x40d688) 0x60200000ef34 is located 0 bytes to the right of 4-byte region [0x60200000ef30,0x60200000ef34) allocated by thread T0 here: #0 0x7f19a9f656b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f19a962bbc7 in Exiv2::DataBuf::DataBuf(long) /src/exiv2/include/exiv2/types.hpp:206 #2 0x7f19a962bbc7 in Exiv2::WebPImage::decodeChunks(unsigned long) /src/exiv2/src/webpimage.cpp:517 SUMMARY: AddressSanitizer: heap-buffer-overflow /src/exiv2/src/webpimage.cpp:563 Exiv2::WebPImage::decodeChunks(unsigned long) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa[04]fa fa fa 05 fa fa fa 05 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fa 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==23==ABORTING ``` [1-poc-heapoverflow](https://github.com/TeamSeri0us/pocs/blob/master/exiv2/1-poc-heapoverflow)
AddressSanitizer: heap-buffer-overflow /src/exiv2/src/webpimage.cpp:563 Exiv2::WebPImage::decodeChunks(unsigned long)
https://api.github.com/repos/Exiv2/exiv2/issues/378/comments
1
"2018-07-09T01:52:51"
"2018-11-08T00:00:13Z"
https://github.com/Exiv2/exiv2/issues/378
339,280,162
378
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : AddressSanitizer: heap-buffer-overflow /src/exiv2/src/webpimage.cpp:563 Exiv2::WebPImage::decodeChunks(unsigned long) Issue date: --- start body --- ``` $ exiv2 -pp $POC ================================================================= ==23==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ef32 at pc 0x7f19a962fc0e bp 0x7fff01cdcc00 sp 0x7fff01cdcbf0 READ of size 3 at 0x60200000ef32 thread T0 #0 0x7f19a962fc0d in Exiv2::WebPImage::decodeChunks(unsigned long) /src/exiv2/src/webpimage.cpp:563 #1 0x7f19a9634cbe in Exiv2::WebPImage::readMetadata() /src/exiv2/src/webpimage.cpp:496 #2 0x462b13 in Action::Print::printPreviewList() /src/exiv2/src/actions.cpp:801 #3 0x46f837 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /src/exiv2/src/actions.cpp:254 #4 0x40c735 in main /src/exiv2/src/exiv2.cpp:166 #5 0x7f19a87b482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #6 0x40d688 in _start (/src/aflbuild/installed/bin/exiv2+0x40d688) 0x60200000ef34 is located 0 bytes to the right of 4-byte region [0x60200000ef30,0x60200000ef34) allocated by thread T0 here: #0 0x7f19a9f656b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7f19a962bbc7 in Exiv2::DataBuf::DataBuf(long) /src/exiv2/include/exiv2/types.hpp:206 #2 0x7f19a962bbc7 in Exiv2::WebPImage::decodeChunks(unsigned long) /src/exiv2/src/webpimage.cpp:517 SUMMARY: AddressSanitizer: heap-buffer-overflow /src/exiv2/src/webpimage.cpp:563 Exiv2::WebPImage::decodeChunks(unsigned long) Shadow bytes around the buggy address: 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9db0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9dd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c047fff9de0: fa fa fa fa fa fa[04]fa fa fa 05 fa fa fa 05 fa 0x0c047fff9df0: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fa 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9e30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==23==ABORTING ``` [1-poc-heapoverflow](https://github.com/TeamSeri0us/pocs/blob/master/exiv2/1-poc-heapoverflow) --- end body --- comments : --- start comments --- --- end comments ---
3,305
208,044
[ "Exiv2", "exiv2" ]
This breaks everything in the test suite. The reason is amazing. The fix is almost trivial (and beautiful). We should not `#include <stdlib.h>` from the config.h (which is usually the first include). This causes `extern char* optarg;` to be defined by Cygwin's `/usr/include/getopt.h` as `extern char* __declspec(dllimport) optarg` . Our code in src/getopt_win32.{ c | h } to uses our `extern char* optarg;`, however src/utils.cpp uses Cygwin's __declspec versions. Goodness. We have two different externs with the same name! The C++ name-mangler knows the difference. In utils.cpp, we: ``` 630 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ grep include ../src/utils.cpp // included header files #include "config.h" #include "utils.hpp" #include "getopt_win32.h" // + standard includes # include <unistd.h> // for stat() ... ``` By delaying unistd.h, getopt_win32.h sets guards such as `__GETOPT_H__` to hide the library's getopt externs. Amazing! Fix is so simple _**don't include stdlib.h from include/exiv2/config.h**_ ``` 631 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ git diff diff --git a/include/exiv2/config.h b/include/exiv2/config.h index c1352d4..8f32837 100644 --- a/include/exiv2/config.h +++ b/include/exiv2/config.h @@ -205,9 +205,6 @@ typedef int pid_t; ////////////////////////////////////// # include <stdio.h> -#ifdef EXV_HAVE_UNISTD_H -#include <unistd.h> -#endif #ifdef __cplusplus #include <string> #include <iostream> 632 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ ``` Software is tricky stuff! If I can figure that in 2-3 hours, maybe, I'm not too old for this stuff after all.
Cygwin exiv2.exe command-line parsing is broken.
https://api.github.com/repos/Exiv2/exiv2/issues/377/comments
3
"2018-07-06T14:23:14"
"2018-08-31T10:10:03Z"
https://github.com/Exiv2/exiv2/issues/377
338,958,493
377
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Cygwin exiv2.exe command-line parsing is broken. Issue date: --- start body --- This breaks everything in the test suite. The reason is amazing. The fix is almost trivial (and beautiful). We should not `#include <stdlib.h>` from the config.h (which is usually the first include). This causes `extern char* optarg;` to be defined by Cygwin's `/usr/include/getopt.h` as `extern char* __declspec(dllimport) optarg` . Our code in src/getopt_win32.{ c | h } to uses our `extern char* optarg;`, however src/utils.cpp uses Cygwin's __declspec versions. Goodness. We have two different externs with the same name! The C++ name-mangler knows the difference. In utils.cpp, we: ``` 630 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ grep include ../src/utils.cpp // included header files #include "config.h" #include "utils.hpp" #include "getopt_win32.h" // + standard includes # include <unistd.h> // for stat() ... ``` By delaying unistd.h, getopt_win32.h sets guards such as `__GETOPT_H__` to hide the library's getopt externs. Amazing! Fix is so simple _**don't include stdlib.h from include/exiv2/config.h**_ ``` 631 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ git diff diff --git a/include/exiv2/config.h b/include/exiv2/config.h index c1352d4..8f32837 100644 --- a/include/exiv2/config.h +++ b/include/exiv2/config.h @@ -205,9 +205,6 @@ typedef int pid_t; ////////////////////////////////////// # include <stdio.h> -#ifdef EXV_HAVE_UNISTD_H -#include <unistd.h> -#endif #ifdef __cplusplus #include <string> #include <iostream> 632 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2/build $ ``` Software is tricky stuff! If I can figure that in 2-3 hours, maybe, I'm not too old for this stuff after all. --- end body --- comments : --- start comments --- --- end comments ---
1,921
208,045
[ "Exiv2", "exiv2" ]
I can't debug into the application code in the exiv2 application from Xcode. This was working in v0.26. Application code (such as actions.cpp, exiv2.cpp) are shown in the debugger as 'pseudo machine code'. The debugging is stepping machine code instead of src/actions.cpp and src/exiv2.cpp. I've tried setting the CMake debug flag and CXXFLAGS without success ``` cmake -DCMAKE_BUILD_TYPE=Debug .. -G Xcode env CXXFLAGS=-g cmake .. -G Xcode ``` The build output reports: ``` -- Debug: -g -- Release: -O3 -DNDEBUG -- RelWithDebInfo: -O2 -g -DNDEBUG -- MinSizeRel: -Os -DNDEBUG ``` I think the default is 'Debug -g' and that applies to the library. However it doesn't seem to apply to samples and applications.
Unable to debug exiv2 application code from Xcode
https://api.github.com/repos/Exiv2/exiv2/issues/374/comments
4
"2018-07-03T13:04:22"
"2018-08-13T15:39:14Z"
https://github.com/Exiv2/exiv2/issues/374
337,890,175
374
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Unable to debug exiv2 application code from Xcode Issue date: --- start body --- I can't debug into the application code in the exiv2 application from Xcode. This was working in v0.26. Application code (such as actions.cpp, exiv2.cpp) are shown in the debugger as 'pseudo machine code'. The debugging is stepping machine code instead of src/actions.cpp and src/exiv2.cpp. I've tried setting the CMake debug flag and CXXFLAGS without success ``` cmake -DCMAKE_BUILD_TYPE=Debug .. -G Xcode env CXXFLAGS=-g cmake .. -G Xcode ``` The build output reports: ``` -- Debug: -g -- Release: -O3 -DNDEBUG -- RelWithDebInfo: -O2 -g -DNDEBUG -- MinSizeRel: -Os -DNDEBUG ``` I think the default is 'Debug -g' and that applies to the library. However it doesn't seem to apply to samples and applications. --- end body --- comments : --- start comments --- --- end comments ---
973
208,046
[ "Exiv2", "exiv2" ]
I am attaching a picture taken yesterday with my camera. Exiv2 fails on this picture with the messages ``` invalid type value detected in Image::printIFDStructure: 21059 Exiv2 exception in print action for file _MG_2027.CR2: invalid type value detected in Image::printIFDStructure ``` Perhaps I should debug this before posting here, but this issue and #156 which is raised often by photos from my camera are preventing me from using other software that relies on exiv2. If it's anything useful I realized that the photos that are failing are all that I have taken with an external flash [_MG_2027.zip](https://github.com/Exiv2/exiv2/files/2152233/_MG_2027.zip)
invalid type value detected in Image::printIFDStructure: 21059
https://api.github.com/repos/Exiv2/exiv2/issues/373/comments
4
"2018-06-30T22:18:12"
"2018-11-08T00:15:19Z"
https://github.com/Exiv2/exiv2/issues/373
337,246,635
373
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : invalid type value detected in Image::printIFDStructure: 21059 Issue date: --- start body --- I am attaching a picture taken yesterday with my camera. Exiv2 fails on this picture with the messages ``` invalid type value detected in Image::printIFDStructure: 21059 Exiv2 exception in print action for file _MG_2027.CR2: invalid type value detected in Image::printIFDStructure ``` Perhaps I should debug this before posting here, but this issue and #156 which is raised often by photos from my camera are preventing me from using other software that relies on exiv2. If it's anything useful I realized that the photos that are failing are all that I have taken with an external flash [_MG_2027.zip](https://github.com/Exiv2/exiv2/files/2152233/_MG_2027.zip) --- end body --- comments : --- start comments --- --- end comments ---
903
208,047
[ "Exiv2", "exiv2" ]
I want to sort some photos using the rename option. I want to move all files of one day to it's own subdirectory using this command: `exiv2 -r "%Y-%m-%d/%H-%M-%S" mv *` However since the directory doesn't exist, the operation fails. I get the error: `exiv2: Failed to rename file.jpg to ./2014-07-25/12-21-55.jpg: No such file or directory (errno = 2)` If I create the directory manually and run the same command again it works.
create directory if it doesnt exist
https://api.github.com/repos/Exiv2/exiv2/issues/372/comments
6
"2018-06-27T21:22:22"
"2024-02-08T12:34:16Z"
https://github.com/Exiv2/exiv2/issues/372
336,392,166
372
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : create directory if it doesnt exist Issue date: --- start body --- I want to sort some photos using the rename option. I want to move all files of one day to it's own subdirectory using this command: `exiv2 -r "%Y-%m-%d/%H-%M-%S" mv *` However since the directory doesn't exist, the operation fails. I get the error: `exiv2: Failed to rename file.jpg to ./2014-07-25/12-21-55.jpg: No such file or directory (errno = 2)` If I create the directory manually and run the same command again it works. --- end body --- comments : --- start comments --- --- end comments ---
638
208,048
[ "Exiv2", "exiv2" ]
I have a weirdo issue that has 100% broken contrib/cmake/msvc/cmakeBuild.cmd I don't understand the following line of code: ``` 529 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ nl -b a CMakeLists.txt | grep get_dir 128 get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS) 530 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ ``` The workaround is to comment off line 128 and 129, although presumably that has consequences for building SAMPLES. I've modified/commented around it as follows: ``` message("+++++++++++++++++++++++++++") message("${CMAKE_SOURCE_DIR}/samples") message("+++++++++++++++++++++++++++") get_directory_property(SAMPLES DIRECTORY "${CMAKE_SOURCE_DIR}/samples" DEFINITION APPLICATIONS) add_dependencies(tests exiv2lib exiv2 ${SAMPLES}) ``` When I run this: ``` C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc>cmake --version | grep version cmake version 3.10.3 C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc>cmd/c "vcvars 2017 64 && cmakeBuild --build" ... -- Looking for inttypes.h - found +++++++++++++++++++++++++++ C:/Users/rmills/gnu/github/exiv2/exiv2/samples +++++++++++++++++++++++++++ CMake Error at CMakeLists.txt:132 (get_directory_property): get_directory_property DIRECTORY argument provided but requested directory not found. This could be because the directory argument was invalid or, it is valid but has not been processed yet. ... -- ------------------------------------------------------------------ -- Configuring incomplete, errors occurred! See also "C:/Users/rmills/gnu/github/exiv2/exiv2/contrib/cmake/msvc/work_Release/exiv2/CMakeFiles/CMakeOutput.log". See also "C:/Users/rmills/gnu/github/exiv2/exiv2/contrib/cmake/msvc/work_Release/exiv2/CMakeFiles/CMakeError.log". "*** cmake errors in EXIV2 ***" C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc> ``` When I build with conan: ``` C:\Users\rmills\gnu\github\exiv2\exiv2>rmdir/s/q build C:\Users\rmills\gnu\github\exiv2\exiv2>mkdir build && cd build C:\Users\rmills\gnu\github\exiv2\exiv2\build>conan install .. PROJECT: Installing C:\Users\rmills\gnu\github\exiv2\exiv2\conanfile.py Requirements Expat/2.2.5@pix4d/stable from 'conan-center' ... PROJECT imports(): Copied 5 '.dll' files: C:\Users\rmills\gnu\github\exiv2\exiv2\build>cmake .. -- Building for: Visual Studio 15 2017 ... -- Looking for inttypes.h - found -- sample: addmoddel ... -- sample: remotetest +++++++++++++++++++++++++++ C:/Users/rmills/gnu/github/exiv2/exiv2/samples +++++++++++++++++++++++++++ -- Install prefix: C:/Program Files (x86)/exiv2 -- ------------------------------------------------------------------ ... -- Build files have been written to: C:/Users/rmills/gnu/github/exiv2/exiv2/build C:\Users\rmills\gnu\github\exiv2\exiv2\build> ... ``` So, the question is "What does DEFINITION APPLICATIONS mean"? This is really strange. My `message` statements are pointing to the same directory. However, the output of the conan build reports `-- sample: xxxx` which are missing when cmake is executed from cmakeBuild.cmd
CMakeLists.txt get_directory_property breaks contrib/cmake/msvc/cmakeBuild.cmd
https://api.github.com/repos/Exiv2/exiv2/issues/371/comments
1
"2018-06-26T18:48:30"
"2018-07-05T16:29:01Z"
https://github.com/Exiv2/exiv2/issues/371
335,946,974
371
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CMakeLists.txt get_directory_property breaks contrib/cmake/msvc/cmakeBuild.cmd Issue date: --- start body --- I have a weirdo issue that has 100% broken contrib/cmake/msvc/cmakeBuild.cmd I don't understand the following line of code: ``` 529 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ nl -b a CMakeLists.txt | grep get_dir 128 get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS) 530 rmills@rmillsmbp:~/gnu/github/exiv2/exiv2 $ ``` The workaround is to comment off line 128 and 129, although presumably that has consequences for building SAMPLES. I've modified/commented around it as follows: ``` message("+++++++++++++++++++++++++++") message("${CMAKE_SOURCE_DIR}/samples") message("+++++++++++++++++++++++++++") get_directory_property(SAMPLES DIRECTORY "${CMAKE_SOURCE_DIR}/samples" DEFINITION APPLICATIONS) add_dependencies(tests exiv2lib exiv2 ${SAMPLES}) ``` When I run this: ``` C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc>cmake --version | grep version cmake version 3.10.3 C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc>cmd/c "vcvars 2017 64 && cmakeBuild --build" ... -- Looking for inttypes.h - found +++++++++++++++++++++++++++ C:/Users/rmills/gnu/github/exiv2/exiv2/samples +++++++++++++++++++++++++++ CMake Error at CMakeLists.txt:132 (get_directory_property): get_directory_property DIRECTORY argument provided but requested directory not found. This could be because the directory argument was invalid or, it is valid but has not been processed yet. ... -- ------------------------------------------------------------------ -- Configuring incomplete, errors occurred! See also "C:/Users/rmills/gnu/github/exiv2/exiv2/contrib/cmake/msvc/work_Release/exiv2/CMakeFiles/CMakeOutput.log". See also "C:/Users/rmills/gnu/github/exiv2/exiv2/contrib/cmake/msvc/work_Release/exiv2/CMakeFiles/CMakeError.log". "*** cmake errors in EXIV2 ***" C:\Users\rmills\gnu\github\exiv2\exiv2\contrib\cmake\msvc> ``` When I build with conan: ``` C:\Users\rmills\gnu\github\exiv2\exiv2>rmdir/s/q build C:\Users\rmills\gnu\github\exiv2\exiv2>mkdir build && cd build C:\Users\rmills\gnu\github\exiv2\exiv2\build>conan install .. PROJECT: Installing C:\Users\rmills\gnu\github\exiv2\exiv2\conanfile.py Requirements Expat/2.2.5@pix4d/stable from 'conan-center' ... PROJECT imports(): Copied 5 '.dll' files: C:\Users\rmills\gnu\github\exiv2\exiv2\build>cmake .. -- Building for: Visual Studio 15 2017 ... -- Looking for inttypes.h - found -- sample: addmoddel ... -- sample: remotetest +++++++++++++++++++++++++++ C:/Users/rmills/gnu/github/exiv2/exiv2/samples +++++++++++++++++++++++++++ -- Install prefix: C:/Program Files (x86)/exiv2 -- ------------------------------------------------------------------ ... -- Build files have been written to: C:/Users/rmills/gnu/github/exiv2/exiv2/build C:\Users\rmills\gnu\github\exiv2\exiv2\build> ... ``` So, the question is "What does DEFINITION APPLICATIONS mean"? This is really strange. My `message` statements are pointing to the same directory. However, the output of the conan build reports `-- sample: xxxx` which are missing when cmake is executed from cmakeBuild.cmd --- end body --- comments : --- start comments --- --- end comments ---
3,382
208,049
[ "Exiv2", "exiv2" ]
See http://catb.org/~esr/doclifter/bugs.html for details on how and why these patches were generated. Feel free to email me with any questions. Note: These patches do not change the modification date of any manual page. You may wish to do that by hand. I apologize if this message seems spammy or impersonal. The volume of markup bugs I am tracking is over five hundred - there is no real alternative to generating bugmail from a database and template. -- Eric S. Raymond Problems with exiv2.1: My records indicate that you have accepted this patch, so this is just a reminder. List syntax error. This means .IP, .TP or .RS/.RE markup is garbled. Common causes include .TP just before a section header, .TP entries with tags but no bodies, and mandoc lists with no trailing .El. These confuse doclifter, and may also mess up stricter man-page browsers like Xman and Rosetta. ``` patch --- exiv2.1-unpatched 2016-03-02 09:21:20.363956753 -0500 +++ exiv2.1 2016-03-02 09:21:31.651923983 -0500 @@ -291,76 +291,54 @@ .TP .B \-p \fImode\fP Print mode for the 'print' action. Possible modes are: -.br -s : print a summary of the Exif metadata (the default) -.br -a : print Exif, IPTC and XMP metadata (shortcut for \-Pkyct) -.br -t : interpreted (translated) Exif tags (\-PEkyct) -.br -v : plain Exif tag values (\-PExgnycv) -.br -h : hexdump of the Exif data (\-PExgnycsh) -.br -i : IPTC datasets (\-PIkyct) -.br -x : XMP properties (\-PXkyct) -.br -c : JPEG comment -.br -p : list available image previews, sorted by preview image size in pixels -.br -S : print image structure information (jpg, png and tiff only) -.br -X : print "raw" XMP (jpg, png and tiff only) +.TS +l l. +s print a summary of the Exif metadata (the default) +a print Exif, IPTC and XMP metadata (shortcut for \-Pkyct) +t interpreted (translated) Exif tags (\-PEkyct) +v plain Exif tag values (\-PExgnycv) +h hexdump of the Exif data (\-PExgnycsh) +i IPTC datasets (\-PIkyct) +x XMP properties (\-PXkyct) +c JPEG comment +p list available image previews, sorted by preview image size in pixels +S print image structure information (jpg, png and tiff only) +X print "raw" XMP (jpg, png and tiff only) +.TE .TP .B \-P \fIflgs\fP Print flags for fine control of the tag list ('print' action). Allows control of the type of metadata as well as data columns included in the print output. Valid flags are: -.br -E : include Exif tags in the list -.br -I : IPTC datasets -.br -X : XMP properties -.br -x : print a column with the tag number -.br -g : group name -.br -k : key -.br -l : tag label -.br -n : tag name -.br -y : type -.br -c : number of components (count) -.br -s : size in bytes -.br -v : plain data value -.br -t : interpreted (translated) data -.br -h : hexdump of the data +.TS +l l. +E include Exif tags in the list +I IPTC datasets +X XMP properties +x print a column with the tag number +g group name +k key +l tag label +n tag name +y type +c number of components (count) +s size in bytes +v plain data value +t interpreted (translated) data +h hexdump of the data +.TE .TP .B \-d \fItgt\fP Delete target(s) for the 'delete' action. Possible targets are: -.br -a : all supported metadata (the default) -.br -e : Exif section -.br -t : Exif thumbnail only -.br -i : IPTC data -.br -x : XMP packet -.br -c : JPEG comment +.TS +l l. +a all supported metadata (the default) +e Exif section +t Exif thumbnail only +i IPTC data +x XMP packet +c JPEG comment +.TE .TP .B \-i \fItgt\fP Insert target(s) for the 'insert' action. Possible targets are the @@ -399,13 +377,12 @@ .B \-r \fIfmt\fP Filename format for the 'rename' action. The format string follows \fBstrftime\fP(3) and supports the following keywords: -.br -:basename: - original filename without extension -.br -:dirname: - name of the directory holding the original file -.br -:parentname: - name of parent directory -.br +.TS +l l. +:basename: original filename without extension +:dirname: name of the directory holding the original file +:parentname: name of parent directory +.TE Default filename format is %Y%m%d_%H%M%S. .TP .B \-c \fItxt\fP @@ -510,70 +487,85 @@ definition. .sp 1 The format for an IPTC \fBDate\fP value is: -.br +.RS YYYY\-MM\-DD (year, month, day) -.sp 1 +.RE The format for an IPTC \fBTime\fP value is: -.br +.RS HH:MM:SS (hours, minutes, seconds) -.br +.RE and may optionally be followed by: -.br +.RS \-HH:MM or +HH:MM (hours, minutes ahead/behind UTC) -.sp 1 +.RE The format of \fBRational\fP (and \fBSRational\fP) is one of: -.br - integer -.br - integer-numerator/integer-denominator -.br - Fnumber -.br - fnumber -.sp 1 +.RS +.IP +integer +.IP +integer-numerator/integer-denominator +.IP +Fnumber +.IP +fnumber +.RE Rational Examples: -.br - exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg -.br - exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg +.RS +.nf +exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg +exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg +.fi +.RE .sp 1 The Rational format Fnumber (or fnumber) is for the convenience of setting aperture values. Aperture values are stored in Exif is an \fBAPEX\fP value which can be evaluated by the expression: .sp 1 - apex-value = log(Fnumber) * 2.0 / log(2.0) -.br - Fnumber = exp(apex-value * log(2.0) / 2.0) +.RS +.nf +apex-value = log(Fnumber) * 2.0 / log(2.0) +Fnumber = exp(apex-value * log(2.0) / 2.0) +.fi +.RE .sp 1 The Rational format Fnumber is valid for any \fBRational\fP, even when the key is not an Aperture. More information about \fBAPEX\fP value is available from: http://en.wikipedia.org/wiki/APEX_system .sp 1 The format of XMP \fBLangAlt\fP values includes an optional language qualifier: -.br -.B lang="\fIlanguage-code\fP\fI" text\fP +.RS +.nf +.B lang="\fIlanguage-code\fP\fI" text\fP +.fi +.RE .sp lang="x-default" is used if the value doesn't start with a language qualifier. .sp 1 +.RS +.nf exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' X.jpg -.br exiv2 -M'set Xmp.dc.title lang="en-GB" Pounds' X.jpg -.br exiv2 -M'set Xmp.dc.title lang="en-US" In God We Trust' X.jpg -.br exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg +.fi +.RE .sp 1 To remove a language specification, set the value to '' (empty string) -.br - exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg -.sp 1 +.RS +.nf +exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg +.fi +.RE To remove all language specifications, delete the key: -.br - exiv2 -M'del Xmp.dc.title' X.jpg -.TP +.RS +.nf +exiv2 -M'del Xmp.dc.title' X.jpg +.fi +.RE To register additional XMP namespaces, combine the command with: -.TP +.RS .nf \fBreg\fP \fIprefix\fP \fInamespace\fP .fi +.RE .SS Command file format Empty lines and lines starting with \fB#\fP in a command file are ignored (comments). Remaining lines are commands as described above. @@ -614,24 +606,17 @@ format. The inserted XMP properties include those in the "IPTC Core" XMP schema. .TP -.nf exiv2 \-M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg -.fi Sets the Exif comment to an ASCII string. .TP -.nf -exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ -\-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg -.fi +exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ \-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg Sets the latitude to 4 degrees, 15 minutes and 33 seconds north. The Exif standard stipulates that the GPSLatitude tag consists of three Rational numbers for the degrees, minutes and seconds of the latitude and GPSLatitudeRef contains either 'N' or 'S' for north or south latitude respectively. .TP -.nf exiv2 insert \-l/tmp -S.CRW /data/*.JPG -.fi Copy all metadata from CRW files in the /tmp directory to JPG files with corresponding basenames in the /data directory. Note that this copies metadata as is, without any modifications to adapt it to the ```
Issues with man page src/exiv2.1
https://api.github.com/repos/Exiv2/exiv2/issues/369/comments
4
"2018-06-13T02:06:57"
"2018-11-28T16:55:34Z"
https://github.com/Exiv2/exiv2/issues/369
331,814,977
369
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Issues with man page src/exiv2.1 Issue date: --- start body --- See http://catb.org/~esr/doclifter/bugs.html for details on how and why these patches were generated. Feel free to email me with any questions. Note: These patches do not change the modification date of any manual page. You may wish to do that by hand. I apologize if this message seems spammy or impersonal. The volume of markup bugs I am tracking is over five hundred - there is no real alternative to generating bugmail from a database and template. -- Eric S. Raymond Problems with exiv2.1: My records indicate that you have accepted this patch, so this is just a reminder. List syntax error. This means .IP, .TP or .RS/.RE markup is garbled. Common causes include .TP just before a section header, .TP entries with tags but no bodies, and mandoc lists with no trailing .El. These confuse doclifter, and may also mess up stricter man-page browsers like Xman and Rosetta. ``` patch --- exiv2.1-unpatched 2016-03-02 09:21:20.363956753 -0500 +++ exiv2.1 2016-03-02 09:21:31.651923983 -0500 @@ -291,76 +291,54 @@ .TP .B \-p \fImode\fP Print mode for the 'print' action. Possible modes are: -.br -s : print a summary of the Exif metadata (the default) -.br -a : print Exif, IPTC and XMP metadata (shortcut for \-Pkyct) -.br -t : interpreted (translated) Exif tags (\-PEkyct) -.br -v : plain Exif tag values (\-PExgnycv) -.br -h : hexdump of the Exif data (\-PExgnycsh) -.br -i : IPTC datasets (\-PIkyct) -.br -x : XMP properties (\-PXkyct) -.br -c : JPEG comment -.br -p : list available image previews, sorted by preview image size in pixels -.br -S : print image structure information (jpg, png and tiff only) -.br -X : print "raw" XMP (jpg, png and tiff only) +.TS +l l. +s print a summary of the Exif metadata (the default) +a print Exif, IPTC and XMP metadata (shortcut for \-Pkyct) +t interpreted (translated) Exif tags (\-PEkyct) +v plain Exif tag values (\-PExgnycv) +h hexdump of the Exif data (\-PExgnycsh) +i IPTC datasets (\-PIkyct) +x XMP properties (\-PXkyct) +c JPEG comment +p list available image previews, sorted by preview image size in pixels +S print image structure information (jpg, png and tiff only) +X print "raw" XMP (jpg, png and tiff only) +.TE .TP .B \-P \fIflgs\fP Print flags for fine control of the tag list ('print' action). Allows control of the type of metadata as well as data columns included in the print output. Valid flags are: -.br -E : include Exif tags in the list -.br -I : IPTC datasets -.br -X : XMP properties -.br -x : print a column with the tag number -.br -g : group name -.br -k : key -.br -l : tag label -.br -n : tag name -.br -y : type -.br -c : number of components (count) -.br -s : size in bytes -.br -v : plain data value -.br -t : interpreted (translated) data -.br -h : hexdump of the data +.TS +l l. +E include Exif tags in the list +I IPTC datasets +X XMP properties +x print a column with the tag number +g group name +k key +l tag label +n tag name +y type +c number of components (count) +s size in bytes +v plain data value +t interpreted (translated) data +h hexdump of the data +.TE .TP .B \-d \fItgt\fP Delete target(s) for the 'delete' action. Possible targets are: -.br -a : all supported metadata (the default) -.br -e : Exif section -.br -t : Exif thumbnail only -.br -i : IPTC data -.br -x : XMP packet -.br -c : JPEG comment +.TS +l l. +a all supported metadata (the default) +e Exif section +t Exif thumbnail only +i IPTC data +x XMP packet +c JPEG comment +.TE .TP .B \-i \fItgt\fP Insert target(s) for the 'insert' action. Possible targets are the @@ -399,13 +377,12 @@ .B \-r \fIfmt\fP Filename format for the 'rename' action. The format string follows \fBstrftime\fP(3) and supports the following keywords: -.br -:basename: - original filename without extension -.br -:dirname: - name of the directory holding the original file -.br -:parentname: - name of parent directory -.br +.TS +l l. +:basename: original filename without extension +:dirname: name of the directory holding the original file +:parentname: name of parent directory +.TE Default filename format is %Y%m%d_%H%M%S. .TP .B \-c \fItxt\fP @@ -510,70 +487,85 @@ definition. .sp 1 The format for an IPTC \fBDate\fP value is: -.br +.RS YYYY\-MM\-DD (year, month, day) -.sp 1 +.RE The format for an IPTC \fBTime\fP value is: -.br +.RS HH:MM:SS (hours, minutes, seconds) -.br +.RE and may optionally be followed by: -.br +.RS \-HH:MM or +HH:MM (hours, minutes ahead/behind UTC) -.sp 1 +.RE The format of \fBRational\fP (and \fBSRational\fP) is one of: -.br - integer -.br - integer-numerator/integer-denominator -.br - Fnumber -.br - fnumber -.sp 1 +.RS +.IP +integer +.IP +integer-numerator/integer-denominator +.IP +Fnumber +.IP +fnumber +.RE Rational Examples: -.br - exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg -.br - exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg +.RS +.nf +exiv2 "-Mset Exif.Photo.MaxApertureValue 557429/62500" X.jpg +exiv2 "-Mset Exif.Photo.MaxApertureValue F5.6" X.jpg +.fi +.RE .sp 1 The Rational format Fnumber (or fnumber) is for the convenience of setting aperture values. Aperture values are stored in Exif is an \fBAPEX\fP value which can be evaluated by the expression: .sp 1 - apex-value = log(Fnumber) * 2.0 / log(2.0) -.br - Fnumber = exp(apex-value * log(2.0) / 2.0) +.RS +.nf +apex-value = log(Fnumber) * 2.0 / log(2.0) +Fnumber = exp(apex-value * log(2.0) / 2.0) +.fi +.RE .sp 1 The Rational format Fnumber is valid for any \fBRational\fP, even when the key is not an Aperture. More information about \fBAPEX\fP value is available from: http://en.wikipedia.org/wiki/APEX_system .sp 1 The format of XMP \fBLangAlt\fP values includes an optional language qualifier: -.br -.B lang="\fIlanguage-code\fP\fI" text\fP +.RS +.nf +.B lang="\fIlanguage-code\fP\fI" text\fP +.fi +.RE .sp lang="x-default" is used if the value doesn't start with a language qualifier. .sp 1 +.RS +.nf exiv2 -M'set Xmp.dc.title lang="de-DE" Euros' X.jpg -.br exiv2 -M'set Xmp.dc.title lang="en-GB" Pounds' X.jpg -.br exiv2 -M'set Xmp.dc.title lang="en-US" In God We Trust' X.jpg -.br exiv2 -M'set Xmp.dc.title All others pay cash' X.jpg +.fi +.RE .sp 1 To remove a language specification, set the value to '' (empty string) -.br - exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg -.sp 1 +.RS +.nf +exiv2 -M'set Xmp.dc.title lang="en-US"' X.jpg +.fi +.RE To remove all language specifications, delete the key: -.br - exiv2 -M'del Xmp.dc.title' X.jpg -.TP +.RS +.nf +exiv2 -M'del Xmp.dc.title' X.jpg +.fi +.RE To register additional XMP namespaces, combine the command with: -.TP +.RS .nf \fBreg\fP \fIprefix\fP \fInamespace\fP .fi +.RE .SS Command file format Empty lines and lines starting with \fB#\fP in a command file are ignored (comments). Remaining lines are commands as described above. @@ -614,24 +606,17 @@ format. The inserted XMP properties include those in the "IPTC Core" XMP schema. .TP -.nf exiv2 \-M"set Exif.Photo.UserComment charset=Ascii New Exif comment" image.jpg -.fi Sets the Exif comment to an ASCII string. .TP -.nf -exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ -\-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg -.fi +exiv2 \-M"set Exif.GPSInfo.GPSLatitude 4/1 15/1 33/1" \\ \-M"set Exif.GPSInfo.GPSLatitudeRef N" image.jpg Sets the latitude to 4 degrees, 15 minutes and 33 seconds north. The Exif standard stipulates that the GPSLatitude tag consists of three Rational numbers for the degrees, minutes and seconds of the latitude and GPSLatitudeRef contains either 'N' or 'S' for north or south latitude respectively. .TP -.nf exiv2 insert \-l/tmp -S.CRW /data/*.JPG -.fi Copy all metadata from CRW files in the /tmp directory to JPG files with corresponding basenames in the /data directory. Note that this copies metadata as is, without any modifications to adapt it to the ``` --- end body --- comments : --- start comments --- --- end comments ---
8,652
208,050
[ "Exiv2", "exiv2" ]
root@7add4d80d305:/src/exiv2/bin# ./exiv2 -ep 2-out-of-read-Poc Warning: Directory Image, entry 0x0111: Strip 0 is outside of the data area; ignored. Segmentation fault (core dumped) root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.1528716079.exiv2.2083 Reading symbols from exiv2...done. [New LWP 2083] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./exiv2 -ep 2-out-of-read-Poc'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:90 90 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. gdb-peda$ bt #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:90 #1 0x00007fe64612af64 in Exiv2::ValueType<unsigned int>::setDataArea (this=0x1e17c00, buf=0x7fe7467c3ff7 <error: Cannot access memory at address 0x7fe7467c3ff7>, len=0x59) at /src/exiv2/include/exiv2/value.hpp:1758 #2 0x00007fe64615e0c1 in (anonymous namespace)::LoaderTiff::getData (this=0x1e17750) at /src/exiv2/src/preview.cpp:803 #3 0x00007fe64616091a in Exiv2::PreviewManager::getPreviewProperties (this=0x7ffc57e9c570) at /src/exiv2/src/preview.cpp:1146 #4 0x0000000000437f80 in Action::Extract::writePreviews (this=0x1e0ec00) at /src/exiv2/src/actions.cpp:1146 #5 0x00000000004371b6 in Action::Extract::run (this=0x1e0ec00, path="2-out-of-read-Poc") at /src/exiv2/src/actions.cpp:1062 #6 0x00000000004217cd in main (argc=0x3, argv=0x7ffc57e9c928) at /src/exiv2/src/exiv2.cpp:166 #7 0x00007fe645602830 in __libc_start_main (main=0x421506 <main(int, char* const*)>, argc=0x3, argv=0x7ffc57e9c928, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc57e9c918) at ../csu/libc-start.c:291 #8 0x0000000000421439 in _start () Poc: https://github.com/TeamSeri0us/pocs/blob/master/exiv2/2-out-of-read-Poc
out of bound read in function std::memcpy (tmp, buf, len) in exiv2/include/exiv2/value.hpp:1758
https://api.github.com/repos/Exiv2/exiv2/issues/366/comments
0
"2018-06-11T11:33:59"
"2018-11-08T01:33:51Z"
https://github.com/Exiv2/exiv2/issues/366
331,151,547
366
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : out of bound read in function std::memcpy (tmp, buf, len) in exiv2/include/exiv2/value.hpp:1758 Issue date: --- start body --- root@7add4d80d305:/src/exiv2/bin# ./exiv2 -ep 2-out-of-read-Poc Warning: Directory Image, entry 0x0111: Strip 0 is outside of the data area; ignored. Segmentation fault (core dumped) root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.1528716079.exiv2.2083 Reading symbols from exiv2...done. [New LWP 2083] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./exiv2 -ep 2-out-of-read-Poc'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:90 90 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. gdb-peda$ bt #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:90 #1 0x00007fe64612af64 in Exiv2::ValueType<unsigned int>::setDataArea (this=0x1e17c00, buf=0x7fe7467c3ff7 <error: Cannot access memory at address 0x7fe7467c3ff7>, len=0x59) at /src/exiv2/include/exiv2/value.hpp:1758 #2 0x00007fe64615e0c1 in (anonymous namespace)::LoaderTiff::getData (this=0x1e17750) at /src/exiv2/src/preview.cpp:803 #3 0x00007fe64616091a in Exiv2::PreviewManager::getPreviewProperties (this=0x7ffc57e9c570) at /src/exiv2/src/preview.cpp:1146 #4 0x0000000000437f80 in Action::Extract::writePreviews (this=0x1e0ec00) at /src/exiv2/src/actions.cpp:1146 #5 0x00000000004371b6 in Action::Extract::run (this=0x1e0ec00, path="2-out-of-read-Poc") at /src/exiv2/src/actions.cpp:1062 #6 0x00000000004217cd in main (argc=0x3, argv=0x7ffc57e9c928) at /src/exiv2/src/exiv2.cpp:166 #7 0x00007fe645602830 in __libc_start_main (main=0x421506 <main(int, char* const*)>, argc=0x3, argv=0x7ffc57e9c928, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc57e9c918) at ../csu/libc-start.c:291 #8 0x0000000000421439 in _start () Poc: https://github.com/TeamSeri0us/pocs/blob/master/exiv2/2-out-of-read-Poc --- end body --- comments : --- start comments --- --- end comments ---
2,263
208,051
[ "Exiv2", "exiv2" ]
root@7add4d80d305:/src/exiv2/bin# ./exiv2 -ep 1-out-of-read-Poc Error: Upper boundary of data for directory Image, entry 0x00fe is out of bounds: Offset = 0x0000002a, size = 64, exceeds buffer size by 22 Bytes; truncating the entry Warning: Directory Image, entry 0x0201: Strip 0 is outside of the data area; ignored. Warning: Directory Image, entry 0x0201: Strip 7 is outside of the data area; ignored. Error: Offset of directory Thumbnail, entry 0x0201 is out of bounds: Offset = 0x00000000; truncating the entry Segmentation fault (core dumped) root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.15287 core.1528705670.exiv2.2026 core.1528710544.exiv2.2036 core.1528711051.exiv2.2041 root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.1528711051.exiv2.2041 Reading symbols from exiv2...done. [New LWP 2041] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./exiv2 -ep 1-out-of-read-Poc'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:155 155 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. gdb-peda$ bt #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:155 #1 0x00007f6bd0dce220 in Exiv2::MemIo::read (this=0x8e3090, buf=0x7ffd82f48870 "", rcount=0x2) at /src/exiv2/src/basicio.cpp:1293 #2 0x00007f6bd0e32f04 in Exiv2::isJpegType (iIo=..., advance=0x0) at /src/exiv2/src/jpgimage.cpp:1309 #3 0x00007f6bd0e17c42 in Exiv2::ImageFactory::open (io=...) at /src/exiv2/src/image.cpp:913 #4 0x00007f6bd0e179b7 in Exiv2::ImageFactory::open (data=0x7f6cd14a2fff <error: Cannot access memory at address 0x7f6cd14a2fff>, size=0x2) at /src/exiv2/src/image.cpp:902 #5 0x00007f6bd0e3b052 in (anonymous namespace)::LoaderExifJpeg::readDimensions (this=0x8e33b0) at /src/exiv2/src/preview.cpp:598 #6 0x00007f6bd0e3f8b8 in Exiv2::PreviewManager::getPreviewProperties (this=0x7ffd82f48cd0) at /src/exiv2/src/preview.cpp:1144 #7 0x0000000000437f80 in Action::Extract::writePreviews (this=0x8dac00) at /src/exiv2/src/actions.cpp:1146 #8 0x00000000004371b6 in Action::Extract::run (this=0x8dac00, path="1-out-of-read-Poc") at /src/exiv2/src/actions.cpp:1062 #9 0x00000000004217cd in main (argc=0x3, argv=0x7ffd82f49088) at /src/exiv2/src/exiv2.cpp:166 #10 0x00007f6bd02e1830 in __libc_start_main (main=0x421506 <main(int, char* const*)>, argc=0x3, argv=0x7ffd82f49088, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd82f49078) at ../csu/libc-start.c:291 #11 0x0000000000421439 in _start () Poc: https://github.com/TeamSeri0us/pocs/blob/master/exiv2/1-out-of-read-Poc
out of bound read when extract preview images from Poc file
https://api.github.com/repos/Exiv2/exiv2/issues/365/comments
2
"2018-06-11T09:50:59"
"2018-11-08T01:34:22Z"
https://github.com/Exiv2/exiv2/issues/365
331,119,013
365
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : out of bound read when extract preview images from Poc file Issue date: --- start body --- root@7add4d80d305:/src/exiv2/bin# ./exiv2 -ep 1-out-of-read-Poc Error: Upper boundary of data for directory Image, entry 0x00fe is out of bounds: Offset = 0x0000002a, size = 64, exceeds buffer size by 22 Bytes; truncating the entry Warning: Directory Image, entry 0x0201: Strip 0 is outside of the data area; ignored. Warning: Directory Image, entry 0x0201: Strip 7 is outside of the data area; ignored. Error: Offset of directory Thumbnail, entry 0x0201 is out of bounds: Offset = 0x00000000; truncating the entry Segmentation fault (core dumped) root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.15287 core.1528705670.exiv2.2026 core.1528710544.exiv2.2036 core.1528711051.exiv2.2041 root@7add4d80d305:/src/exiv2/bin# gdb -q exiv2 /tmp/core.1528711051.exiv2.2041 Reading symbols from exiv2...done. [New LWP 2041] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./exiv2 -ep 1-out-of-read-Poc'. Program terminated with signal SIGSEGV, Segmentation fault. #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:155 155 ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory. gdb-peda$ bt #0 __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:155 #1 0x00007f6bd0dce220 in Exiv2::MemIo::read (this=0x8e3090, buf=0x7ffd82f48870 "", rcount=0x2) at /src/exiv2/src/basicio.cpp:1293 #2 0x00007f6bd0e32f04 in Exiv2::isJpegType (iIo=..., advance=0x0) at /src/exiv2/src/jpgimage.cpp:1309 #3 0x00007f6bd0e17c42 in Exiv2::ImageFactory::open (io=...) at /src/exiv2/src/image.cpp:913 #4 0x00007f6bd0e179b7 in Exiv2::ImageFactory::open (data=0x7f6cd14a2fff <error: Cannot access memory at address 0x7f6cd14a2fff>, size=0x2) at /src/exiv2/src/image.cpp:902 #5 0x00007f6bd0e3b052 in (anonymous namespace)::LoaderExifJpeg::readDimensions (this=0x8e33b0) at /src/exiv2/src/preview.cpp:598 #6 0x00007f6bd0e3f8b8 in Exiv2::PreviewManager::getPreviewProperties (this=0x7ffd82f48cd0) at /src/exiv2/src/preview.cpp:1144 #7 0x0000000000437f80 in Action::Extract::writePreviews (this=0x8dac00) at /src/exiv2/src/actions.cpp:1146 #8 0x00000000004371b6 in Action::Extract::run (this=0x8dac00, path="1-out-of-read-Poc") at /src/exiv2/src/actions.cpp:1062 #9 0x00000000004217cd in main (argc=0x3, argv=0x7ffd82f49088) at /src/exiv2/src/exiv2.cpp:166 #10 0x00007f6bd02e1830 in __libc_start_main (main=0x421506 <main(int, char* const*)>, argc=0x3, argv=0x7ffd82f49088, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd82f49078) at ../csu/libc-start.c:291 #11 0x0000000000421439 in _start () Poc: https://github.com/TeamSeri0us/pocs/blob/master/exiv2/1-out-of-read-Poc --- end body --- comments : --- start comments --- --- end comments ---
3,038
208,052
[ "Exiv2", "exiv2" ]
The file XMP_Const.h typedefs specific bit-width integers: XMP_Int32, etc. If "XMP_MacBuild" is defined, then <stdint.h> is included and the standard types (e.g. int32_t) are used; if not, XMP_Int32 is typedef'd as "signed long". This fails on a linux 64 bit machine because long is 64 bits, not 32. The best fix is to use the standard types. Newer versions of XMP do this. Note also that there are assertions within XMPMeta.cpp that check these typedefs. The XMP assertions can be enabled using -DXMP_DebugBuild=1. I would suggest that the travis and appveyor builds use this. More information in the threads: * https://github.com/Exiv2/exiv2/pull/289 * https://github.com/Exiv2/exiv2/pull/284 This issue written up at the request of @D4N .
XMP uses incorrect bit-width integers on LP64 data model systems (linux, unix)
https://api.github.com/repos/Exiv2/exiv2/issues/363/comments
24
"2018-06-10T03:37:16"
"2019-07-18T17:26:53Z"
https://github.com/Exiv2/exiv2/issues/363
330,937,432
363
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : XMP uses incorrect bit-width integers on LP64 data model systems (linux, unix) Issue date: --- start body --- The file XMP_Const.h typedefs specific bit-width integers: XMP_Int32, etc. If "XMP_MacBuild" is defined, then <stdint.h> is included and the standard types (e.g. int32_t) are used; if not, XMP_Int32 is typedef'd as "signed long". This fails on a linux 64 bit machine because long is 64 bits, not 32. The best fix is to use the standard types. Newer versions of XMP do this. Note also that there are assertions within XMPMeta.cpp that check these typedefs. The XMP assertions can be enabled using -DXMP_DebugBuild=1. I would suggest that the travis and appveyor builds use this. More information in the threads: * https://github.com/Exiv2/exiv2/pull/289 * https://github.com/Exiv2/exiv2/pull/284 This issue written up at the request of @D4N . --- end body --- comments : --- start comments --- --- end comments ---
999
208,053
[ "Exiv2", "exiv2" ]
The option `DBUILD_WITH_CCACHE` has no influence on whether ccache is used or not on Fedora (and I believe on Debian too) when ccache is installed: ``` cmake -DBUILD_WITH_CCACHE=OFF .. -- The C compiler identification is GNU 8.1.1 -- The CXX compiler identification is GNU 8.1.1 -- Check for working C compiler: /usr/lib64/ccache/gcc -- Check for working C compiler: /usr/lib64/ccache/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/lib64/ccache/g++ -- Check for working CXX compiler: /usr/lib64/ccache/g++ -- works ``` The problem is quite simple: once `ccache` is installed, it's put into `$PATH` before `/usr/bin/` (where ordinary `gcc` & `clang` binaries sit), thus gcc resolves to `ccache/gcc` before our switch can do anything. A viable alternative is to set the `CCACHE_DISABLE` environment variable for ccache to true. Then ccache itself will directly call the compiler if it is installed.
DBUILD_WITH_CCACHE option does not work on Fedora
https://api.github.com/repos/Exiv2/exiv2/issues/361/comments
10
"2018-06-09T22:31:09"
"2018-11-29T17:29:46Z"
https://github.com/Exiv2/exiv2/issues/361
330,923,794
361
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : DBUILD_WITH_CCACHE option does not work on Fedora Issue date: --- start body --- The option `DBUILD_WITH_CCACHE` has no influence on whether ccache is used or not on Fedora (and I believe on Debian too) when ccache is installed: ``` cmake -DBUILD_WITH_CCACHE=OFF .. -- The C compiler identification is GNU 8.1.1 -- The CXX compiler identification is GNU 8.1.1 -- Check for working C compiler: /usr/lib64/ccache/gcc -- Check for working C compiler: /usr/lib64/ccache/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/lib64/ccache/g++ -- Check for working CXX compiler: /usr/lib64/ccache/g++ -- works ``` The problem is quite simple: once `ccache` is installed, it's put into `$PATH` before `/usr/bin/` (where ordinary `gcc` & `clang` binaries sit), thus gcc resolves to `ccache/gcc` before our switch can do anything. A viable alternative is to set the `CCACHE_DISABLE` environment variable for ccache to true. Then ccache itself will directly call the compiler if it is installed. --- end body --- comments : --- start comments --- --- end comments ---
1,275
208,054
[ "Exiv2", "exiv2" ]
http://dev.exiv2.org/issues/1357 Thank you to Phil Harvey for bringing this to our attention. The PNG 1.5.0 extension specification was released July 15, 2017 and specifies a standard location for EXIF metdata in PNG images: ftp://ftp.simplesystems.org/pub/png/documents/pngext-1.5.0.html Exiv2 should support this. (Original issue discussed here: http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,9262.0.html ) ExifTool has been writing this EXIF since version 10.59 (July 7, 2017).
Support Standard EXIF in PNG images
https://api.github.com/repos/Exiv2/exiv2/issues/360/comments
1
"2018-06-08T13:44:20"
"2021-04-12T10:59:11Z"
https://github.com/Exiv2/exiv2/issues/360
330,664,085
360
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Support Standard EXIF in PNG images Issue date: --- start body --- http://dev.exiv2.org/issues/1357 Thank you to Phil Harvey for bringing this to our attention. The PNG 1.5.0 extension specification was released July 15, 2017 and specifies a standard location for EXIF metdata in PNG images: ftp://ftp.simplesystems.org/pub/png/documents/pngext-1.5.0.html Exiv2 should support this. (Original issue discussed here: http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,9262.0.html ) ExifTool has been writing this EXIF since version 10.59 (July 7, 2017). --- end body --- comments : --- start comments --- --- end comments ---
698
208,055
[ "Exiv2", "exiv2" ]
Currently exiv2 can be only found by a consumer via a pkg-config file. Since CMake is now the main configuration system, we started providing a Config-file package that should ease the integration of Exiv2 in other C/C++ projects configured via CMake: https://cmake.org/cmake/help/v3.3/manual/cmake-packages.7.html#config-file-packages We need to update the documentation related to this point and make sure it is working for all the platforms.
Provide a Config-file package with CMake
https://api.github.com/repos/Exiv2/exiv2/issues/359/comments
1
"2018-06-08T10:04:53"
"2018-11-08T01:34:39Z"
https://github.com/Exiv2/exiv2/issues/359
330,597,850
359
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Provide a Config-file package with CMake Issue date: --- start body --- Currently exiv2 can be only found by a consumer via a pkg-config file. Since CMake is now the main configuration system, we started providing a Config-file package that should ease the integration of Exiv2 in other C/C++ projects configured via CMake: https://cmake.org/cmake/help/v3.3/manual/cmake-packages.7.html#config-file-packages We need to update the documentation related to this point and make sure it is working for all the platforms. --- end body --- comments : --- start comments --- --- end comments ---
651
208,056
[ "Exiv2", "exiv2" ]
In #357 @D4N tried to deploy the exiv2 binaries and libraries into a local folder inside the **build** directory , but he got some errors about exiv2 not finding the `libexiv2.so`. That's probably due to a bad configuration of the RPATHs that should be easily fixable by setting the RPATHs configuration with CMake.
Handle RPATHs fix CMake
https://api.github.com/repos/Exiv2/exiv2/issues/358/comments
0
"2018-06-07T22:06:56"
"2018-08-17T08:28:09Z"
https://github.com/Exiv2/exiv2/issues/358
330,452,768
358
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Handle RPATHs fix CMake Issue date: --- start body --- In #357 @D4N tried to deploy the exiv2 binaries and libraries into a local folder inside the **build** directory , but he got some errors about exiv2 not finding the `libexiv2.so`. That's probably due to a bad configuration of the RPATHs that should be easily fixable by setting the RPATHs configuration with CMake. --- end body --- comments : --- start comments --- --- end comments ---
500
208,057
[ "Exiv2", "exiv2" ]
Tried using the "auto" make and build tools.. After doing a ./configure (and no errors) the make command fails with this error: make[1]: Entering directory '/media/koos/data/sources/exiv2/src' libtool: compile: g++ -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W -MMD -I../src -I../include/ -I../include/exiv2 -std=c++98 -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../xmpsdk/include -c -DEXV_BUILDING_LIB=1 cr2image_int.cpp -fPIC -DPIC -o .libs/cr2image_int.o g++: error: cr2image_int.cpp: No such file or directory g++: fatal error: no input files compilation terminated. Makefile:200: recipe for target 'cr2image_int.o' failed make[1]: *** [cr2image_int.o] Error 1 make[1]: Leaving directory '/media/koos/data/sources/exiv2/src' Makefile:59: recipe for target 'all' failed make: *** [all] Error 2
MAKE build and install also fail..
https://api.github.com/repos/Exiv2/exiv2/issues/355/comments
1
"2018-06-05T02:02:49"
"2018-06-05T07:51:14Z"
https://github.com/Exiv2/exiv2/issues/355
329,275,528
355
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : MAKE build and install also fail.. Issue date: --- start body --- Tried using the "auto" make and build tools.. After doing a ./configure (and no errors) the make command fails with this error: make[1]: Entering directory '/media/koos/data/sources/exiv2/src' libtool: compile: g++ -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wcast-align -Wpointer-arith -Wformat-security -Wmissing-format-attribute -Woverloaded-virtual -W -MMD -I../src -I../include/ -I../include/exiv2 -std=c++98 -DEXV_LOCALEDIR=\"/usr/local/share/locale\" -I../xmpsdk/include -c -DEXV_BUILDING_LIB=1 cr2image_int.cpp -fPIC -DPIC -o .libs/cr2image_int.o g++: error: cr2image_int.cpp: No such file or directory g++: fatal error: no input files compilation terminated. Makefile:200: recipe for target 'cr2image_int.o' failed make[1]: *** [cr2image_int.o] Error 1 make[1]: Leaving directory '/media/koos/data/sources/exiv2/src' Makefile:59: recipe for target 'all' failed make: *** [all] Error 2 --- end body --- comments : --- start comments --- --- end comments ---
1,123
208,058
[ "Exiv2", "exiv2" ]
trying to use cmake to build and install.. followed the CMAKE instructions and after `cmake ..` and `make -j` the `make install` gives the following error: ``` _Install the project... -- Install configuration: "" CMake Error at cmake_install.cmake:36 (file): file INSTALL cannot find "/media/koos/data/sources/exiv2/build/doc/html". Makefile:61: recipe for target 'install' failed make: *** [install] Error 1_ ```
CMAKE build and install fail!
https://api.github.com/repos/Exiv2/exiv2/issues/354/comments
11
"2018-06-05T01:51:33"
"2018-06-19T22:04:12Z"
https://github.com/Exiv2/exiv2/issues/354
329,273,796
354
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CMAKE build and install fail! Issue date: --- start body --- trying to use cmake to build and install.. followed the CMAKE instructions and after `cmake ..` and `make -j` the `make install` gives the following error: ``` _Install the project... -- Install configuration: "" CMake Error at cmake_install.cmake:36 (file): file INSTALL cannot find "/media/koos/data/sources/exiv2/build/doc/html". Makefile:61: recipe for target 'install' failed make: *** [install] Error 1_ ``` --- end body --- comments : --- start comments --- --- end comments ---
623
208,059
[ "Exiv2", "exiv2" ]
This is an "Umbrella" activity to hold notes about different versions of Visual Studio and Exiv2.
Testing msvc/cmake
https://api.github.com/repos/Exiv2/exiv2/issues/346/comments
1
"2018-06-01T06:02:39"
"2018-10-10T07:16:54Z"
https://github.com/Exiv2/exiv2/issues/346
328,392,027
346
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Testing msvc/cmake Issue date: --- start body --- This is an "Umbrella" activity to hold notes about different versions of Visual Studio and Exiv2. --- end body --- comments : --- start comments --- --- end comments ---
276
208,060
[ "Exiv2", "exiv2" ]
I've tested installation on macOS & Ubuntu with `make config && ./configure && make` and this was the result: ``` g++: error: cr2image_int.cpp: No such file or directory g++: fatal error: no input files compilation terminated. make[1]: *** [cr2image_int.o] Error 1 ```
Broken master
https://api.github.com/repos/Exiv2/exiv2/issues/345/comments
3
"2018-05-31T17:11:54"
"2018-05-31T17:47:19Z"
https://github.com/Exiv2/exiv2/issues/345
328,224,136
345
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Broken master Issue date: --- start body --- I've tested installation on macOS & Ubuntu with `make config && ./configure && make` and this was the result: ``` g++: error: cr2image_int.cpp: No such file or directory g++: fatal error: no input files compilation terminated. make[1]: *** [cr2image_int.o] Error 1 ``` --- end body --- comments : --- start comments --- --- end comments ---
448
208,061
[ "Exiv2", "exiv2" ]
I've been experiencing difficulties with CMake builds on MSVC having EXV_HAVE_UNISTD_H set. No version of MSVC provides <unistd.h> There's suspicious code in config/config.h.cmake. I think the "1" typos are harmless, however let's fix them. ``` /* Define if you have the <unistd.h> header file. */ #cmakedefine EXV_HAVE_UNISTD_H 1 #if !defined( EXV_HAVE_UNISTD_H) && defined(__CYGWIN__) #define EXV_HAVE_UNISTD_H 1 #endif ``` I have discovered this error by using Cygwin and MSVC to build in the same source tree. The Cygwin build correctly detects <unistd.h> and sets EXV_HAVE_UNISTD_H in include/exiv2/exv_conf.h. A subsequent build of MSVC uses this rogue file instead of build/exv_conf.h I believe this is a collision between autotools and CMake. As we are now removing autotools, this will not occur again. The block should be removed. ``` #if !defined( EXV_HAVE_UNISTD_H) && defined(__CYGWIN__) #define EXV_HAVE_UNISTD_H 1 #endif ``` Let's fix the typos in config/config.h.cmake and remove the Cygwin/unistd_h test.
config/config.h.cmake and EXV_HAVE_UNISTD_H
https://api.github.com/repos/Exiv2/exiv2/issues/344/comments
5
"2018-05-31T16:24:49"
"2018-06-01T15:08:58Z"
https://github.com/Exiv2/exiv2/issues/344
328,209,123
344
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : config/config.h.cmake and EXV_HAVE_UNISTD_H Issue date: --- start body --- I've been experiencing difficulties with CMake builds on MSVC having EXV_HAVE_UNISTD_H set. No version of MSVC provides <unistd.h> There's suspicious code in config/config.h.cmake. I think the "1" typos are harmless, however let's fix them. ``` /* Define if you have the <unistd.h> header file. */ #cmakedefine EXV_HAVE_UNISTD_H 1 #if !defined( EXV_HAVE_UNISTD_H) && defined(__CYGWIN__) #define EXV_HAVE_UNISTD_H 1 #endif ``` I have discovered this error by using Cygwin and MSVC to build in the same source tree. The Cygwin build correctly detects <unistd.h> and sets EXV_HAVE_UNISTD_H in include/exiv2/exv_conf.h. A subsequent build of MSVC uses this rogue file instead of build/exv_conf.h I believe this is a collision between autotools and CMake. As we are now removing autotools, this will not occur again. The block should be removed. ``` #if !defined( EXV_HAVE_UNISTD_H) && defined(__CYGWIN__) #define EXV_HAVE_UNISTD_H 1 #endif ``` Let's fix the typos in config/config.h.cmake and remove the Cygwin/unistd_h test. --- end body --- comments : --- start comments --- --- end comments ---
1,262
208,062
[ "Exiv2", "exiv2" ]
This issue is being caused by exiv2(.exe) not processing command-line arguments correctly. This has been introduced since using getopt_win32.{c|h} in the code base. The issue is being caused by the extern global variables `optarg` and `optint` in src/getopt_win32.h and src/Utils.cpp are different. I've got a work-around: ``` 690 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2 $ git diff diff --git a/src/utils.cpp b/src/utils.cpp index 7eced11..99acc45 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -30,6 +30,11 @@ #include "utils.hpp" #include "getopt_win32.h" +#ifdef __CYGWIN__ +extern char* optarg; +extern int optind; +#endif + #if defined(_MSC_VER) # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif ``` This work-around produces the compiler warning: ``` [ 64%] Building CXX object samples/CMakeFiles/metacopy.dir/__/src/utils.cpp.o /home/rmills/gnu/github/exiv2/exiv2/src/utils.cpp:34:14: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern char* optarg; ``` Another work-around is to not include src/getopt_win32.c for Cygwin in src/CMakeLists.txt However we adopted getopt_win32.c to provide the same command-line processing on different platforms. The correct fix is to ensure that `optarg` and `optind` are correctly declared in getopt_win32.h I've tried unsuccessfully to use the mysterious `external __declspec dllimport`. I feel this should not be necessary as src/Utils.cpp and src/getopt_win32.c are linked directly into exiv2.exe (and some other sample applications) and not part of the library. I've also wondered if src/Utils.cpp and src/getopt_win32.c see different variable names due to C++ name mangling. However the declarations are protected with C++ guards. I'm exhausted for now and will have to revisit this in future. Although the work-around produces warnings, I think we have to accept that to get the test suite working on Cygwin.
Cygwin build fails test suite
https://api.github.com/repos/Exiv2/exiv2/issues/343/comments
1
"2018-05-31T14:24:21"
"2018-08-02T08:33:35Z"
https://github.com/Exiv2/exiv2/issues/343
328,160,501
343
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Cygwin build fails test suite Issue date: --- start body --- This issue is being caused by exiv2(.exe) not processing command-line arguments correctly. This has been introduced since using getopt_win32.{c|h} in the code base. The issue is being caused by the extern global variables `optarg` and `optint` in src/getopt_win32.h and src/Utils.cpp are different. I've got a work-around: ``` 690 rmills@rmillsmbp-w7:~/gnu/github/exiv2/exiv2 $ git diff diff --git a/src/utils.cpp b/src/utils.cpp index 7eced11..99acc45 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -30,6 +30,11 @@ #include "utils.hpp" #include "getopt_win32.h" +#ifdef __CYGWIN__ +extern char* optarg; +extern int optind; +#endif + #if defined(_MSC_VER) # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif ``` This work-around produces the compiler warning: ``` [ 64%] Building CXX object samples/CMakeFiles/metacopy.dir/__/src/utils.cpp.o /home/rmills/gnu/github/exiv2/exiv2/src/utils.cpp:34:14: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern char* optarg; ``` Another work-around is to not include src/getopt_win32.c for Cygwin in src/CMakeLists.txt However we adopted getopt_win32.c to provide the same command-line processing on different platforms. The correct fix is to ensure that `optarg` and `optind` are correctly declared in getopt_win32.h I've tried unsuccessfully to use the mysterious `external __declspec dllimport`. I feel this should not be necessary as src/Utils.cpp and src/getopt_win32.c are linked directly into exiv2.exe (and some other sample applications) and not part of the library. I've also wondered if src/Utils.cpp and src/getopt_win32.c see different variable names due to C++ name mangling. However the declarations are protected with C++ guards. I'm exhausted for now and will have to revisit this in future. Although the work-around produces warnings, I think we have to accept that to get the test suite working on Cygwin. --- end body --- comments : --- start comments --- --- end comments ---
2,181
208,063
[ "Exiv2", "exiv2" ]
In #335 @clanmills pointed out that there are some existing code in the autotools scripts (which will be removed in #338) involved in the release process: > The other matter that bothers me is making the release. There's stuff in the exiv2/Makefile which is involved in this. I can recover/refactor those scripts and commands to be executed in a different way from SVN as they haven't been touched since releasing v0.26. I created this issue to create a list of the missing things and check what we can do automatically with CMake + CI
Provide targets for making public releases
https://api.github.com/repos/Exiv2/exiv2/issues/340/comments
3
"2018-05-31T09:56:07"
"2018-11-08T01:38:01Z"
https://github.com/Exiv2/exiv2/issues/340
328,072,396
340
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Provide targets for making public releases Issue date: --- start body --- In #335 @clanmills pointed out that there are some existing code in the autotools scripts (which will be removed in #338) involved in the release process: > The other matter that bothers me is making the release. There's stuff in the exiv2/Makefile which is involved in this. I can recover/refactor those scripts and commands to be executed in a different way from SVN as they haven't been touched since releasing v0.26. I created this issue to create a list of the missing things and check what we can do automatically with CMake + CI --- end body --- comments : --- start comments --- --- end comments ---
744
208,064
[ "Exiv2", "exiv2" ]
Currently the documentation is built using **Doxygen**. However the only existing way to generate the documentation is by using the `doc/cmake_doc.sh` script that use the autotool scripts to generate the doc target: ``` make config ./configure ... make doc ``` Since we have plans to remove the autotools configuration scripts (#338), we need to provide some CMake code to generate the documentation via Doxygen. This idea came from a discussion which took place in #335.
Add doc target in CMake
https://api.github.com/repos/Exiv2/exiv2/issues/339/comments
0
"2018-05-31T08:29:34"
"2018-06-04T12:05:42Z"
https://github.com/Exiv2/exiv2/issues/339
328,042,123
339
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Add doc target in CMake Issue date: --- start body --- Currently the documentation is built using **Doxygen**. However the only existing way to generate the documentation is by using the `doc/cmake_doc.sh` script that use the autotool scripts to generate the doc target: ``` make config ./configure ... make doc ``` Since we have plans to remove the autotools configuration scripts (#338), we need to provide some CMake code to generate the documentation via Doxygen. This idea came from a discussion which took place in #335. --- end body --- comments : --- start comments --- --- end comments ---
682
208,065
[ "Exiv2", "exiv2" ]
Conan 1.4 has been released today and it brings some nice features that will help to simplify things in our CMake code: https://docs.conan.io/en/latest/changelog.html
Update to conan 1.4
https://api.github.com/repos/Exiv2/exiv2/issues/337/comments
1
"2018-05-30T11:56:33"
"2018-08-15T16:16:21Z"
https://github.com/Exiv2/exiv2/issues/337
327,697,651
337
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Update to conan 1.4 Issue date: --- start body --- Conan 1.4 has been released today and it brings some nice features that will help to simplify things in our CMake code: https://docs.conan.io/en/latest/changelog.html --- end body --- comments : --- start comments --- --- end comments ---
349
208,066
[ "Exiv2", "exiv2" ]
There have been a lot of commits flowing into the 0.26 branch: $ git log --no-merges v0.26..upstream/0.26 --pretty=oneline | wc -l 57 can you please create a new release/tag from it and push it?
Please create a new release from 0.26 branch
https://api.github.com/repos/Exiv2/exiv2/issues/336/comments
1
"2018-05-30T11:25:51"
"2018-05-31T10:16:02Z"
https://github.com/Exiv2/exiv2/issues/336
327,687,829
336
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Please create a new release from 0.26 branch Issue date: --- start body --- There have been a lot of commits flowing into the 0.26 branch: $ git log --no-merges v0.26..upstream/0.26 --pretty=oneline | wc -l 57 can you please create a new release/tag from it and push it? --- end body --- comments : --- start comments --- --- end comments ---
413
208,067
[ "Exiv2", "exiv2" ]
In the project we include the files timegm.h & localtime.c to provide the timegm functionalities to platforms without timegm (as Windows). In this [stackoverflow](https://stackoverflow.com/questions/16647819/timegm-cross-platform) thread, it is mentioned that simply using this: ``` #define timegm _mkgmtime ``` On windows should be enough, as _mkgmtime provides the same functionality: https://msdn.microsoft.com/en-us/library/2093ets1.aspx Check this out and clean the CMake code.
Analyse and improve situation with TIMEGM
https://api.github.com/repos/Exiv2/exiv2/issues/334/comments
0
"2018-05-30T08:43:06"
"2018-09-12T13:35:44Z"
https://github.com/Exiv2/exiv2/issues/334
327,630,780
334
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Analyse and improve situation with TIMEGM Issue date: --- start body --- In the project we include the files timegm.h & localtime.c to provide the timegm functionalities to platforms without timegm (as Windows). In this [stackoverflow](https://stackoverflow.com/questions/16647819/timegm-cross-platform) thread, it is mentioned that simply using this: ``` #define timegm _mkgmtime ``` On windows should be enough, as _mkgmtime provides the same functionality: https://msdn.microsoft.com/en-us/library/2093ets1.aspx Check this out and clean the CMake code. --- end body --- comments : --- start comments --- --- end comments ---
700
208,068
[ "Exiv2", "exiv2" ]
Try to enable again the Appveyor feature for caching the conan packages. At some point I had to disable this feature because it was causing some problems, but it should work. It should reduce the build times on windows in few seconds.
Conan cache not being stored in AppVeyor
https://api.github.com/repos/Exiv2/exiv2/issues/331/comments
0
"2018-05-29T04:51:08"
"2018-05-29T13:33:09Z"
https://github.com/Exiv2/exiv2/issues/331
327,169,133
331
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Conan cache not being stored in AppVeyor Issue date: --- start body --- Try to enable again the Appveyor feature for caching the conan packages. At some point I had to disable this feature because it was causing some problems, but it should work. It should reduce the build times on windows in few seconds. --- end body --- comments : --- start comments --- --- end comments ---
436
208,069
[ "Exiv2", "exiv2" ]
Hi, is it possible to support the Tamron lens mentioned in the subject? It currently is detected as "Canon EF 300mm f/2.8L IS II USM", so I suspect a clash in lens IDs. Is there a way to detect the lens anyways? The focal length, as well as the model text is read correctly > $ exiv2 -pt ./3P2A5930.CR2 | grep -ai lens > Exif.CanonCs.LensType Short 1 Canon EF 300mm f/2.8L IS II USM > Exif.CanonCs.Lens Short 3 24.0 - 70.0 mm > Exif.Canon.LensModel Ascii 74 TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032 > Exif.Photo.LensSpecification Rational 4 24/1 70/1 0/1 0/1 > Exif.Photo.LensModel Ascii 42 TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032 > Exif.Photo.LensSerialNumber Ascii 11 0000000000 Full exiv2 output attached. Thanks, Bernd [exiv2.txt](https://github.com/Exiv2/exiv2/files/2046114/exiv2.txt)
Support for TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032
https://api.github.com/repos/Exiv2/exiv2/issues/330/comments
2
"2018-05-28T20:34:00"
"2019-01-04T08:33:37Z"
https://github.com/Exiv2/exiv2/issues/330
327,112,723
330
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Support for TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032 Issue date: --- start body --- Hi, is it possible to support the Tamron lens mentioned in the subject? It currently is detected as "Canon EF 300mm f/2.8L IS II USM", so I suspect a clash in lens IDs. Is there a way to detect the lens anyways? The focal length, as well as the model text is read correctly > $ exiv2 -pt ./3P2A5930.CR2 | grep -ai lens > Exif.CanonCs.LensType Short 1 Canon EF 300mm f/2.8L IS II USM > Exif.CanonCs.Lens Short 3 24.0 - 70.0 mm > Exif.Canon.LensModel Ascii 74 TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032 > Exif.Photo.LensSpecification Rational 4 24/1 70/1 0/1 0/1 > Exif.Photo.LensModel Ascii 42 TAMRON SP 24-70mm F/2.8 Di VC USD G2 A032 > Exif.Photo.LensSerialNumber Ascii 11 0000000000 Full exiv2 output attached. Thanks, Bernd [exiv2.txt](https://github.com/Exiv2/exiv2/files/2046114/exiv2.txt) --- end body --- comments : --- start comments --- --- end comments ---
1,199
208,070
[ "Exiv2", "exiv2" ]
In #109 we discussed some inconsistencies in the error codes (`include/exiv2/error.hpp` and `src/error.cpp`) and how to fix them but then did not implement the fix. Here is the list from that PR: - [x] change error message of `Exiv2::kerInvalidTypeValue` to "invalid type in tiff structure" - [x] merge `Exiv2::kerInvalidIccProfile` and `Exiv2::kerInvalidXMP` to `Exiv2::kerInvalidIccProfile` - [ ] change `kerCorruptedMetadata` to `kerTiffParsingError` - [ ] fix invalid usage of `kerTiffDirectoryTooLarge` in the webready code => add a new error code for that (e.g. `kerServerError` or `kerWebError`) - [ ] merge `kerTooManyTiffDirectoryEntries` and `kerTiffDirectoryTooLarge`? I am actually unsure if they should be merged. `kerTooManyTiffDirectoryEntries` aka `Error 49` is used only once in the whole code in `src/tiffcomposite.cpp:1093` (which was indeed last edited by Andreas in 2010) however it is used in the context of writing too many Tiff directories to a file. `kerTiffDirectoryTooLarge` (aka `Error 55`) is actually only once used correctly (I assume) in `Image::printIFDStructure` (the other uses are in the network code and look like this: `Error(55, "Server", serverCode)`, so I assume that is wrong) where it reports that a Tiff directory is larger than `500`. In my opinion these are two different errors.
Fix the error codes
https://api.github.com/repos/Exiv2/exiv2/issues/323/comments
1
"2018-05-23T22:14:40"
"2021-04-13T12:54:13Z"
https://github.com/Exiv2/exiv2/issues/323
325,892,956
323
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Fix the error codes Issue date: --- start body --- In #109 we discussed some inconsistencies in the error codes (`include/exiv2/error.hpp` and `src/error.cpp`) and how to fix them but then did not implement the fix. Here is the list from that PR: - [x] change error message of `Exiv2::kerInvalidTypeValue` to "invalid type in tiff structure" - [x] merge `Exiv2::kerInvalidIccProfile` and `Exiv2::kerInvalidXMP` to `Exiv2::kerInvalidIccProfile` - [ ] change `kerCorruptedMetadata` to `kerTiffParsingError` - [ ] fix invalid usage of `kerTiffDirectoryTooLarge` in the webready code => add a new error code for that (e.g. `kerServerError` or `kerWebError`) - [ ] merge `kerTooManyTiffDirectoryEntries` and `kerTiffDirectoryTooLarge`? I am actually unsure if they should be merged. `kerTooManyTiffDirectoryEntries` aka `Error 49` is used only once in the whole code in `src/tiffcomposite.cpp:1093` (which was indeed last edited by Andreas in 2010) however it is used in the context of writing too many Tiff directories to a file. `kerTiffDirectoryTooLarge` (aka `Error 55`) is actually only once used correctly (I assume) in `Image::printIFDStructure` (the other uses are in the network code and look like this: `Error(55, "Server", serverCode)`, so I assume that is wrong) where it reports that a Tiff directory is larger than `500`. In my opinion these are two different errors. --- end body --- comments : --- start comments --- --- end comments ---
1,513
208,071
[ "Exiv2", "exiv2" ]
Please add support for ISO/IEC 23008-12:2017 HEIF file format. libheif (GPL) already has code to handle exif that could be inspiration https://github.com/strukturag/libheif src/heif_context.{h,cc} ImageMagick, too: https://github.com/ImageMagick/ImageMagick/blob/master/coders/heic.c Example files: https://trac.ffmpeg.org/ticket/6521
Please add support for ISO/IEC 23008-12:2017 HEIF file format
https://api.github.com/repos/Exiv2/exiv2/issues/318/comments
37
"2018-05-21T17:27:52"
"2020-06-17T18:07:41Z"
https://github.com/Exiv2/exiv2/issues/318
324,996,395
318
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Please add support for ISO/IEC 23008-12:2017 HEIF file format Issue date: --- start body --- Please add support for ISO/IEC 23008-12:2017 HEIF file format. libheif (GPL) already has code to handle exif that could be inspiration https://github.com/strukturag/libheif src/heif_context.{h,cc} ImageMagick, too: https://github.com/ImageMagick/ImageMagick/blob/master/coders/heic.c Example files: https://trac.ffmpeg.org/ticket/6521 --- end body --- comments : --- start comments --- --- end comments ---
571
208,072
[ "Exiv2", "exiv2" ]
Some of the commands & outputs include non-ascii characters which result in errors due to `print()` which uses the default encoding of the shell. It would be probably the best to issue a warning to the user, if their shell does not support utf-8 but they try to use the debug mode with non-ascii commands & outputs.
[Testsuite] Debug mode of the testsuite fails when the terminal does not support utf-8
https://api.github.com/repos/Exiv2/exiv2/issues/313/comments
3
"2018-05-17T13:57:43"
"2021-04-13T13:53:26Z"
https://github.com/Exiv2/exiv2/issues/313
324,035,160
313
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : [Testsuite] Debug mode of the testsuite fails when the terminal does not support utf-8 Issue date: --- start body --- Some of the commands & outputs include non-ascii characters which result in errors due to `print()` which uses the default encoding of the shell. It would be probably the best to issue a warning to the user, if their shell does not support utf-8 but they try to use the debug mode with non-ascii commands & outputs. --- end body --- comments : --- start comments --- --- end comments ---
565
208,073
[ "Exiv2", "exiv2" ]
In #223 @mcdamo proposed a patch to update Fujifilm monochrome color modes. The actual patch got kind of forgotten as #224 is now closed. This serves as a reminder so that we don't forget about it.
Merge patch from PR #223?
https://api.github.com/repos/Exiv2/exiv2/issues/308/comments
2
"2018-05-14T22:11:46"
"2018-11-08T01:38:49Z"
https://github.com/Exiv2/exiv2/issues/308
323,000,094
308
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Merge patch from PR #223? Issue date: --- start body --- In #223 @mcdamo proposed a patch to update Fujifilm monochrome color modes. The actual patch got kind of forgotten as #224 is now closed. This serves as a reminder so that we don't forget about it. --- end body --- comments : --- start comments --- --- end comments ---
386
208,074
[ "Exiv2", "exiv2" ]
```jsx STRUCTURE OF PNG FILE: ./fuzzdata_2018_5_13_11_28_25/crash/SEGV-0x607000010000_output__1526182114.43 address | chunk | length | data | checksum 8 | IHDR | 13 | ...o...Z.... | 0xb672087e 33 | bKGD | 6 | ...... | 0xa0bda793 51 | pHYs | 9 | ...H...H | 0x46c96b3e 72 | IDAT | 20639 | x...y.e.U....p.7.......5.U.... | 0x7b95dac3 20723 | tEXt | 37 | date:create.2012-06-19T16:25:2 | 0x6d339eca 20772 | tEXt | 37 | date:modify.2012-06-19T16:25:2 | 0x1c6e2676 20821 | tEXt | 70 | software.ImageMagick 6.7.3-4 2 | 0x0c7b7a53 ASAN:SIGSEGV ==54820==ERROR: AddressSanitizer: SEGV on unknown address 0x607000010000 (pc 0x7f8c9117c3e6 bp 0x000000000009 sp 0x7ffe60505b10 T0) #0 0x7f8c9117c3e5 in Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x1963e5) #1 0x415a85 in Action::Print::printStructure(std::ostream&, Exiv2::PrintStructureOption) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x415a85) #2 0x41d5d1 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x41d5d1) #3 0x4070dd in main (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x4070dd) #4 0x7f8c906a482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #5 0x4073b8 in _start (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x4073b8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) ==54820==ABORTING ``` The command line is exiv2 -pR [poc]. And I think you need to use ASAN to reproduce. Otherwise,it can't crash and it's like an information leak. https://github.com/legend-issue/pocs/blob/master/exiv2/SEGV-0x607000010000_output__1526182114.43
SEGV on Exiv2::PngImage::printStructure
https://api.github.com/repos/Exiv2/exiv2/issues/307/comments
8
"2018-05-13T07:00:35"
"2018-09-18T22:28:39Z"
https://github.com/Exiv2/exiv2/issues/307
322,570,132
307
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : SEGV on Exiv2::PngImage::printStructure Issue date: --- start body --- ```jsx STRUCTURE OF PNG FILE: ./fuzzdata_2018_5_13_11_28_25/crash/SEGV-0x607000010000_output__1526182114.43 address | chunk | length | data | checksum 8 | IHDR | 13 | ...o...Z.... | 0xb672087e 33 | bKGD | 6 | ...... | 0xa0bda793 51 | pHYs | 9 | ...H...H | 0x46c96b3e 72 | IDAT | 20639 | x...y.e.U....p.7.......5.U.... | 0x7b95dac3 20723 | tEXt | 37 | date:create.2012-06-19T16:25:2 | 0x6d339eca 20772 | tEXt | 37 | date:modify.2012-06-19T16:25:2 | 0x1c6e2676 20821 | tEXt | 70 | software.ImageMagick 6.7.3-4 2 | 0x0c7b7a53 ASAN:SIGSEGV ==54820==ERROR: AddressSanitizer: SEGV on unknown address 0x607000010000 (pc 0x7f8c9117c3e6 bp 0x000000000009 sp 0x7ffe60505b10 T0) #0 0x7f8c9117c3e5 in Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x1963e5) #1 0x415a85 in Action::Print::printStructure(std::ostream&, Exiv2::PrintStructureOption) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x415a85) #2 0x41d5d1 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x41d5d1) #3 0x4070dd in main (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x4070dd) #4 0x7f8c906a482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #5 0x4073b8 in _start (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x4073b8) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV ??:0 Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) ==54820==ABORTING ``` The command line is exiv2 -pR [poc]. And I think you need to use ASAN to reproduce. Otherwise,it can't crash and it's like an information leak. https://github.com/legend-issue/pocs/blob/master/exiv2/SEGV-0x607000010000_output__1526182114.43 --- end body --- comments : --- start comments --- --- end comments ---
2,223
208,075
[ "Exiv2", "exiv2" ]
```jsx ================================================================= ==30669==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61a00001f710 at pc 0x7fa47d77b20b bp 0x7ffd844044b0 sp 0x7ffd84403c58 READ of size 1137 at 0x61a00001f710 thread T0 #0 0x7fa47d77b20a in __interceptor_strlen (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x7020a) #1 0x7fa47d3ce8bf in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x19a8bf) #2 0x7fa47d3ced0a in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x19ad0a) #3 0x7fa47d3cb061 in Exiv2::PngImage::readMetadata() (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x197061) #4 0x419978 in Action::Extract::writeThumbnail() const (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x419978) #5 0x422327 in Action::Extract::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x422327) #6 0x406dbd in main (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x406dbd) #7 0x7fa47c8f282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #8 0x407098 in _start (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x407098) 0x61a00001f710 is located 0 bytes to the right of 1168-byte region [0x61a00001f280,0x61a00001f710) allocated by thread T0 here: #0 0x7fa47d7a46b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7fa47d3cae67 in Exiv2::PngImage::readMetadata() (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x196e67) SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __interceptor_strlen Shadow bytes around the buggy address: 0x0c347fffbe90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbeb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c347fffbee0: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbef0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==30669==ABORTING ``` command: exiv2 -et [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000004%2Csig:06%2Csrc:000036%2Cop:havoc%2Crep:128
heap-buffer-overflow on Exiv2::Internal::PngChunk::parseTXTChunk
https://api.github.com/repos/Exiv2/exiv2/issues/306/comments
5
"2018-05-10T09:43:16"
"2018-11-08T01:39:26Z"
https://github.com/Exiv2/exiv2/issues/306
321,871,545
306
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : heap-buffer-overflow on Exiv2::Internal::PngChunk::parseTXTChunk Issue date: --- start body --- ```jsx ================================================================= ==30669==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61a00001f710 at pc 0x7fa47d77b20b bp 0x7ffd844044b0 sp 0x7ffd84403c58 READ of size 1137 at 0x61a00001f710 thread T0 #0 0x7fa47d77b20a in __interceptor_strlen (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x7020a) #1 0x7fa47d3ce8bf in Exiv2::Internal::PngChunk::parseTXTChunk(Exiv2::DataBuf const&, int, Exiv2::Internal::PngChunk::TxtChunkType) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x19a8bf) #2 0x7fa47d3ced0a in Exiv2::Internal::PngChunk::decodeTXTChunk(Exiv2::Image*, Exiv2::DataBuf const&, Exiv2::Internal::PngChunk::TxtChunkType) (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x19ad0a) #3 0x7fa47d3cb061 in Exiv2::PngImage::readMetadata() (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x197061) #4 0x419978 in Action::Extract::writeThumbnail() const (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x419978) #5 0x422327 in Action::Extract::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x422327) #6 0x406dbd in main (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x406dbd) #7 0x7fa47c8f282f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #8 0x407098 in _start (/home/aflgo/song/exiv2/bin/.libs/lt-exiv2+0x407098) 0x61a00001f710 is located 0 bytes to the right of 1168-byte region [0x61a00001f280,0x61a00001f710) allocated by thread T0 here: #0 0x7fa47d7a46b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x7fa47d3cae67 in Exiv2::PngImage::readMetadata() (/home/aflgo/song/exiv2/src/.libs/libexiv2.so.26+0x196e67) SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __interceptor_strlen Shadow bytes around the buggy address: 0x0c347fffbe90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbea0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbeb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbec0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c347fffbed0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c347fffbee0: 00 00[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbef0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c347fffbf30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==30669==ABORTING ``` command: exiv2 -et [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000004%2Csig:06%2Csrc:000036%2Cop:havoc%2Crep:128 --- end body --- comments : --- start comments --- --- end comments ---
3,649
208,076
[ "Exiv2", "exiv2" ]
```jsx $rax : 0x0000000000000000 $rbx : 0x0000000000ec2d30 → 0x2e6d6f633a4c4d58 ("XML:com."?) $rcx : 0x0000000000000000 $rdx : 0x00007ffff6647a2c → 0x0000008100000080 $rsp : 0x00007fffffffdac0 → 0x0000000000ec0db0 → 0x00007ffffbad2488 $rbp : 0x0000000000edf001 $rsi : 0x0000000000000000 $rdi : 0x0000000000000046 $rip : 0x0000000000800096 → <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp BYTE PTR [rbp-0x1], 0xa $r8 : 0x000000000000ffff $r9 : 0x0000000000000000 $r10 : 0x000000000000021b $r11 : 0x00007ffff6933e60 → <tolower+0> lea edx, [rdi+0x80] $r12 : 0x00007fffffffdc80 → 0x000000000000001e $r13 : 0x0000000000ec0aa0 → 0x0000000000c09ab0 → 0x0000000000805d00 → <Exiv2::PngImage::~PngImage()+0> lea rsp, [rsp-0x98] $r14 : 0x00000000ffffffff $r15 : 0x0000000000ec0c60 → 0x7458457411040000 $eflags: [carry PARITY adjust ZERO sign trap INTERRUPT direction overflow RESUME virtualx86 identification] $cs: 0x0033 $gs: 0x0000 $es: 0x0000 $ss: 0x002b $fs: 0x0000 $ds: 0x0000 ───────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffdac0│+0x00: 0x0000000000ec0db0 → 0x00007ffffbad2488 ← $rsp 0x00007fffffffdac8│+0x08: 0x00000411f697e571 0x00007fffffffdad0│+0x10: 0x0000000000000412 0x00007fffffffdad8│+0x18: 0x00007fffffffdca0 → 0x000000000000001e 0x00007fffffffdae0│+0x20: 0x0000000000000001 0x00007fffffffdae8│+0x28: 0x0000000000000002 0x00007fffffffdaf0│+0x30: 0x00000001ffffffff 0x00007fffffffdaf8│+0x38: 0x00000000000007e5 ────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x800086 <Exiv2::PngImage::printStructure(std::ostream&,+0> nop WORD PTR cs:[rax+rax*1+0x0] 0x800090 <Exiv2::PngImage::printStructure(std::ostream&,+0> add rbp, 0x1 0x800094 <Exiv2::PngImage::printStructure(std::ostream&,+0> xor esi, esi → 0x800096 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp BYTE PTR [rbp-0x1], 0xa 0x80009a <Exiv2::PngImage::printStructure(std::ostream&,+0> sete sil 0x80009e <Exiv2::PngImage::printStructure(std::ostream&,+0> add rax, rsi 0x8000a1 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp rax, 0x2 0x8000a5 <Exiv2::PngImage::printStructure(std::ostream&,+0> jle 0x800090 <Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int)+14640> 0x8000a7 <Exiv2::PngImage::printStructure(std::ostream&,+0> nop ─────────────────────────────────────────────────[ source:pngimage.cpp+161 ]──── 156 // calculate length and allocate result; 157 long count=0; 158 const byte* p = bytes ; 159 // header is \nsomething\n number\n hex 160 while ( count < 3 ) → 161 if ( *p++ == '\n' ) 162 count++; 163 for ( long i = 0 ; i < length ; i++ ) 164 if ( value[p[i]] ) 165 ++count; 166 result.alloc((count+1)/2) ; ─────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGSEGV ───────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x800096 → Name: Exiv2::tEXtToDataBuf(result=@0x7fffffffdb40, length=0xffffffff, bytes=0xec3142 "") [#1] 0x800096 → Name: Exiv2::PngImage::printStructure(this=0xec0aa0, out=@0xe90640, option=Exiv2::kpsXMP, depth=0x0) [#2] 0x46bdc5 → Name: Action::Print::printStructure(this=0xec1cc0, out=@0xe90640, option=Exiv2::kpsXMP) [#3] 0x486cfd → Name: Action::Print::run(this=0xec1cc0, path="id:000118,orig:c-m1-8f2b481b7fd9bd745e620b7c01a18df2.png") [#4] 0x40772d → Name: main(argc=0x3, argv=0x7fffffffdf18) [#5] 0x7ffff6926830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x3, argv=0x7fffffffdf18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf08) [#6] 0x4277c9 → Name: _start() ``` command : exiv2 -pX [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000118%2Corig:c-m1-8f2b481b7fd9bd745e620b7c01a18df2.png
An over-read in src/pngimage.cpp#L161
https://api.github.com/repos/Exiv2/exiv2/issues/305/comments
2
"2018-05-10T07:58:06"
"2018-11-08T01:39:43Z"
https://github.com/Exiv2/exiv2/issues/305
321,843,895
305
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : An over-read in src/pngimage.cpp#L161 Issue date: --- start body --- ```jsx $rax : 0x0000000000000000 $rbx : 0x0000000000ec2d30 → 0x2e6d6f633a4c4d58 ("XML:com."?) $rcx : 0x0000000000000000 $rdx : 0x00007ffff6647a2c → 0x0000008100000080 $rsp : 0x00007fffffffdac0 → 0x0000000000ec0db0 → 0x00007ffffbad2488 $rbp : 0x0000000000edf001 $rsi : 0x0000000000000000 $rdi : 0x0000000000000046 $rip : 0x0000000000800096 → <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp BYTE PTR [rbp-0x1], 0xa $r8 : 0x000000000000ffff $r9 : 0x0000000000000000 $r10 : 0x000000000000021b $r11 : 0x00007ffff6933e60 → <tolower+0> lea edx, [rdi+0x80] $r12 : 0x00007fffffffdc80 → 0x000000000000001e $r13 : 0x0000000000ec0aa0 → 0x0000000000c09ab0 → 0x0000000000805d00 → <Exiv2::PngImage::~PngImage()+0> lea rsp, [rsp-0x98] $r14 : 0x00000000ffffffff $r15 : 0x0000000000ec0c60 → 0x7458457411040000 $eflags: [carry PARITY adjust ZERO sign trap INTERRUPT direction overflow RESUME virtualx86 identification] $cs: 0x0033 $gs: 0x0000 $es: 0x0000 $ss: 0x002b $fs: 0x0000 $ds: 0x0000 ───────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffdac0│+0x00: 0x0000000000ec0db0 → 0x00007ffffbad2488 ← $rsp 0x00007fffffffdac8│+0x08: 0x00000411f697e571 0x00007fffffffdad0│+0x10: 0x0000000000000412 0x00007fffffffdad8│+0x18: 0x00007fffffffdca0 → 0x000000000000001e 0x00007fffffffdae0│+0x20: 0x0000000000000001 0x00007fffffffdae8│+0x28: 0x0000000000000002 0x00007fffffffdaf0│+0x30: 0x00000001ffffffff 0x00007fffffffdaf8│+0x38: 0x00000000000007e5 ────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x800086 <Exiv2::PngImage::printStructure(std::ostream&,+0> nop WORD PTR cs:[rax+rax*1+0x0] 0x800090 <Exiv2::PngImage::printStructure(std::ostream&,+0> add rbp, 0x1 0x800094 <Exiv2::PngImage::printStructure(std::ostream&,+0> xor esi, esi → 0x800096 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp BYTE PTR [rbp-0x1], 0xa 0x80009a <Exiv2::PngImage::printStructure(std::ostream&,+0> sete sil 0x80009e <Exiv2::PngImage::printStructure(std::ostream&,+0> add rax, rsi 0x8000a1 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp rax, 0x2 0x8000a5 <Exiv2::PngImage::printStructure(std::ostream&,+0> jle 0x800090 <Exiv2::PngImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int)+14640> 0x8000a7 <Exiv2::PngImage::printStructure(std::ostream&,+0> nop ─────────────────────────────────────────────────[ source:pngimage.cpp+161 ]──── 156 // calculate length and allocate result; 157 long count=0; 158 const byte* p = bytes ; 159 // header is \nsomething\n number\n hex 160 while ( count < 3 ) → 161 if ( *p++ == '\n' ) 162 count++; 163 for ( long i = 0 ; i < length ; i++ ) 164 if ( value[p[i]] ) 165 ++count; 166 result.alloc((count+1)/2) ; ─────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGSEGV ───────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x800096 → Name: Exiv2::tEXtToDataBuf(result=@0x7fffffffdb40, length=0xffffffff, bytes=0xec3142 "") [#1] 0x800096 → Name: Exiv2::PngImage::printStructure(this=0xec0aa0, out=@0xe90640, option=Exiv2::kpsXMP, depth=0x0) [#2] 0x46bdc5 → Name: Action::Print::printStructure(this=0xec1cc0, out=@0xe90640, option=Exiv2::kpsXMP) [#3] 0x486cfd → Name: Action::Print::run(this=0xec1cc0, path="id:000118,orig:c-m1-8f2b481b7fd9bd745e620b7c01a18df2.png") [#4] 0x40772d → Name: main(argc=0x3, argv=0x7fffffffdf18) [#5] 0x7ffff6926830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x3, argv=0x7fffffffdf18, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf08) [#6] 0x4277c9 → Name: _start() ``` command : exiv2 -pX [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000118%2Corig:c-m1-8f2b481b7fd9bd745e620b7c01a18df2.png --- end body --- comments : --- start comments --- --- end comments ---
4,390
208,077
[ "Exiv2", "exiv2" ]
```jsx $rax : 0x0000000000000000 $rbx : 0x0000000000ec10a0 → "XML:com.adobe.xmp<?xpacket begin=" " id="W5M0MpCeh[...]" $rcx : 0x000000000001d62f $rdx : 0x00000000000001df $rsp : 0x00007fffffffdaa0 → 0x0000000000ec0db0 → 0x00007ffffbad2488 $rbp : 0x0000000000ec19ca → 0x00000000000000ec $rsi : 0x00000000000001df $rdi : 0x0000000000000000 $rip : 0x0000000000800671 → <Exiv2::PngImage::printStructure(std::ostream&,+0> movzx r11d, BYTE PTR [rbp+rcx*1+0x7] $r8 : 0x0000000000000000 $r9 : 0x00000000000001df $r10 : 0x0000000000000000 $r11 : 0xffffffffffffffff $r12 : 0x00007fffffffdc60 → 0x000000000000001e $r13 : 0x0000000000ec0aa0 → 0x0000000000c09ab0 → 0x0000000000805d00 → <Exiv2::PngImage::~PngImage()+0> lea rsp, [rsp-0x98] $r14 : 0x00000000ffffffff $r15 : 0x0000000000ec0c60 → 0x7458457450000000 $eflags: [CARRY PARITY ADJUST zero SIGN trap INTERRUPT direction overflow RESUME virtualx86 identification] $es: 0x0000 $gs: 0x0000 $ss: 0x002b $ds: 0x0000 $fs: 0x0000 $cs: 0x0033 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffdaa0│+0x00: 0x0000000000ec0db0 → 0x00007ffffbad2488 ← $rsp 0x00007fffffffdaa8│+0x08: 0x00000050f697e571 0x00007fffffffdab0│+0x10: 0x0000000000000051 ("Q"?) 0x00007fffffffdab8│+0x18: 0x00007fffffffdc80 → 0x000000000000001e 0x00007fffffffdac0│+0x20: 0x0000000000000001 0x00007fffffffdac8│+0x28: 0x0000000000000002 0x00007fffffffdad0│+0x30: 0x00000001ffffffff 0x00007fffffffdad8│+0x38: 0x000000000000c474 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x80065f <Exiv2::PngImage::printStructure(std::ostream&,+0> or eax, 0xdb194d06 0x800664 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [rax*4+0xe9b440], 0x1 0x80066c <Exiv2::PngImage::printStructure(std::ostream&,+0> lea rdx, [rsi+r11*1+0x1] → 0x800671 <Exiv2::PngImage::printStructure(std::ostream&,+0> movzx r11d, BYTE PTR [rbp+rcx*1+0x7] 0x800677 <Exiv2::PngImage::printStructure(std::ostream&,+0> sbb r9, r9 0x80067a <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [rdi*4+0xe9b440], 0x1 0x800682 <Exiv2::PngImage::printStructure(std::ostream&,+0> lea r10, [rdx+r9*1+0x1] 0x800687 <Exiv2::PngImage::printStructure(std::ostream&,+0> sbb rsi, rsi 0x80068a <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [r11*4+0xe9b440], 0x1 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ source:pngimage.cpp+164 ]──── 159 // header is \nsomething\n number\n hex 160 while ( count < 3 ) 161 if ( *p++ == '\n' ) 162 count++; 163 for ( long i = 0 ; i < length ; i++ ) → 164 if ( value[p[i]] ) 165 ++count; 166 result.alloc((count+1)/2) ; 167 168 // hex to binary 169 count = 0 ; ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGSEGV ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x800671 → Name: Exiv2::tEXtToDataBuf(result=@0x7fffffffdb20, length=0xffffffff, bytes=0xec10f1 "-Modify\301\006") [#1] 0x800671 → Name: Exiv2::PngImage::printStructure(this=0xec0aa0, out=@0xe90640, option=Exiv2::kpsXMP, depth=0x0) [#2] 0x46bdc5 → Name: Action::Print::printStructure(this=0xec1cc0, out=@0xe90640, option=Exiv2::kpsXMP) [#3] 0x486cfd → Name: Action::Print::run(this=0xec1cc0, path="id:000114,orig:c-m1-1fc0c0de88608a9445d6f98a544b5abc.png") [#4] 0x40772d → Name: main(argc=0x3, argv=0x7fffffffdef8) [#5] 0x7ffff6926830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x3, argv=0x7fffffffdef8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdee8) [#6] 0x4277c9 → Name: _start() ``` command : exiv2 -pX [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000114%2Corig:c-m1-1fc0c0de88608a9445d6f98a544b5abc.png
An integer overflow in src/pngimage.cpp#L306
https://api.github.com/repos/Exiv2/exiv2/issues/304/comments
2
"2018-05-10T06:37:52"
"2018-11-08T00:01:40Z"
https://github.com/Exiv2/exiv2/issues/304
321,826,005
304
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : An integer overflow in src/pngimage.cpp#L306 Issue date: --- start body --- ```jsx $rax : 0x0000000000000000 $rbx : 0x0000000000ec10a0 → "XML:com.adobe.xmp<?xpacket begin=" " id="W5M0MpCeh[...]" $rcx : 0x000000000001d62f $rdx : 0x00000000000001df $rsp : 0x00007fffffffdaa0 → 0x0000000000ec0db0 → 0x00007ffffbad2488 $rbp : 0x0000000000ec19ca → 0x00000000000000ec $rsi : 0x00000000000001df $rdi : 0x0000000000000000 $rip : 0x0000000000800671 → <Exiv2::PngImage::printStructure(std::ostream&,+0> movzx r11d, BYTE PTR [rbp+rcx*1+0x7] $r8 : 0x0000000000000000 $r9 : 0x00000000000001df $r10 : 0x0000000000000000 $r11 : 0xffffffffffffffff $r12 : 0x00007fffffffdc60 → 0x000000000000001e $r13 : 0x0000000000ec0aa0 → 0x0000000000c09ab0 → 0x0000000000805d00 → <Exiv2::PngImage::~PngImage()+0> lea rsp, [rsp-0x98] $r14 : 0x00000000ffffffff $r15 : 0x0000000000ec0c60 → 0x7458457450000000 $eflags: [CARRY PARITY ADJUST zero SIGN trap INTERRUPT direction overflow RESUME virtualx86 identification] $es: 0x0000 $gs: 0x0000 $ss: 0x002b $ds: 0x0000 $fs: 0x0000 $cs: 0x0033 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffdaa0│+0x00: 0x0000000000ec0db0 → 0x00007ffffbad2488 ← $rsp 0x00007fffffffdaa8│+0x08: 0x00000050f697e571 0x00007fffffffdab0│+0x10: 0x0000000000000051 ("Q"?) 0x00007fffffffdab8│+0x18: 0x00007fffffffdc80 → 0x000000000000001e 0x00007fffffffdac0│+0x20: 0x0000000000000001 0x00007fffffffdac8│+0x28: 0x0000000000000002 0x00007fffffffdad0│+0x30: 0x00000001ffffffff 0x00007fffffffdad8│+0x38: 0x000000000000c474 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x80065f <Exiv2::PngImage::printStructure(std::ostream&,+0> or eax, 0xdb194d06 0x800664 <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [rax*4+0xe9b440], 0x1 0x80066c <Exiv2::PngImage::printStructure(std::ostream&,+0> lea rdx, [rsi+r11*1+0x1] → 0x800671 <Exiv2::PngImage::printStructure(std::ostream&,+0> movzx r11d, BYTE PTR [rbp+rcx*1+0x7] 0x800677 <Exiv2::PngImage::printStructure(std::ostream&,+0> sbb r9, r9 0x80067a <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [rdi*4+0xe9b440], 0x1 0x800682 <Exiv2::PngImage::printStructure(std::ostream&,+0> lea r10, [rdx+r9*1+0x1] 0x800687 <Exiv2::PngImage::printStructure(std::ostream&,+0> sbb rsi, rsi 0x80068a <Exiv2::PngImage::printStructure(std::ostream&,+0> cmp DWORD PTR [r11*4+0xe9b440], 0x1 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ source:pngimage.cpp+164 ]──── 159 // header is \nsomething\n number\n hex 160 while ( count < 3 ) 161 if ( *p++ == '\n' ) 162 count++; 163 for ( long i = 0 ; i < length ; i++ ) → 164 if ( value[p[i]] ) 165 ++count; 166 result.alloc((count+1)/2) ; 167 168 // hex to binary 169 count = 0 ; ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGSEGV ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x800671 → Name: Exiv2::tEXtToDataBuf(result=@0x7fffffffdb20, length=0xffffffff, bytes=0xec10f1 "-Modify\301\006") [#1] 0x800671 → Name: Exiv2::PngImage::printStructure(this=0xec0aa0, out=@0xe90640, option=Exiv2::kpsXMP, depth=0x0) [#2] 0x46bdc5 → Name: Action::Print::printStructure(this=0xec1cc0, out=@0xe90640, option=Exiv2::kpsXMP) [#3] 0x486cfd → Name: Action::Print::run(this=0xec1cc0, path="id:000114,orig:c-m1-1fc0c0de88608a9445d6f98a544b5abc.png") [#4] 0x40772d → Name: main(argc=0x3, argv=0x7fffffffdef8) [#5] 0x7ffff6926830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x3, argv=0x7fffffffdef8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdee8) [#6] 0x4277c9 → Name: _start() ``` command : exiv2 -pX [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000114%2Corig:c-m1-1fc0c0de88608a9445d6f98a544b5abc.png --- end body --- comments : --- start comments --- --- end comments ---
4,717
208,078
[ "Exiv2", "exiv2" ]
```jsx RAX: 0x0 RBX: 0xec0d18 ("Overflow in addition") RCX: 0x7ffff693b428 (<__GI_raise+56>: cmp rax,0xfffffffffffff000) RDX: 0x6 RSI: 0x9367 RDI: 0x9367 RBP: 0xe907c0 --> 0x7ffff6ccb540 --> 0xfbad2887 RSP: 0x7fffffffcf78 --> 0x7ffff693d02a (<__GI_abort+362>: mov rdx,QWORD PTR fs:0x10) RIP: 0x7ffff693b428 (<__GI_raise+56>: cmp rax,0xfffffffffffff000) R8 : 0x7ffff6ccc770 --> 0x0 R9 : 0x7ffff7fd3740 (0x00007ffff7fd3740) R10: 0x8 R11: 0x202 R12: 0xec0aa0 --> 0x0 R13: 0xba6958 --> 0x4b40e0 (<Exiv2::FileIo::~FileIo()>: lea rsp,[rsp-0x98]) R14: 0x7fffffffd260 --> 0x14 R15: 0x14 EFLAGS: 0x202 (carry parity adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff693b41e <__GI_raise+46>: mov eax,0xea 0x7ffff693b423 <__GI_raise+51>: movsxd rdi,ecx 0x7ffff693b426 <__GI_raise+54>: syscall => 0x7ffff693b428 <__GI_raise+56>: cmp rax,0xfffffffffffff000 0x7ffff693b42e <__GI_raise+62>: ja 0x7ffff693b450 <__GI_raise+96> 0x7ffff693b430 <__GI_raise+64>: repz ret 0x7ffff693b432 <__GI_raise+66>: nop WORD PTR [rax+rax*1+0x0] 0x7ffff693b438 <__GI_raise+72>: test ecx,ecx [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf78 --> 0x7ffff693d02a (<__GI_abort+362>: mov rdx,QWORD PTR fs:0x10) 0008| 0x7fffffffcf80 --> 0x20 (' ') 0016| 0x7fffffffcf88 --> 0x0 0024| 0x7fffffffcf90 --> 0x0 0032| 0x7fffffffcf98 --> 0x0 0040| 0x7fffffffcfa0 --> 0x0 0048| 0x7fffffffcfa8 --> 0x0 0056| 0x7fffffffcfb0 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGABRT 0x00007ffff693b428 in __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [ Legend: Modified register | Code | Heap | Stack | String ] ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ registers ]──── $rax : 0x0000000000000000 $rbx : 0x0000000000ec0d18 → "Overflow in addition" $rcx : 0x00007ffff693b428 → 0x2077fffff0003d48 ("H="?) $rdx : 0x0000000000000006 $rsp : 0x00007fffffffcf78 → 0x00007ffff693d02a → <abort+362> mov rdx, QWORD PTR fs:0x10 $rbp : 0x0000000000e907c0 → 0x00007ffff6ccb540 → 0x00000000fbad2887 $rsi : 0x0000000000009367 $rdi : 0x0000000000009367 $rip : 0x00007ffff693b428 → 0x2077fffff0003d48 ("H="?) $r8 : 0x00007ffff6ccc770 → 0x0000000000000000 $r9 : 0x00007ffff7fd3740 → 0x00007ffff7fd3740 → [loop detected] $r10 : 0x0000000000000008 $r11 : 0x0000000000000202 $r12 : 0x0000000000ec0aa0 → 0x0000000000000000 $r13 : 0x0000000000ba6958 → 0x00000000004b40e0 → <Exiv2::FileIo::~FileIo()+0> lea rsp, [rsp-0x98] $r14 : 0x00007fffffffd260 → 0x0000000000000014 $r15 : 0x0000000000000014 $eflags: [carry parity adjust zero sign trap INTERRUPT direction overflow resume virtualx86 identification] $gs: 0x0000 $fs: 0x0000 $ss: 0x002b $ds: 0x0000 $es: 0x0000 $cs: 0x0033 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffcf78│+0x00: 0x00007ffff693d02a → <abort+362> mov rdx, QWORD PTR fs:0x10 ← $rsp 0x00007fffffffcf80│+0x08: 0x0000000000000020 0x00007fffffffcf88│+0x10: 0x0000000000000000 0x00007fffffffcf90│+0x18: 0x0000000000000000 0x00007fffffffcf98│+0x20: 0x0000000000000000 0x00007fffffffcfa0│+0x28: 0x0000000000000000 0x00007fffffffcfa8│+0x30: 0x0000000000000000 0x00007fffffffcfb0│+0x38: 0x0000000000000000 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x7ffff693b41e <raise+46> mov eax, 0xea 0x7ffff693b423 <raise+51> movsxd rdi, ecx 0x7ffff693b426 <raise+54> syscall → 0x7ffff693b428 <raise+56> cmp rax, 0xfffffffffffff000 0x7ffff693b42e <raise+62> ja 0x7ffff693b450 <__GI_raise+96> 0x7ffff693b430 <raise+64> repz ret 0x7ffff693b432 <raise+66> nop WORD PTR [rax+rax*1+0x0] 0x7ffff693b438 <raise+72> test ecx, ecx 0x7ffff693b43a <raise+74> jg 0x7ffff693b41b <__GI_raise+43> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGABRT ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x7ffff693b428 → Name: __GI_raise(sig=0x6) [#1] 0x7ffff693d02a → Name: __GI_abort() [#2] 0x7ffff727e84d → Name: __gnu_cxx::__verbose_terminate_handler()() [#3] 0x7ffff727c6b6 → call 0x7ffff7275fc0 <abort@plt> [#4] 0x7ffff727c701 → Name: std::terminate()() [#5] 0x7ffff727c919 → Name: __cxa_throw() [#6] 0x607c6a → Name: Safe::add<unsigned int>(summand_2=0x8, summand_1=<optimized out>) [#7] 0x607c6a → Name: Exiv2::Jp2Image::readMetadata(this=<optimized out>) [#8] 0x47ab61 → Name: Action::Extract::writeThumbnail(this=0xec1cf0) [#9] 0x496fa0 → Name: Action::Extract::run(this=0xec1cf0, path="/home/aflgo/exiv2/out-2/crashes/id:000008,sig:06,src:000335,op:int32,pos:62,val:-1") ``` command: exiv2 -et [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000008%2Csig:06%2Csrc:000335%2Cop:int32%2Cpos:62%2Cval:-1
SIGABRT in src/jp2image.cpp Safe::add
https://api.github.com/repos/Exiv2/exiv2/issues/303/comments
9
"2018-05-10T01:16:20"
"2018-07-04T00:29:12Z"
https://github.com/Exiv2/exiv2/issues/303
321,776,917
303
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : SIGABRT in src/jp2image.cpp Safe::add Issue date: --- start body --- ```jsx RAX: 0x0 RBX: 0xec0d18 ("Overflow in addition") RCX: 0x7ffff693b428 (<__GI_raise+56>: cmp rax,0xfffffffffffff000) RDX: 0x6 RSI: 0x9367 RDI: 0x9367 RBP: 0xe907c0 --> 0x7ffff6ccb540 --> 0xfbad2887 RSP: 0x7fffffffcf78 --> 0x7ffff693d02a (<__GI_abort+362>: mov rdx,QWORD PTR fs:0x10) RIP: 0x7ffff693b428 (<__GI_raise+56>: cmp rax,0xfffffffffffff000) R8 : 0x7ffff6ccc770 --> 0x0 R9 : 0x7ffff7fd3740 (0x00007ffff7fd3740) R10: 0x8 R11: 0x202 R12: 0xec0aa0 --> 0x0 R13: 0xba6958 --> 0x4b40e0 (<Exiv2::FileIo::~FileIo()>: lea rsp,[rsp-0x98]) R14: 0x7fffffffd260 --> 0x14 R15: 0x14 EFLAGS: 0x202 (carry parity adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff693b41e <__GI_raise+46>: mov eax,0xea 0x7ffff693b423 <__GI_raise+51>: movsxd rdi,ecx 0x7ffff693b426 <__GI_raise+54>: syscall => 0x7ffff693b428 <__GI_raise+56>: cmp rax,0xfffffffffffff000 0x7ffff693b42e <__GI_raise+62>: ja 0x7ffff693b450 <__GI_raise+96> 0x7ffff693b430 <__GI_raise+64>: repz ret 0x7ffff693b432 <__GI_raise+66>: nop WORD PTR [rax+rax*1+0x0] 0x7ffff693b438 <__GI_raise+72>: test ecx,ecx [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf78 --> 0x7ffff693d02a (<__GI_abort+362>: mov rdx,QWORD PTR fs:0x10) 0008| 0x7fffffffcf80 --> 0x20 (' ') 0016| 0x7fffffffcf88 --> 0x0 0024| 0x7fffffffcf90 --> 0x0 0032| 0x7fffffffcf98 --> 0x0 0040| 0x7fffffffcfa0 --> 0x0 0048| 0x7fffffffcfa8 --> 0x0 0056| 0x7fffffffcfb0 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGABRT 0x00007ffff693b428 in __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [ Legend: Modified register | Code | Heap | Stack | String ] ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ registers ]──── $rax : 0x0000000000000000 $rbx : 0x0000000000ec0d18 → "Overflow in addition" $rcx : 0x00007ffff693b428 → 0x2077fffff0003d48 ("H="?) $rdx : 0x0000000000000006 $rsp : 0x00007fffffffcf78 → 0x00007ffff693d02a → <abort+362> mov rdx, QWORD PTR fs:0x10 $rbp : 0x0000000000e907c0 → 0x00007ffff6ccb540 → 0x00000000fbad2887 $rsi : 0x0000000000009367 $rdi : 0x0000000000009367 $rip : 0x00007ffff693b428 → 0x2077fffff0003d48 ("H="?) $r8 : 0x00007ffff6ccc770 → 0x0000000000000000 $r9 : 0x00007ffff7fd3740 → 0x00007ffff7fd3740 → [loop detected] $r10 : 0x0000000000000008 $r11 : 0x0000000000000202 $r12 : 0x0000000000ec0aa0 → 0x0000000000000000 $r13 : 0x0000000000ba6958 → 0x00000000004b40e0 → <Exiv2::FileIo::~FileIo()+0> lea rsp, [rsp-0x98] $r14 : 0x00007fffffffd260 → 0x0000000000000014 $r15 : 0x0000000000000014 $eflags: [carry parity adjust zero sign trap INTERRUPT direction overflow resume virtualx86 identification] $gs: 0x0000 $fs: 0x0000 $ss: 0x002b $ds: 0x0000 $es: 0x0000 $cs: 0x0033 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffcf78│+0x00: 0x00007ffff693d02a → <abort+362> mov rdx, QWORD PTR fs:0x10 ← $rsp 0x00007fffffffcf80│+0x08: 0x0000000000000020 0x00007fffffffcf88│+0x10: 0x0000000000000000 0x00007fffffffcf90│+0x18: 0x0000000000000000 0x00007fffffffcf98│+0x20: 0x0000000000000000 0x00007fffffffcfa0│+0x28: 0x0000000000000000 0x00007fffffffcfa8│+0x30: 0x0000000000000000 0x00007fffffffcfb0│+0x38: 0x0000000000000000 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x7ffff693b41e <raise+46> mov eax, 0xea 0x7ffff693b423 <raise+51> movsxd rdi, ecx 0x7ffff693b426 <raise+54> syscall → 0x7ffff693b428 <raise+56> cmp rax, 0xfffffffffffff000 0x7ffff693b42e <raise+62> ja 0x7ffff693b450 <__GI_raise+96> 0x7ffff693b430 <raise+64> repz ret 0x7ffff693b432 <raise+66> nop WORD PTR [rax+rax*1+0x0] 0x7ffff693b438 <raise+72> test ecx, ecx 0x7ffff693b43a <raise+74> jg 0x7ffff693b41b <__GI_raise+43> ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SIGABRT ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x7ffff693b428 → Name: __GI_raise(sig=0x6) [#1] 0x7ffff693d02a → Name: __GI_abort() [#2] 0x7ffff727e84d → Name: __gnu_cxx::__verbose_terminate_handler()() [#3] 0x7ffff727c6b6 → call 0x7ffff7275fc0 <abort@plt> [#4] 0x7ffff727c701 → Name: std::terminate()() [#5] 0x7ffff727c919 → Name: __cxa_throw() [#6] 0x607c6a → Name: Safe::add<unsigned int>(summand_2=0x8, summand_1=<optimized out>) [#7] 0x607c6a → Name: Exiv2::Jp2Image::readMetadata(this=<optimized out>) [#8] 0x47ab61 → Name: Action::Extract::writeThumbnail(this=0xec1cf0) [#9] 0x496fa0 → Name: Action::Extract::run(this=0xec1cf0, path="/home/aflgo/exiv2/out-2/crashes/id:000008,sig:06,src:000335,op:int32,pos:62,val:-1") ``` command: exiv2 -et [poc] https://github.com/legend-issue/pocs/blob/master/exiv2/id:000008%2Csig:06%2Csrc:000335%2Cop:int32%2Cpos:62%2Cval:-1 --- end body --- comments : --- start comments --- --- end comments ---
5,872
208,079
[ "Exiv2", "exiv2" ]
```jsx $rax : 0x0000000000000000 $rbx : 0x00007fffffffd360 → 0x0000000000000000 $rcx : 0x0000000000ec0fed → 0x6e69676522000001 $rdx : 0x00007fffffffd360 → 0x0000000000000000 $rsp : 0x00007fffffffd200 → 0x0000000000000000 $rbp : 0x00000000ffffffea $rsi : 0x00000000ffffffea $rdi : 0x0000000000000000 $rip : 0x00000000007685c7 → <Exiv2::DataBuf::alloc(long)+279> mov rdi, rbp $r8 : 0xffffffffffffe310 $r9 : 0xffffffffffffe300 $r10 : 0xffffffffffffe2f0 $r11 : 0x000000000000047a $r12 : 0x0000000000ec146b → 0xbcaea80000000000 $r13 : 0x000000000000001c $r14 : 0x0000000000000000 $r15 : 0x0000000000000000 $eflags: [carry PARITY adjust ZERO sign trap INTERRUPT direction overflow resume virtualx86 identification] $es: 0x0000 $gs: 0x0000 $ds: 0x0000 $ss: 0x002b $fs: 0x0000 $cs: 0x0033 ───────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffd200│+0x00: 0x0000000000000000 ← $rsp 0x00007fffffffd208│+0x08: 0x00007fffffffd360 → 0x0000000000000000 0x00007fffffffd210│+0x10: 0x00000000fffffff5 0x00007fffffffd218│+0x18: 0x0000000000813738 → <Exiv2::Internal::PngChunk::zlibUncompress(unsigned+0> mov rdi, QWORD PTR [rbx] 0x00007fffffffd220│+0x20: 0x00000000ffffffea 0x00007fffffffd228│+0x28: 0xa65c0e3e1fcb3000 0x00007fffffffd230│+0x30: 0x0000000000ec0fd0 → 0x2e6d6f633a4c4d58 0x00007fffffffd238│+0x38: 0x00007fffffffd360 → 0x0000000000000000 ────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x7685b0 <Exiv2::DataBuf::alloc(long)+256> lea rsp, [rsp+0x98] 0x7685b8 <Exiv2::DataBuf::alloc(long)+264> mov QWORD PTR [rbx], 0x0 0x7685bf <Exiv2::DataBuf::alloc(long)+271> mov QWORD PTR [rbx+0x8], 0x0 → 0x7685c7 <Exiv2::DataBuf::alloc(long)+279> mov rdi, rbp 0x7685ca <Exiv2::DataBuf::alloc(long)+282> call 0x405ac0 <_Znam@plt> 0x7685cf <Exiv2::DataBuf::alloc(long)+287> mov QWORD PTR [rbx+0x8], rbp 0x7685d3 <Exiv2::DataBuf::alloc(long)+291> mov QWORD PTR [rbx], rax 0x7685d6 <Exiv2::DataBuf::alloc(long)+294> add rsp, 0x8 0x7685da <Exiv2::DataBuf::alloc(long)+298> pop rbx ────────────────────────────────────────────────────[ source:types.cpp+153 ]──── 148 { 149 if (size > size_) { 150 delete[] pData_; 151 pData_ = 0; 152 size_ = 0; // size=0xffffffea → 153 pData_ = new byte[size]; 154 size_ = size; 155 } 156 } 157 158 std::pair<byte*, long> DataBuf::release() ─────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SINGLE STEP ───────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x7685c7 → Name: Exiv2::DataBuf::alloc(this=0x7fffffffd360, size=0xffffffea) [#1] 0x813738 → Name: Exiv2::Internal::PngChunk::zlibUncompress(compressedText=0xec146b "", compressedTextSize=0xfffffff5, arr=@0x7fffffffd360) [#2] 0x814330 → Name: Exiv2::Internal::PngChunk::parseTXTChunk(data=@0x7fffffffd3f0, keysize=0x1c, type=Exiv2::Internal::PngChunk::iTXt_Chunk) [#3] 0x8153fe → Name: Exiv2::Internal::PngChunk::decodeTXTChunk(pImage=0xec0a90, data=@0x7fffffffd3f0, type=Exiv2::Internal::PngChunk::iTXt_Chunk) [#4] 0x804342 → Name: Exiv2::PngImage::readMetadata(this=0xec0a90) [#5] 0x480362 → Name: Action::Print::printSummary(this=0xec1c10) [#6] 0x486d68 → Name: Action::Print::run(this=0xec1c10, path="id:000004,sig:06,src:000036,op:havoc,rep:128") [#7] 0x40772d → Name: main(argc=0x2, argv=0x7fffffffdf38) [#8] 0x7fffbe826830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x2, argv=0x7fffffffdf38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf28) [#9] 0x4277c9 → Name: _start() ──────────────────────────────────────────────────────────────────────────────── gef➤ terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Program received signal SIGABRT, Aborted. ``` I find this when I set ‘ulimit -v 1048576(1G)’. The command is "exiv2 -et [poc]" https://github.com/legend-issue/pocs/blob/master/exiv2/id:000004%2Csig:06%2Csrc:000036%2Cop:havoc%2Crep:128
SIGABRT in types.cpp Exiv2::DataBuf::alloc function
https://api.github.com/repos/Exiv2/exiv2/issues/302/comments
7
"2018-05-09T13:38:53"
"2018-11-08T01:40:39Z"
https://github.com/Exiv2/exiv2/issues/302
321,574,341
302
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : SIGABRT in types.cpp Exiv2::DataBuf::alloc function Issue date: --- start body --- ```jsx $rax : 0x0000000000000000 $rbx : 0x00007fffffffd360 → 0x0000000000000000 $rcx : 0x0000000000ec0fed → 0x6e69676522000001 $rdx : 0x00007fffffffd360 → 0x0000000000000000 $rsp : 0x00007fffffffd200 → 0x0000000000000000 $rbp : 0x00000000ffffffea $rsi : 0x00000000ffffffea $rdi : 0x0000000000000000 $rip : 0x00000000007685c7 → <Exiv2::DataBuf::alloc(long)+279> mov rdi, rbp $r8 : 0xffffffffffffe310 $r9 : 0xffffffffffffe300 $r10 : 0xffffffffffffe2f0 $r11 : 0x000000000000047a $r12 : 0x0000000000ec146b → 0xbcaea80000000000 $r13 : 0x000000000000001c $r14 : 0x0000000000000000 $r15 : 0x0000000000000000 $eflags: [carry PARITY adjust ZERO sign trap INTERRUPT direction overflow resume virtualx86 identification] $es: 0x0000 $gs: 0x0000 $ds: 0x0000 $ss: 0x002b $fs: 0x0000 $cs: 0x0033 ───────────────────────────────────────────────────────────────────[ stack ]──── 0x00007fffffffd200│+0x00: 0x0000000000000000 ← $rsp 0x00007fffffffd208│+0x08: 0x00007fffffffd360 → 0x0000000000000000 0x00007fffffffd210│+0x10: 0x00000000fffffff5 0x00007fffffffd218│+0x18: 0x0000000000813738 → <Exiv2::Internal::PngChunk::zlibUncompress(unsigned+0> mov rdi, QWORD PTR [rbx] 0x00007fffffffd220│+0x20: 0x00000000ffffffea 0x00007fffffffd228│+0x28: 0xa65c0e3e1fcb3000 0x00007fffffffd230│+0x30: 0x0000000000ec0fd0 → 0x2e6d6f633a4c4d58 0x00007fffffffd238│+0x38: 0x00007fffffffd360 → 0x0000000000000000 ────────────────────────────────────────────────────────[ code:i386:x86-64 ]──── 0x7685b0 <Exiv2::DataBuf::alloc(long)+256> lea rsp, [rsp+0x98] 0x7685b8 <Exiv2::DataBuf::alloc(long)+264> mov QWORD PTR [rbx], 0x0 0x7685bf <Exiv2::DataBuf::alloc(long)+271> mov QWORD PTR [rbx+0x8], 0x0 → 0x7685c7 <Exiv2::DataBuf::alloc(long)+279> mov rdi, rbp 0x7685ca <Exiv2::DataBuf::alloc(long)+282> call 0x405ac0 <_Znam@plt> 0x7685cf <Exiv2::DataBuf::alloc(long)+287> mov QWORD PTR [rbx+0x8], rbp 0x7685d3 <Exiv2::DataBuf::alloc(long)+291> mov QWORD PTR [rbx], rax 0x7685d6 <Exiv2::DataBuf::alloc(long)+294> add rsp, 0x8 0x7685da <Exiv2::DataBuf::alloc(long)+298> pop rbx ────────────────────────────────────────────────────[ source:types.cpp+153 ]──── 148 { 149 if (size > size_) { 150 delete[] pData_; 151 pData_ = 0; 152 size_ = 0; // size=0xffffffea → 153 pData_ = new byte[size]; 154 size_ = size; 155 } 156 } 157 158 std::pair<byte*, long> DataBuf::release() ─────────────────────────────────────────────────────────────────[ threads ]──── [#0] Id 1, Name: "exiv2", stopped, reason: SINGLE STEP ───────────────────────────────────────────────────────────────────[ trace ]──── [#0] 0x7685c7 → Name: Exiv2::DataBuf::alloc(this=0x7fffffffd360, size=0xffffffea) [#1] 0x813738 → Name: Exiv2::Internal::PngChunk::zlibUncompress(compressedText=0xec146b "", compressedTextSize=0xfffffff5, arr=@0x7fffffffd360) [#2] 0x814330 → Name: Exiv2::Internal::PngChunk::parseTXTChunk(data=@0x7fffffffd3f0, keysize=0x1c, type=Exiv2::Internal::PngChunk::iTXt_Chunk) [#3] 0x8153fe → Name: Exiv2::Internal::PngChunk::decodeTXTChunk(pImage=0xec0a90, data=@0x7fffffffd3f0, type=Exiv2::Internal::PngChunk::iTXt_Chunk) [#4] 0x804342 → Name: Exiv2::PngImage::readMetadata(this=0xec0a90) [#5] 0x480362 → Name: Action::Print::printSummary(this=0xec1c10) [#6] 0x486d68 → Name: Action::Print::run(this=0xec1c10, path="id:000004,sig:06,src:000036,op:havoc,rep:128") [#7] 0x40772d → Name: main(argc=0x2, argv=0x7fffffffdf38) [#8] 0x7fffbe826830 → Name: __libc_start_main(main=0x4073d0 <main(int, char* const*)>, argc=0x2, argv=0x7fffffffdf38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf28) [#9] 0x4277c9 → Name: _start() ──────────────────────────────────────────────────────────────────────────────── gef➤ terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Program received signal SIGABRT, Aborted. ``` I find this when I set ‘ulimit -v 1048576(1G)’. The command is "exiv2 -et [poc]" https://github.com/legend-issue/pocs/blob/master/exiv2/id:000004%2Csig:06%2Csrc:000036%2Cop:havoc%2Crep:128 --- end body --- comments : --- start comments --- --- end comments ---
4,579
208,080
[ "Exiv2", "exiv2" ]
People is still backporting fixes from master to 0.26 and we did not check the CI jobs on 0.26 for a while. After seeing some error messages in jobs triggered by #288, I think the CI is broken there.
Check CI jobs for 0.26
https://api.github.com/repos/Exiv2/exiv2/issues/299/comments
0
"2018-05-08T05:31:48"
"2018-05-08T20:16:38Z"
https://github.com/Exiv2/exiv2/issues/299
321,047,644
299
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Check CI jobs for 0.26 Issue date: --- start body --- People is still backporting fixes from master to 0.26 and we did not check the CI jobs on 0.26 for a while. After seeing some error messages in jobs triggered by #288, I think the CI is broken there. --- end body --- comments : --- start comments --- --- end comments ---
382
208,081
[ "Exiv2", "exiv2" ]
exiv2 v0.25 allowed grepping for keys, which does not seem to work anymore for exiv2 v0.26: ``` $ ~/.root/bin/exiv2 --version exiv2 0.25 001900 (64 bit build) Copyright (C) 2004-2015 Andreas Huggel. [...license snipped...] $ ~/.root/bin/exiv2 --grep DateTime Masters/2018//05/01/20180501-182913/IMG_6977.JPG Exif.Image.DateTime Ascii 20 2018:05:01 16:45:09 Exif.Photo.DateTimeOriginal Ascii 20 2018:05:01 16:45:09 Exif.Photo.DateTimeDigitized Ascii 20 2018:05:01 16:45:09 $ /opt/local/bin/exiv2 --version exiv2 0.26 001a00 (64 bit build) Copyright (C) 2004-2017 Andreas Huggel. [...license snipped...] $ /opt/local/bin/exiv2 --grep DateTime Masters/2018//05/01/20180501-182913/IMG_6977.JPG File name : Masters/2018//05/01/20180501-182913/IMG_6977.JPG File size : 2900818 Bytes MIME type : image/jpeg Image size : 3264 x 2448 [...other keys snipped...] White balance : Auto Thumbnail : image/jpeg, 13941 Bytes Copyright : Exif comment : ``` I expected v0.26 to work as v0.25 with regard to `--grep`. I checked if the issues has been reported previously, to no avail. I observe the behavior with any other image file, so I haven't attached a particular one.
exiv2 --grep does not work in 0.26
https://api.github.com/repos/Exiv2/exiv2/issues/298/comments
2
"2018-05-07T19:36:21"
"2018-08-31T10:14:06Z"
https://github.com/Exiv2/exiv2/issues/298
320,928,602
298
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : exiv2 --grep does not work in 0.26 Issue date: --- start body --- exiv2 v0.25 allowed grepping for keys, which does not seem to work anymore for exiv2 v0.26: ``` $ ~/.root/bin/exiv2 --version exiv2 0.25 001900 (64 bit build) Copyright (C) 2004-2015 Andreas Huggel. [...license snipped...] $ ~/.root/bin/exiv2 --grep DateTime Masters/2018//05/01/20180501-182913/IMG_6977.JPG Exif.Image.DateTime Ascii 20 2018:05:01 16:45:09 Exif.Photo.DateTimeOriginal Ascii 20 2018:05:01 16:45:09 Exif.Photo.DateTimeDigitized Ascii 20 2018:05:01 16:45:09 $ /opt/local/bin/exiv2 --version exiv2 0.26 001a00 (64 bit build) Copyright (C) 2004-2017 Andreas Huggel. [...license snipped...] $ /opt/local/bin/exiv2 --grep DateTime Masters/2018//05/01/20180501-182913/IMG_6977.JPG File name : Masters/2018//05/01/20180501-182913/IMG_6977.JPG File size : 2900818 Bytes MIME type : image/jpeg Image size : 3264 x 2448 [...other keys snipped...] White balance : Auto Thumbnail : image/jpeg, 13941 Bytes Copyright : Exif comment : ``` I expected v0.26 to work as v0.25 with regard to `--grep`. I checked if the issues has been reported previously, to no avail. I observe the behavior with any other image file, so I haven't attached a particular one. --- end body --- comments : --- start comments --- --- end comments ---
1,497
208,082
[ "Exiv2", "exiv2" ]
As discussed in the team meeting, we would like to handle the XMP dependency with conan so that we can easily compile XMP SDK different versions (2013, 2014, 2016) for the main platforms (OS X, Linux and Windows) and compilers. Later on, CMake would use the information provided by the Conan recipe to find properly the headers and libraries.
Handle XMP dependency with Conan
https://api.github.com/repos/Exiv2/exiv2/issues/297/comments
7
"2018-05-07T17:09:34"
"2018-05-29T08:04:07Z"
https://github.com/Exiv2/exiv2/issues/297
320,881,829
297
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Handle XMP dependency with Conan Issue date: --- start body --- As discussed in the team meeting, we would like to handle the XMP dependency with conan so that we can easily compile XMP SDK different versions (2013, 2014, 2016) for the main platforms (OS X, Linux and Windows) and compilers. Later on, CMake would use the information provided by the Conan recipe to find properly the headers and libraries. --- end body --- comments : --- start comments --- --- end comments ---
538
208,083
[ "Exiv2", "exiv2" ]
Good day, I am one of Fedora package maintainers and in particular I deal with exiv2 due my co-maintaining activity of [darktable](https://github.com/darktable-org/darktable/) software. Fedora still has not included patches for 2017 and 2018 exiv2 CVEs, like RHEL and CentOS instead [have done](https://git.centos.org/tree/rpms!exiv2.git/c7/SOURCES) Since I am planning to do such activity in Fedora, I would like to ask you instead if you are planning to release a bugfix update that would include them, so that Linux distributions exiv2 maintainers would be helped in their packaging activity. Best regards
Make bugfix release that includes CVE patches
https://api.github.com/repos/Exiv2/exiv2/issues/293/comments
2
"2018-05-03T10:34:56"
"2018-05-03T11:29:35Z"
https://github.com/Exiv2/exiv2/issues/293
319,867,219
293
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Make bugfix release that includes CVE patches Issue date: --- start body --- Good day, I am one of Fedora package maintainers and in particular I deal with exiv2 due my co-maintaining activity of [darktable](https://github.com/darktable-org/darktable/) software. Fedora still has not included patches for 2017 and 2018 exiv2 CVEs, like RHEL and CentOS instead [have done](https://git.centos.org/tree/rpms!exiv2.git/c7/SOURCES) Since I am planning to do such activity in Fedora, I would like to ask you instead if you are planning to release a bugfix update that would include them, so that Linux distributions exiv2 maintainers would be helped in their packaging activity. Best regards --- end body --- comments : --- start comments --- --- end comments ---
819
208,084
[ "Exiv2", "exiv2" ]
What am I missing? Wildcard filenames are no longer supported in latest (0.26 version) of the win32 build compared to older (0.25) version? Missing a link to setargv.obj or this isn't supported with the cross-compiler? F:\TMP\cam\d\180429>c:\bin\exiv2-new.exe -m c:\bin\myexif.txt _mg_361*.* _mg_361*.*: Failed to open the file F:\TMP\cam\d\180429>c:\bin\exiv2-new.exe -V exiv2 0.26 001a00 (64 bit build) ... Older version works: F:\TMP\cam\d\180429>c:\bin\exiv2.exe -m c:\bin\myexif.txt _mg_361*.* F:\TMP\cam\d\180429>c:\bin\exiv2 -V exiv2 0.25 001900 (32 bit build) ...
win32 build of exiv2.exe no longer includes wildcard filenames support?
https://api.github.com/repos/Exiv2/exiv2/issues/290/comments
1
"2018-04-29T22:27:54"
"2018-04-30T05:14:00Z"
https://github.com/Exiv2/exiv2/issues/290
318,755,697
290
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : win32 build of exiv2.exe no longer includes wildcard filenames support? Issue date: --- start body --- What am I missing? Wildcard filenames are no longer supported in latest (0.26 version) of the win32 build compared to older (0.25) version? Missing a link to setargv.obj or this isn't supported with the cross-compiler? F:\TMP\cam\d\180429>c:\bin\exiv2-new.exe -m c:\bin\myexif.txt _mg_361*.* _mg_361*.*: Failed to open the file F:\TMP\cam\d\180429>c:\bin\exiv2-new.exe -V exiv2 0.26 001a00 (64 bit build) ... Older version works: F:\TMP\cam\d\180429>c:\bin\exiv2.exe -m c:\bin\myexif.txt _mg_361*.* F:\TMP\cam\d\180429>c:\bin\exiv2 -V exiv2 0.25 001900 (32 bit build) ... --- end body --- comments : --- start comments --- --- end comments ---
828
208,085
[ "Exiv2", "exiv2" ]
``` <snip> Error: Offset of directory PanasonicRaw, entry 0x0148 is out of bounds: Offset = 0x00000000; truncating the entry ================================================================= ==12668==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61300000dfeb at pc 0x7f8e53eb8d7b bp 0x7ffc8f1625b0 sp 0x7ffc8f161d60 WRITE of size 151 at 0x61300000dfeb thread T0 #0 0x7f8e53eb8d7a (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cd7a) #1 0x7f8e53089ce3 in getData /home/afl/src/exiv2/src/preview.cpp:811 #2 0x7f8e5307a65b in Exiv2::PreviewManager::getPreviewProperties() const /home/afl/src/exiv2/src/preview.cpp:1143 #3 0x7f8e53104dac in Exiv2::Rw2Image::readMetadata() /home/afl/src/exiv2/src/rw2image.cpp:141 #4 0x55da4bd2e156 in Action::Print::printSummary() /home/afl/src/exiv2/src/actions.cpp:296 #5 0x55da4bd32267 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/afl/src/exiv2/src/actions.cpp:242 #6 0x55da4bcc927b in main /home/afl/src/exiv2/src/exiv2.cpp:166 #7 0x7f8e51f502e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #8 0x55da4bcca019 in _start (/home/afl/builds/exiv2/c80b1b9d51689692bc865f1a1d16bf7fd2a532c4/bin/exiv2+0x13019) 0x61300000dfeb is located 0 bytes to the right of 363-byte region [0x61300000de80,0x61300000dfeb) allocated by thread T0 here: #0 0x7f8e53f1ed70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7f8e53089a36 in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:206 #2 0x7f8e53089a36 in getData /home/afl/src/exiv2/src/preview.cpp:805 #3 0x7f8e5307a65b in Exiv2::PreviewManager::getPreviewProperties() const /home/afl/src/exiv2/src/preview.cpp:1143 #4 0x7f8e53104dac in Exiv2::Rw2Image::readMetadata() /home/afl/src/exiv2/src/rw2image.cpp:141 #5 0x55da4bd2e156 in Action::Print::printSummary() /home/afl/src/exiv2/src/actions.cpp:296 #6 0x55da4bd32267 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/afl/src/exiv2/src/actions.cpp:242 #7 0x55da4bcc927b in main /home/afl/src/exiv2/src/exiv2.cpp:166 #8 0x7f8e51f502e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cd7a) Shadow bytes around the buggy address: 0x0c267fff9ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c267fff9be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c267fff9bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00[03]fa fa 0x0c267fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==12668==ABORTING ``` Reproducer: ![exiv2-heap-buffer-overflow-getdata](https://user-images.githubusercontent.com/286959/39095401-aaf315c4-4648-11e8-8555-029d04f1da06.jpeg) SHA1: 6c5cfef92f3213cff13e8ddfc737139f686b3370 Tools: afl 2.52b, afl-utils
CVE-2018-11531: heap buffer overflow in preview.cpp
https://api.github.com/repos/Exiv2/exiv2/issues/283/comments
4
"2018-04-22T13:18:05"
"2018-11-08T01:41:30Z"
https://github.com/Exiv2/exiv2/issues/283
316,578,432
283
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-11531: heap buffer overflow in preview.cpp Issue date: --- start body --- ``` <snip> Error: Offset of directory PanasonicRaw, entry 0x0148 is out of bounds: Offset = 0x00000000; truncating the entry ================================================================= ==12668==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61300000dfeb at pc 0x7f8e53eb8d7b bp 0x7ffc8f1625b0 sp 0x7ffc8f161d60 WRITE of size 151 at 0x61300000dfeb thread T0 #0 0x7f8e53eb8d7a (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cd7a) #1 0x7f8e53089ce3 in getData /home/afl/src/exiv2/src/preview.cpp:811 #2 0x7f8e5307a65b in Exiv2::PreviewManager::getPreviewProperties() const /home/afl/src/exiv2/src/preview.cpp:1143 #3 0x7f8e53104dac in Exiv2::Rw2Image::readMetadata() /home/afl/src/exiv2/src/rw2image.cpp:141 #4 0x55da4bd2e156 in Action::Print::printSummary() /home/afl/src/exiv2/src/actions.cpp:296 #5 0x55da4bd32267 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/afl/src/exiv2/src/actions.cpp:242 #6 0x55da4bcc927b in main /home/afl/src/exiv2/src/exiv2.cpp:166 #7 0x7f8e51f502e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #8 0x55da4bcca019 in _start (/home/afl/builds/exiv2/c80b1b9d51689692bc865f1a1d16bf7fd2a532c4/bin/exiv2+0x13019) 0x61300000dfeb is located 0 bytes to the right of 363-byte region [0x61300000de80,0x61300000dfeb) allocated by thread T0 here: #0 0x7f8e53f1ed70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7f8e53089a36 in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:206 #2 0x7f8e53089a36 in getData /home/afl/src/exiv2/src/preview.cpp:805 #3 0x7f8e5307a65b in Exiv2::PreviewManager::getPreviewProperties() const /home/afl/src/exiv2/src/preview.cpp:1143 #4 0x7f8e53104dac in Exiv2::Rw2Image::readMetadata() /home/afl/src/exiv2/src/rw2image.cpp:141 #5 0x55da4bd2e156 in Action::Print::printSummary() /home/afl/src/exiv2/src/actions.cpp:296 #6 0x55da4bd32267 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/afl/src/exiv2/src/actions.cpp:242 #7 0x55da4bcc927b in main /home/afl/src/exiv2/src/exiv2.cpp:166 #8 0x7f8e51f502e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.3+0x5cd7a) Shadow bytes around the buggy address: 0x0c267fff9ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c267fff9be0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c267fff9bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00[03]fa fa 0x0c267fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c267fff9c40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==12668==ABORTING ``` Reproducer: ![exiv2-heap-buffer-overflow-getdata](https://user-images.githubusercontent.com/286959/39095401-aaf315c4-4648-11e8-8555-029d04f1da06.jpeg) SHA1: 6c5cfef92f3213cff13e8ddfc737139f686b3370 Tools: afl 2.52b, afl-utils --- end body --- comments : --- start comments --- --- end comments ---
4,372
208,086
[ "Exiv2", "exiv2" ]
I'm currently doing some minor tweaking of the CMake script to allow Exiv2 to be build as a subproject. (I'll send a pull request when I'm done if you are interested). I do have a question though. Is there a reason why the CMake build script only links the unit tests to GTest when it's is a shared library? Please correct me if I'm wrong but I was under the impression that best practice for GTest was to link it as a static library.
Why does the unit tests only link to a GTest shared library?
https://api.github.com/repos/Exiv2/exiv2/issues/281/comments
10
"2018-04-13T16:37:07"
"2018-05-23T05:57:47Z"
https://github.com/Exiv2/exiv2/issues/281
314,175,017
281
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Why does the unit tests only link to a GTest shared library? Issue date: --- start body --- I'm currently doing some minor tweaking of the CMake script to allow Exiv2 to be build as a subproject. (I'll send a pull request when I'm done if you are interested). I do have a question though. Is there a reason why the CMake build script only links the unit tests to GTest when it's is a shared library? Please correct me if I'm wrong but I was under the impression that best practice for GTest was to link it as a static library. --- end body --- comments : --- start comments --- --- end comments ---
661
208,087
[ "Exiv2", "exiv2" ]
Hello, my camera (Sony ILCE-7M3) has temperature information stored in the exif data. Especially the CameraTemperature value is interesting for [dark frame subtraction](https://en.wikipedia.org/wiki/Dark-frame_subtraction). You can create a dark frame library for subtraction if you know the temperature value and reuse them (+/- 1°C). ``` exiftool -s _7M30305.ARW | grep Temp ColorTemperature : Auto CameraTemperature : 8 C BatteryTemperature : 10.0 C ``` ``` exiv2 -pa _7M30305.ARW | grep Temp Exif.Sony2.ColorTemperature Long 1 0 ``` RAW example can be found on https://raw.pixls.us/ I guess that other camera manufactures have also temperature sensors in the camera.
Please add support for reading temperature values form RAW files
https://api.github.com/repos/Exiv2/exiv2/issues/280/comments
6
"2018-04-13T06:45:28"
"2021-07-13T09:15:53Z"
https://github.com/Exiv2/exiv2/issues/280
313,986,888
280
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Please add support for reading temperature values form RAW files Issue date: --- start body --- Hello, my camera (Sony ILCE-7M3) has temperature information stored in the exif data. Especially the CameraTemperature value is interesting for [dark frame subtraction](https://en.wikipedia.org/wiki/Dark-frame_subtraction). You can create a dark frame library for subtraction if you know the temperature value and reuse them (+/- 1°C). ``` exiftool -s _7M30305.ARW | grep Temp ColorTemperature : Auto CameraTemperature : 8 C BatteryTemperature : 10.0 C ``` ``` exiv2 -pa _7M30305.ARW | grep Temp Exif.Sony2.ColorTemperature Long 1 0 ``` RAW example can be found on https://raw.pixls.us/ I guess that other camera manufactures have also temperature sensors in the camera. --- end body --- comments : --- start comments --- --- end comments ---
985
208,088
[ "Exiv2", "exiv2" ]
Please add support for reading the values for WhiteBalance (RedBalance, BlueBalance, WB_RGGBLevels). You can't read them with exiv2 from Nikon or Sony RAW files. It works using exiftool. Examples can be found at https://raw.pixls.us See also the discussion at: http://dev.exiv2.org/boards/3/topics/3108 Priority: Low
Please add support for reading Whitebalance values
https://api.github.com/repos/Exiv2/exiv2/issues/279/comments
1
"2018-04-13T06:34:19"
"2023-11-04T16:32:34Z"
https://github.com/Exiv2/exiv2/issues/279
313,984,647
279
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Please add support for reading Whitebalance values Issue date: --- start body --- Please add support for reading the values for WhiteBalance (RedBalance, BlueBalance, WB_RGGBLevels). You can't read them with exiv2 from Nikon or Sony RAW files. It works using exiftool. Examples can be found at https://raw.pixls.us See also the discussion at: http://dev.exiv2.org/boards/3/topics/3108 Priority: Low --- end body --- comments : --- start comments --- --- end comments ---
536
208,089
[ "Exiv2", "exiv2" ]
When compiled with MSVC, src/image.cpp Internal::stringFormat() uses the Win32 API _vsnprintf(). This is a little different from *ix vsnprintf(). The correct code is something like: ``` std::string stringFormat(const char* format, ...) { std::string result; std::vector<char> buffer; size_t need = std::strlen(format); // initial guess int rc = -1; #ifndef _MSC_VER // vsnprintf writes at most size (2nd parameter) bytes (including \0) // returns the number of bytes required for the formatted string excluding \0 // the following loop goes through: // one iteration (if 'need' was large enough for the for formatted string) // or two iterations (after the first call to vsnprintf we know the required length) do { buffer.resize(need + 1); va_list args; // variable arg list va_start(args, format); // args start after format rc = vsnprintf(&buffer[0], buffer.size(), format, args); va_end(args); // free the args assert(rc >= 0); // rc < 0 => we have made an error in the format string if ( rc > 0 ) need = static_cast<size_t>(rc); } while ( buffer.size() <= need ); #else // MSC_VER _vsnprintf returns -1 if unable to encode int counter = 0; do { buffer.resize(need + 1); va_list args; // variable arg list va_start(args, format); // args start after format rc = _vsnprintf(&buffer[0], buffer.size(), format, args); va_end(args); // free the args if ( rc > 0 ) { need = static_cast<size_t>(rc); } else if ( rc < 0 ) { need += need; } } while ( buffer.size() <= need && counter++ < 10 ); #endif if ( rc > 0 ) result = std::string(&buffer[0], need); return result; } ``` Here's the diff which includes removing a reference to MSDEV_2003 for which we removed support in v0.26 (and didn't remove this historical reference). ``` C:\Users\rmills\gnu\github\exiv2\exiv2.vcchanges>git diff src\image.cpp diff --git a/src/image.cpp b/src/image.cpp index f3db54aa..676762c1 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -989,11 +989,6 @@ namespace Exiv2 { namespace Exiv2 { namespace Internal { -#ifdef MSDEV_2003 -#undef vsnprintf -#define vsnprintf _vsnprintf -#endif - std::string stringFormat(const char* format, ...) { std::string result; @@ -1001,6 +996,7 @@ namespace Exiv2 { size_t need = std::strlen(format); // initial guess int rc = -1; +#ifndef _MSC_VER // vsnprintf writes at most size (2nd parameter) bytes (including \0) // returns the number of bytes required for the formatted string excluding \0 // the following loop goes through: @@ -1016,7 +1012,23 @@ namespace Exiv2 { if ( rc > 0 ) need = static_cast<size_t>(rc); } while ( buffer.size() <= need ); +#else + // MSC_VER _vsnprintf returns -1 if unable to encode + int counter = 0; + do { + buffer.resize(need + 1); + va_list args; // variable arg list + va_start(args, format); // args start after format + rc = _vsnprintf(&buffer[0], buffer.size(), format, args); + va_end(args); // free the args + if ( rc > 0 ) { + need = static_cast<size_t>(rc); + } else if ( rc < 0 ) { + need += need; + } + } while ( buffer.size() <= need && counter++ < 10 ); +#endif if ( rc > 0 ) result = std::string(&buffer[0], need); return result; C:\Users\rmills\gnu\github\exiv2\exiv2.vcchanges> ``` Changes to the msvc/ project files are require by the transition of _**canonmn.cpp**_ to _**canonmn_int.cpp**_ and so on. I'll deal with that as a separate issue when we have discussed and decided on the future of the msvc/ build environments.
Internal::stringFormat() uses _vsnprintf on MSVC
https://api.github.com/repos/Exiv2/exiv2/issues/277/comments
1
"2018-04-11T17:56:28"
"2018-11-07T21:26:07Z"
https://github.com/Exiv2/exiv2/issues/277
313,427,160
277
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Internal::stringFormat() uses _vsnprintf on MSVC Issue date: --- start body --- When compiled with MSVC, src/image.cpp Internal::stringFormat() uses the Win32 API _vsnprintf(). This is a little different from *ix vsnprintf(). The correct code is something like: ``` std::string stringFormat(const char* format, ...) { std::string result; std::vector<char> buffer; size_t need = std::strlen(format); // initial guess int rc = -1; #ifndef _MSC_VER // vsnprintf writes at most size (2nd parameter) bytes (including \0) // returns the number of bytes required for the formatted string excluding \0 // the following loop goes through: // one iteration (if 'need' was large enough for the for formatted string) // or two iterations (after the first call to vsnprintf we know the required length) do { buffer.resize(need + 1); va_list args; // variable arg list va_start(args, format); // args start after format rc = vsnprintf(&buffer[0], buffer.size(), format, args); va_end(args); // free the args assert(rc >= 0); // rc < 0 => we have made an error in the format string if ( rc > 0 ) need = static_cast<size_t>(rc); } while ( buffer.size() <= need ); #else // MSC_VER _vsnprintf returns -1 if unable to encode int counter = 0; do { buffer.resize(need + 1); va_list args; // variable arg list va_start(args, format); // args start after format rc = _vsnprintf(&buffer[0], buffer.size(), format, args); va_end(args); // free the args if ( rc > 0 ) { need = static_cast<size_t>(rc); } else if ( rc < 0 ) { need += need; } } while ( buffer.size() <= need && counter++ < 10 ); #endif if ( rc > 0 ) result = std::string(&buffer[0], need); return result; } ``` Here's the diff which includes removing a reference to MSDEV_2003 for which we removed support in v0.26 (and didn't remove this historical reference). ``` C:\Users\rmills\gnu\github\exiv2\exiv2.vcchanges>git diff src\image.cpp diff --git a/src/image.cpp b/src/image.cpp index f3db54aa..676762c1 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -989,11 +989,6 @@ namespace Exiv2 { namespace Exiv2 { namespace Internal { -#ifdef MSDEV_2003 -#undef vsnprintf -#define vsnprintf _vsnprintf -#endif - std::string stringFormat(const char* format, ...) { std::string result; @@ -1001,6 +996,7 @@ namespace Exiv2 { size_t need = std::strlen(format); // initial guess int rc = -1; +#ifndef _MSC_VER // vsnprintf writes at most size (2nd parameter) bytes (including \0) // returns the number of bytes required for the formatted string excluding \0 // the following loop goes through: @@ -1016,7 +1012,23 @@ namespace Exiv2 { if ( rc > 0 ) need = static_cast<size_t>(rc); } while ( buffer.size() <= need ); +#else + // MSC_VER _vsnprintf returns -1 if unable to encode + int counter = 0; + do { + buffer.resize(need + 1); + va_list args; // variable arg list + va_start(args, format); // args start after format + rc = _vsnprintf(&buffer[0], buffer.size(), format, args); + va_end(args); // free the args + if ( rc > 0 ) { + need = static_cast<size_t>(rc); + } else if ( rc < 0 ) { + need += need; + } + } while ( buffer.size() <= need && counter++ < 10 ); +#endif if ( rc > 0 ) result = std::string(&buffer[0], need); return result; C:\Users\rmills\gnu\github\exiv2\exiv2.vcchanges> ``` Changes to the msvc/ project files are require by the transition of _**canonmn.cpp**_ to _**canonmn_int.cpp**_ and so on. I'll deal with that as a separate issue when we have discussed and decided on the future of the msvc/ build environments. --- end body --- comments : --- start comments --- --- end comments ---
4,800
208,090
[ "Exiv2", "exiv2" ]
In #270 it was reported an compilation error when using the `DEBUG` compiler definition. On Linux and Mac builds we are using a custom compiler definition (`DEBUG`) to activate certain pieces of code only in Debug builds. We add this compiler definition conditionally in CMake, by checking if the `CMAKE_BUILD_TYPE` if `Debug`. However on Windows we were not adding this compiler flag. Actually, we do not need to add such compiler flag by ourselves, since [Visual Studio adds automatically `_DEBUG`](https://github.com/Exiv2/exiv2/pull/261/commits/2f644db8d64cd4e63583707fb81037cfd4838c3e) when using the compiler switch `/MDd` or `/MTd`. I propose the following approach to properly allow Debug builds in all the platforms, having the same behaviour in all of them: - Replace all occurrences of `DEBUG` in the C++ code by `NDEBUG` (and negate the preprocessor conditions). Note that the [assert](http://en.cppreference.com/w/c/error/assert) behaviour is based on `NDEBUG`. - Remove the `DEBUG` compiler definition added for Debug builds. CMake is already adding the `NDEBUG` one for the Release builds.
Inconsistency in the usage of the DEBUG compiler definitions
https://api.github.com/repos/Exiv2/exiv2/issues/272/comments
4
"2018-04-08T05:56:09"
"2018-04-09T16:53:16Z"
https://github.com/Exiv2/exiv2/issues/272
312,275,560
272
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Inconsistency in the usage of the DEBUG compiler definitions Issue date: --- start body --- In #270 it was reported an compilation error when using the `DEBUG` compiler definition. On Linux and Mac builds we are using a custom compiler definition (`DEBUG`) to activate certain pieces of code only in Debug builds. We add this compiler definition conditionally in CMake, by checking if the `CMAKE_BUILD_TYPE` if `Debug`. However on Windows we were not adding this compiler flag. Actually, we do not need to add such compiler flag by ourselves, since [Visual Studio adds automatically `_DEBUG`](https://github.com/Exiv2/exiv2/pull/261/commits/2f644db8d64cd4e63583707fb81037cfd4838c3e) when using the compiler switch `/MDd` or `/MTd`. I propose the following approach to properly allow Debug builds in all the platforms, having the same behaviour in all of them: - Replace all occurrences of `DEBUG` in the C++ code by `NDEBUG` (and negate the preprocessor conditions). Note that the [assert](http://en.cppreference.com/w/c/error/assert) behaviour is based on `NDEBUG`. - Remove the `DEBUG` compiler definition added for Debug builds. CMake is already adding the `NDEBUG` one for the Release builds. --- end body --- comments : --- start comments --- --- end comments ---
1,337
208,091
[ "Exiv2", "exiv2" ]
http://dev.exiv2.org/issues/1341
exiv2 --adjust -1:00:00 does not update Exif.Image.DateTimeOriginal in .NEF files
https://api.github.com/repos/Exiv2/exiv2/issues/271/comments
1
"2018-04-07T20:47:54"
"2018-11-06T18:28:12Z"
https://github.com/Exiv2/exiv2/issues/271
312,241,718
271
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : exiv2 --adjust -1:00:00 does not update Exif.Image.DateTimeOriginal in .NEF files Issue date: --- start body --- http://dev.exiv2.org/issues/1341 --- end body --- comments : --- start comments --- --- end comments ---
274
208,092
[ "Exiv2", "exiv2" ]
`config/FindIconv.cmake` seems to be broken on Windows with a recent enough cmake (>= 3.11). Therefore that include is disabled by #266. - [x] Find out if this is a Windows specific issue - [x] Find a more permanent solution
Fix config/FindIconv.cmake for cmake >= 3.11
https://api.github.com/repos/Exiv2/exiv2/issues/267/comments
10
"2018-04-05T20:52:53"
"2018-06-01T04:55:39Z"
https://github.com/Exiv2/exiv2/issues/267
311,765,000
267
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Fix config/FindIconv.cmake for cmake >= 3.11 Issue date: --- start body --- `config/FindIconv.cmake` seems to be broken on Windows with a recent enough cmake (>= 3.11). Therefore that include is disabled by #266. - [x] Find out if this is a Windows specific issue - [x] Find a more permanent solution --- end body --- comments : --- start comments --- --- end comments ---
433
208,093
[ "Exiv2", "exiv2" ]
there are other testcases to trigger out of bound read with the commands (exiv2 -pv $POC), some debug information as follows: ``` exiv2 -pv $POC Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x66208e RBX: 0x7ffff78a2ed9 --> 0x63747049002e2e2e ('...') RCX: 0x0 RDX: 0xf1fe RSI: 0xffffffff RDI: 0x0 RBP: 0x7fffffff2ce0 --> 0x7fffffff2ec0 --> 0x7fffffff30a0 --> 0x7fffffff3280 --> 0x7fffffff3460 --> 0x7fffffff3640 (--> ...) RSP: 0x7fffffff2c20 --> 0x5ff7fe2780 RIP: 0x7ffff778c165 (<Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+659>: movzx eax,BYTE PTR [rax]) R8 : 0x0 R9 : 0x651fe0 --> 0x0 R10: 0x7ffff7089760 --> 0x0 R11: 0x0 R12: 0x7ffff78a2ac5 --> 0x4853004949435341 ('ASCII') R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff778c155 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+643>: mov edx,DWORD PTR [rbp-0x94] 0x7ffff778c15b <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+649>: mov rax,QWORD PTR [rbp-0xb0] 0x7ffff778c162 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+656>: add rax,rdx => 0x7ffff778c165 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+659>: movzx eax,BYTE PTR [rax] 0x7ffff778c168 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+662>: cmp al,0x1c 0x7ffff778c16a <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+664>: jne 0x7ffff778c186 <Exiv2::IptcData::printStructure(std::ostream&, unsigned ch ar const*, unsigned long, unsigned int)+692> 0x7ffff778c16c <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+666>: mov eax,DWORD PTR [rbp-0x94] 0x7ffff778c172 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+672>: mov rdx,QWORD PTR [rbp-0xb8] [------------------------------------stack-------------------------------------] 0000| 0x7fffffff2c20 --> 0x5ff7fe2780 0008| 0x7fffffff2c28 --> 0xf4 0016| 0x7fffffff2c30 --> 0x652e90 --> 0x1300000008002a49 0024| 0x7fffffff2c38 --> 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) 0032| 0x7fffffff2c40 --> 0x2000000000000 0040| 0x7fffffff2c48 --> 0xf1fef10e0003 0048| 0x7fffffff2c50 --> 0x651ff8 ('.' <repeats 39 times>) 0056| 0x7fffffff2c58 --> 0x644880 --> 0x7ffffbad2488 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff778c165 in Exiv2::IptcData::printStructure (out=..., bytes=0x652e90 "I*", size=0xf4, depth=0x5f) at iptc.cpp:357 357 while ( bytes[i] == 0x1c && i < size-3 ) { gdb-peda$ bt #0 0x00007ffff778c165 in Exiv2::IptcData::printStructure (out=..., bytes=0x652e90 "I*", size=0xf4, depth=0x5f) at iptc.cpp:357 #1 0x00007ffff7782379 in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5e) at image.cpp:470 #2 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5d) at image.cpp:455 #3 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5c) at image.cpp:455 #4 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5b) at image.cpp:455 #5 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5a) at image.cpp:455 #6 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x59) at image.cpp:455 #7 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x58) at image.cpp:455 #8 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x57) at image.cpp:455 #9 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x56) at image.cpp:455 #10 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x55) at image.cpp:455 #11 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x54) at image.cpp:455 #12 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x53) at image.cpp:455 =========== the other one : Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x662000 ('') RBX: 0x3 RCX: 0x2 RDX: 0x14ff0 RSI: 0x64d010 --> 0x7ffff7082a49 (MemError) RDI: 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) RBP: 0x7fffffffd960 --> 0x7fffffffdb40 --> 0x7fffffffdd20 --> 0x7fffffffdf00 --> 0x7fffffffdf80 --> 0x7fffffffdfe0 (--> ...) RSP: 0x7fffffffd8a0 --> 0x2f7fe2780 RIP: 0x7ffff778bf41 (<Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+111>: movzx eax,BYTE PTR [rax]) R8 : 0x644950 --> 0x0 R9 : 0x64d010 --> 0x7ffff7082a49 (MemError) R10: 0x5e ('^') R11: 0x246 R12: 0x7ffff78a2ac5 --> 0x4853004949435341 ('ASCII') R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff778bf31 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+95>: mov edx,DWORD PTR [rbp-0x94] 0x7ffff778bf37 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+101>: mov rax,QWORD PTR [rbp-0xb0] 0x7ffff778bf3e <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+108>: add rax,rdx => 0x7ffff778bf41 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+111>: movzx eax,BYTE PTR [rax] 0x7ffff778bf44 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+114>: cmp al,0x1c 0x7ffff778bf46 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+116>: jne 0x7ffff778bf14 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+66> 0x7ffff778bf48 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+118>: add DWORD PTR [rbp-0xbc],0x1 0x7ffff778bf4f <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+125>: mov edx,DWORD PTR [rbp-0xbc] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffd8a0 --> 0x2f7fe2780 0008| 0x7fffffffd8a8 --> 0x2 0016| 0x7fffffffd8b0 --> 0x64d010 --> 0x7ffff7082a49 (MemError) 0024| 0x7fffffffd8b8 --> 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) 0032| 0x7fffffffd8c0 --> 0x0 0040| 0x7fffffffd8c8 --> 0x14ff0f6d39947 0048| 0x7fffffffd8d0 --> 0xd47b0c2 0056| 0x7fffffffd8d8 --> 0x644870 --> 0x7ffffbad2488 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff778bf41 in Exiv2::IptcData::printStructure (out=..., bytes=0x64d010 "I*\b\367\377\177", size=0x2, depth=0x2) at iptc.cpp:354 354 while ( i < size-3 && bytes[i] != 0x1c ) i++; gdb-peda$ p bytes $1 = (const Exiv2::byte *) 0x64d010 "I*\b\367\377\177" gdb-peda$ x /4w $rax 0x662000: Cannot access memory at address 0x662000 gdb-peda$ bt #0 0x00007ffff778bf41 in Exiv2::IptcData::printStructure (out=..., bytes=0x64d010 "I*\b\367\377\177", size=0x2, depth=0x2) at iptc.cpp:354 #1 0x00007ffff7782379 in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x2) at image.cpp:470 #2 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x1) at image.cpp:455 #3 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x0) at image.cpp:455 #4 0x00007ffff7782abc in Exiv2::Image::printTiffStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, depth=0xffffffff, offset=0x0) at image.cpp:533 #5 0x00007ffff781bc6d in Exiv2::TiffImage::printStructure (this=0x644ab0, out=..., option=Exiv2::kpsRecursive, depth=0x0) at tiffimage.cpp:344 #6 0x00007ffff781aec3 in Exiv2::TiffImage::readMetadata (this=0x644ab0) at tiffimage.cpp:187 #7 0x000000000041fba6 in Action::Print::printList (this=0x644830) at actions.cpp:537 #8 0x000000000041c76b in Action::Print::run (this=0x644830, path="./crashes-2018-03-23-21-09/exiv2000:id:000015,sig:11,src:000399,op:flip1,pos:26") at actions.cpp:243 #9 0x000000000040e267 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #10 0x00007ffff6ce9f45 in __libc_start_main (main=0x40dfae <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #11 0x000000000040dee9 in _start () ``` ================== the pocs please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/9-printStructure-outbound-read-1 https://github.com/xiaoqx/pocs/blob/master/exiv2/10-printStructure-outbound-read-2
out bound reads which could result to segmentfault
https://api.github.com/repos/Exiv2/exiv2/issues/263/comments
1
"2018-04-04T08:16:47"
"2018-11-08T01:42:09Z"
https://github.com/Exiv2/exiv2/issues/263
311,128,549
263
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : out bound reads which could result to segmentfault Issue date: --- start body --- there are other testcases to trigger out of bound read with the commands (exiv2 -pv $POC), some debug information as follows: ``` exiv2 -pv $POC Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x66208e RBX: 0x7ffff78a2ed9 --> 0x63747049002e2e2e ('...') RCX: 0x0 RDX: 0xf1fe RSI: 0xffffffff RDI: 0x0 RBP: 0x7fffffff2ce0 --> 0x7fffffff2ec0 --> 0x7fffffff30a0 --> 0x7fffffff3280 --> 0x7fffffff3460 --> 0x7fffffff3640 (--> ...) RSP: 0x7fffffff2c20 --> 0x5ff7fe2780 RIP: 0x7ffff778c165 (<Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+659>: movzx eax,BYTE PTR [rax]) R8 : 0x0 R9 : 0x651fe0 --> 0x0 R10: 0x7ffff7089760 --> 0x0 R11: 0x0 R12: 0x7ffff78a2ac5 --> 0x4853004949435341 ('ASCII') R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff778c155 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+643>: mov edx,DWORD PTR [rbp-0x94] 0x7ffff778c15b <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+649>: mov rax,QWORD PTR [rbp-0xb0] 0x7ffff778c162 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+656>: add rax,rdx => 0x7ffff778c165 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+659>: movzx eax,BYTE PTR [rax] 0x7ffff778c168 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+662>: cmp al,0x1c 0x7ffff778c16a <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+664>: jne 0x7ffff778c186 <Exiv2::IptcData::printStructure(std::ostream&, unsigned ch ar const*, unsigned long, unsigned int)+692> 0x7ffff778c16c <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+666>: mov eax,DWORD PTR [rbp-0x94] 0x7ffff778c172 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+672>: mov rdx,QWORD PTR [rbp-0xb8] [------------------------------------stack-------------------------------------] 0000| 0x7fffffff2c20 --> 0x5ff7fe2780 0008| 0x7fffffff2c28 --> 0xf4 0016| 0x7fffffff2c30 --> 0x652e90 --> 0x1300000008002a49 0024| 0x7fffffff2c38 --> 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) 0032| 0x7fffffff2c40 --> 0x2000000000000 0040| 0x7fffffff2c48 --> 0xf1fef10e0003 0048| 0x7fffffff2c50 --> 0x651ff8 ('.' <repeats 39 times>) 0056| 0x7fffffff2c58 --> 0x644880 --> 0x7ffffbad2488 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff778c165 in Exiv2::IptcData::printStructure (out=..., bytes=0x652e90 "I*", size=0xf4, depth=0x5f) at iptc.cpp:357 357 while ( bytes[i] == 0x1c && i < size-3 ) { gdb-peda$ bt #0 0x00007ffff778c165 in Exiv2::IptcData::printStructure (out=..., bytes=0x652e90 "I*", size=0xf4, depth=0x5f) at iptc.cpp:357 #1 0x00007ffff7782379 in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5e) at image.cpp:470 #2 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5d) at image.cpp:455 #3 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5c) at image.cpp:455 #4 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5b) at image.cpp:455 #5 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x5a) at image.cpp:455 #6 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x59) at image.cpp:455 #7 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x58) at image.cpp:455 #8 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x57) at image.cpp:455 #9 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x56) at image.cpp:455 #10 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x55) at image.cpp:455 #11 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x54) at image.cpp:455 #12 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ac0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x53) at image.cpp:455 =========== the other one : Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x662000 ('') RBX: 0x3 RCX: 0x2 RDX: 0x14ff0 RSI: 0x64d010 --> 0x7ffff7082a49 (MemError) RDI: 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) RBP: 0x7fffffffd960 --> 0x7fffffffdb40 --> 0x7fffffffdd20 --> 0x7fffffffdf00 --> 0x7fffffffdf80 --> 0x7fffffffdfe0 (--> ...) RSP: 0x7fffffffd8a0 --> 0x2f7fe2780 RIP: 0x7ffff778bf41 (<Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+111>: movzx eax,BYTE PTR [rax]) R8 : 0x644950 --> 0x0 R9 : 0x64d010 --> 0x7ffff7082a49 (MemError) R10: 0x5e ('^') R11: 0x246 R12: 0x7ffff78a2ac5 --> 0x4853004949435341 ('ASCII') R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff778bf31 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+95>: mov edx,DWORD PTR [rbp-0x94] 0x7ffff778bf37 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+101>: mov rax,QWORD PTR [rbp-0xb0] 0x7ffff778bf3e <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+108>: add rax,rdx => 0x7ffff778bf41 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+111>: movzx eax,BYTE PTR [rax] 0x7ffff778bf44 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+114>: cmp al,0x1c 0x7ffff778bf46 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+116>: jne 0x7ffff778bf14 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+66> 0x7ffff778bf48 <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+118>: add DWORD PTR [rbp-0xbc],0x1 0x7ffff778bf4f <Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)+125>: mov edx,DWORD PTR [rbp-0xbc] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffd8a0 --> 0x2f7fe2780 0008| 0x7fffffffd8a8 --> 0x2 0016| 0x7fffffffd8b0 --> 0x64d010 --> 0x7ffff7082a49 (MemError) 0024| 0x7fffffffd8b8 --> 0x7fffffffe050 --> 0x7ffff7592e38 --> 0x7ffff735afb0 (<_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev>: mov rax,QWORD PTR [rip+0x238d01] # 0x7ffff7593cb8) 0032| 0x7fffffffd8c0 --> 0x0 0040| 0x7fffffffd8c8 --> 0x14ff0f6d39947 0048| 0x7fffffffd8d0 --> 0xd47b0c2 0056| 0x7fffffffd8d8 --> 0x644870 --> 0x7ffffbad2488 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff778bf41 in Exiv2::IptcData::printStructure (out=..., bytes=0x64d010 "I*\b\367\377\177", size=0x2, depth=0x2) at iptc.cpp:354 354 while ( i < size-3 && bytes[i] != 0x1c ) i++; gdb-peda$ p bytes $1 = (const Exiv2::byte *) 0x64d010 "I*\b\367\377\177" gdb-peda$ x /4w $rax 0x662000: Cannot access memory at address 0x662000 gdb-peda$ bt #0 0x00007ffff778bf41 in Exiv2::IptcData::printStructure (out=..., bytes=0x64d010 "I*\b\367\377\177", size=0x2, depth=0x2) at iptc.cpp:354 #1 0x00007ffff7782379 in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x2) at image.cpp:470 #2 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x1) at image.cpp:455 #3 0x00007ffff778218c in Exiv2::Image::printIFDStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, start=0x8, bSwap=0x0, c=0x49, depth=0x0) at image.cpp:455 #4 0x00007ffff7782abc in Exiv2::Image::printTiffStructure (this=0x644ab0, io=..., out=..., option=Exiv2::kpsRecursive, depth=0xffffffff, offset=0x0) at image.cpp:533 #5 0x00007ffff781bc6d in Exiv2::TiffImage::printStructure (this=0x644ab0, out=..., option=Exiv2::kpsRecursive, depth=0x0) at tiffimage.cpp:344 #6 0x00007ffff781aec3 in Exiv2::TiffImage::readMetadata (this=0x644ab0) at tiffimage.cpp:187 #7 0x000000000041fba6 in Action::Print::printList (this=0x644830) at actions.cpp:537 #8 0x000000000041c76b in Action::Print::run (this=0x644830, path="./crashes-2018-03-23-21-09/exiv2000:id:000015,sig:11,src:000399,op:flip1,pos:26") at actions.cpp:243 #9 0x000000000040e267 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #10 0x00007ffff6ce9f45 in __libc_start_main (main=0x40dfae <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #11 0x000000000040dee9 in _start () ``` ================== the pocs please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/9-printStructure-outbound-read-1 https://github.com/xiaoqx/pocs/blob/master/exiv2/10-printStructure-outbound-read-2 --- end body --- comments : --- start comments --- --- end comments ---
11,460
208,094
[ "Exiv2", "exiv2" ]
A divide by zero occurs in function `:BigTiffImage::printIFD`, the debug info as follows: ``` [----------------------------------registers-----------------------------------] RAX: 0xffffffffffffffff RBX: 0x1 RCX: 0x7ffff75aa3d8 --> 0x0 RDX: 0x0 RSI: 0x0 RDI: 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) RBP: 0x7fffffffe220 --> 0x7fffffffe260 --> 0x7fffffffe2c0 --> 0x7fffffffe310 --> 0x7fffffffe3b0 --> 0x0 RSP: 0x7fffffffe070 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) RIP: 0x7ffff7731fc4 (<Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1222>: div QWORD PTR [rbp-0xe8]) R8 : 0x1000 R9 : 0x644ba0 --> 0x0 R10: 0x7fffffffde30 --> 0x0 R11: 0x7ffff773347a (<std::numeric_limits<unsigned long>::max()>: push rbp) R12: 0x41c6f8 (<Action::Print::run(std::string const&)>: push rbp) R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10202 (carry parity adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff7731fb4 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1206>: mov ebx,DWORD PTR [rbp-0x170] 0x7ffff7731fba <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1212>: call 0x7ffff7714560 <_ZNSt14numeric_limitsImE3maxEv@plt> 0x7ffff7731fbf <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1217>: mov edx,0x0 => 0x7ffff7731fc4 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1222>: div QWORD PTR [rbp-0xe8] 0x7ffff7731fcb <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1229>: cmp rbx,rax 0x7ffff7731fce <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1232>: seta al 0x7ffff7731fd1 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1235>: test al,al 0x7ffff7731fd3 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1237>: je 0x7ffff7732008 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1290> [------------------------------------stack-------------------------------------] 0000| 0x7fffffffe070 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) 0008| 0x7fffffffe078 --> 0x7ffff7b972b8 --> 0x42cd52 (<std::auto_ptr<Exiv2::Image>::~auto_ptr()>: push rbp) 0016| 0x7fffffffe080 --> 0x8 0024| 0x7fffffffe088 --> 0x200000000 0032| 0x7fffffffe090 --> 0x640900 --> 0x7ffff7590f18 --> 0x7ffff733ad20 (<_ZNSoD1Ev>: mov rax,QWORD PTR [rip+0x258c71] # 0x7ffff7593998) 0040| 0x7fffffffe098 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) 0048| 0x7fffffffe0a0 --> 0x100ffffe0d0 0056| 0x7fffffffe0a8 --> 0x8 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGFPE 0x00007ffff7731fc4 in Exiv2::(anonymous namespace)::BigTiffImage::printIFD (this=0x644a90, out=..., option=Exiv2::kpsXMP, dir_offset=0x8, depth=0x0) at bigtiffimage.cpp:254 254 if (size > std::numeric_limits<uint64_t>::max() / count) gdb-peda$ p count $1 = 0x0 gdb-peda$ bt #0 0x00007ffff7731fc4 in Exiv2::(anonymous namespace)::BigTiffImage::printIFD (this=0x644a90, out=..., option=Exiv2::kpsXMP, dir_offset=0x8, depth=0x0) at bigtiffimage.cpp:254 #1 0x00007ffff7731af6 in Exiv2::(anonymous namespace)::BigTiffImage::printStructure (this=0x644a90, os=..., option=Exiv2::kpsXMP, depth=0x0) at bigtiffimage.cpp:183 #2 0x000000000041ca2e in Action::Print::printStructure (this=0x644810, out=..., option=Exiv2::kpsXMP) at actions.cpp:283 #3 0x000000000041c7f9 in Action::Print::run (this=0x644810, path="crashes-2018-03-23-22-41/exiv2000:id:000001,sig:08,src:000109,op:arith8,pos:23,val:-27") at actions.cpp:257 #4 0x000000000040e267 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #5 0x00007ffff6ce9f45 in __libc_start_main (main=0x40dfae <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #6 0x000000000040dee9 in _start () ``` ============= the poc please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/7-printIFD-divbyzero-1
a div-by-zero in printIFD
https://api.github.com/repos/Exiv2/exiv2/issues/262/comments
2
"2018-04-04T08:08:31"
"2018-11-08T01:42:28Z"
https://github.com/Exiv2/exiv2/issues/262
311,126,146
262
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : a div-by-zero in printIFD Issue date: --- start body --- A divide by zero occurs in function `:BigTiffImage::printIFD`, the debug info as follows: ``` [----------------------------------registers-----------------------------------] RAX: 0xffffffffffffffff RBX: 0x1 RCX: 0x7ffff75aa3d8 --> 0x0 RDX: 0x0 RSI: 0x0 RDI: 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) RBP: 0x7fffffffe220 --> 0x7fffffffe260 --> 0x7fffffffe2c0 --> 0x7fffffffe310 --> 0x7fffffffe3b0 --> 0x0 RSP: 0x7fffffffe070 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) RIP: 0x7ffff7731fc4 (<Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1222>: div QWORD PTR [rbp-0xe8]) R8 : 0x1000 R9 : 0x644ba0 --> 0x0 R10: 0x7fffffffde30 --> 0x0 R11: 0x7ffff773347a (<std::numeric_limits<unsigned long>::max()>: push rbp) R12: 0x41c6f8 (<Action::Print::run(std::string const&)>: push rbp) R13: 0x7fffffffe490 --> 0x3 R14: 0x0 R15: 0x0 EFLAGS: 0x10202 (carry parity adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff7731fb4 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1206>: mov ebx,DWORD PTR [rbp-0x170] 0x7ffff7731fba <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1212>: call 0x7ffff7714560 <_ZNSt14numeric_limitsImE3maxEv@plt> 0x7ffff7731fbf <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1217>: mov edx,0x0 => 0x7ffff7731fc4 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1222>: div QWORD PTR [rbp-0xe8] 0x7ffff7731fcb <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1229>: cmp rbx,rax 0x7ffff7731fce <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1232>: seta al 0x7ffff7731fd1 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1235>: test al,al 0x7ffff7731fd3 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1237>: je 0x7ffff7732008 <Exiv2::(anonymous namespace)::BigTiffImage::printIFD(std::ostream&, Exiv2::PrintStructureOption, uint64_t, int)+1290> [------------------------------------stack-------------------------------------] 0000| 0x7fffffffe070 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) 0008| 0x7fffffffe078 --> 0x7ffff7b972b8 --> 0x42cd52 (<std::auto_ptr<Exiv2::Image>::~auto_ptr()>: push rbp) 0016| 0x7fffffffe080 --> 0x8 0024| 0x7fffffffe088 --> 0x200000000 0032| 0x7fffffffe090 --> 0x640900 --> 0x7ffff7590f18 --> 0x7ffff733ad20 (<_ZNSoD1Ev>: mov rax,QWORD PTR [rip+0x258c71] # 0x7ffff7593998) 0040| 0x7fffffffe098 --> 0x644a90 --> 0x7ffff7b873d0 --> 0x7ffff7731a14 (<Exiv2::(anonymous namespace)::BigTiffImage::~BigTiffImage()>: push rbp) 0048| 0x7fffffffe0a0 --> 0x100ffffe0d0 0056| 0x7fffffffe0a8 --> 0x8 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGFPE 0x00007ffff7731fc4 in Exiv2::(anonymous namespace)::BigTiffImage::printIFD (this=0x644a90, out=..., option=Exiv2::kpsXMP, dir_offset=0x8, depth=0x0) at bigtiffimage.cpp:254 254 if (size > std::numeric_limits<uint64_t>::max() / count) gdb-peda$ p count $1 = 0x0 gdb-peda$ bt #0 0x00007ffff7731fc4 in Exiv2::(anonymous namespace)::BigTiffImage::printIFD (this=0x644a90, out=..., option=Exiv2::kpsXMP, dir_offset=0x8, depth=0x0) at bigtiffimage.cpp:254 #1 0x00007ffff7731af6 in Exiv2::(anonymous namespace)::BigTiffImage::printStructure (this=0x644a90, os=..., option=Exiv2::kpsXMP, depth=0x0) at bigtiffimage.cpp:183 #2 0x000000000041ca2e in Action::Print::printStructure (this=0x644810, out=..., option=Exiv2::kpsXMP) at actions.cpp:283 #3 0x000000000041c7f9 in Action::Print::run (this=0x644810, path="crashes-2018-03-23-22-41/exiv2000:id:000001,sig:08,src:000109,op:arith8,pos:23,val:-27") at actions.cpp:257 #4 0x000000000040e267 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #5 0x00007ffff6ce9f45 in __libc_start_main (main=0x40dfae <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #6 0x000000000040dee9 in _start () ``` ============= the poc please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/7-printIFD-divbyzero-1 --- end body --- comments : --- start comments --- --- end comments ---
5,280
208,095
[ "Exiv2", "exiv2" ]
out of bound read in function Exiv2::Internal::binaryToString and Exiv2::IptcData::printStructure, the result info with valgrind as follows: the first one : ========== ==29031== Memcheck, a memory error detector ==29031== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==29031== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==29031== Command: ./installed/bin/exiv2 crashes-2018-03-27-15-54/exiv2000id000007,sig:11,src:000947,op:havoc,rep:4 ==29031== ==29031== Invalid read of size 1 ==29031== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29031== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== Address 0x68b5ba2 is 0 bytes after a block of size 2 alloc'd ==29031== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29031== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== ==29031== ==29031== Process terminating with default action of signal 11 (SIGSEGV) ==29031== Access not within mapped region at address 0x6C9B000 ==29031== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29031== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== If you believe this happened as a result of a stack ==29031== overflow in your program's main thread (unlikely but ==29031== possible), you can try to increase the size of the ==29031== main thread stack using the --main-stacksize= flag. ==29031== The main thread stack size used in this run was 8388608. ==29031== ==29031== HEAP SUMMARY: ==29031== in use at exit: 33,395 bytes in 697 blocks ==29031== total heap usage: 920 allocs, 223 frees, 46,386 bytes allocated ==29031== ==29031== LEAK SUMMARY: ==29031== definitely lost: 0 bytes in 0 blocks ==29031== indirectly lost: 0 bytes in 0 blocks ==29031== possibly lost: 14,018 bytes in 348 blocks ==29031== still reachable: 19,377 bytes in 349 blocks ==29031== suppressed: 0 bytes in 0 blocks ==29031== Rerun with --leak-check=full to see details of leaked memory ==29031== ==29031== For counts of detected and suppressed errors, rerun with: -v ==29031== ERROR SUMMARY: 4084831 errors from 1 contexts (suppressed: 0 from 0) =============== the second one: ================= ==29386== Memcheck, a memory error detector ==29386== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==29386== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==29386== Command: ./installed/bin/exiv2 crashes-2018-03-27-15-54/exiv2000id000020,sig:11,src:001299+000137,op:splice,rep:2 ==29386== ==29386== Invalid read of size 1 ==29386== at 0x5233FE8: Exiv2::Internal::binaryToString(unsigned char const*, unsigned long, unsigned long) (image.cpp:1031) ==29386== by 0x523B43C: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:364) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b55b5 is 0 bytes after a block of size 21 alloc'd ==29386== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== Invalid read of size 1 ==29386== at 0x523B4B9: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:357) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b56b8 is 88 bytes inside a block of size 537 free'd ==29386== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5703540: std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19) ==29386== by 0x520D7BB: Exiv2::IptcDataSets::dataSetName(unsigned short, unsigned short) (datasets.cpp:494) ==29386== by 0x523B399: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:362) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== Invalid read of size 1 ==29386== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b6382 is 0 bytes after a block of size 2 alloc'd ==29386== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== ==29386== Process terminating with default action of signal 11 (SIGSEGV) ==29386== Access not within mapped region at address 0x6C9B000 ==29386== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== If you believe this happened as a result of a stack ==29386== overflow in your program's main thread (unlikely but ==29386== possible), you can try to increase the size of the ==29386== main thread stack using the --main-stacksize= flag. ==29386== The main thread stack size used in this run was 8388608. ==29386== ==29386== HEAP SUMMARY: ==29386== in use at exit: 33,451 bytes in 698 blocks ==29386== total heap usage: 929 allocs, 231 frees, 47,782 bytes allocated ==29386== ==29386== LEAK SUMMARY: ==29386== definitely lost: 0 bytes in 0 blocks ==29386== indirectly lost: 0 bytes in 0 blocks ==29386== possibly lost: 14,026 bytes in 348 blocks ==29386== still reachable: 19,425 bytes in 350 blocks ==29386== suppressed: 0 bytes in 0 blocks ==29386== Rerun with --leak-check=full to see details of leaked memory ==29386== ==29386== For counts of detected and suppressed errors, rerun with: -v ==29386== ERROR SUMMARY: 4082854 errors from 3 contexts (suppressed: 0 from 0) ================= the pocs please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/5-printStructure-outbound-read-1 https://github.com/xiaoqx/pocs/blob/master/exiv2/6-binaryToString-outbound-read-1
Two out of bound read when read tiff file
https://api.github.com/repos/Exiv2/exiv2/issues/254/comments
4
"2018-03-29T01:30:57"
"2018-11-08T01:42:41Z"
https://github.com/Exiv2/exiv2/issues/254
309,587,812
254
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Two out of bound read when read tiff file Issue date: --- start body --- out of bound read in function Exiv2::Internal::binaryToString and Exiv2::IptcData::printStructure, the result info with valgrind as follows: the first one : ========== ==29031== Memcheck, a memory error detector ==29031== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==29031== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==29031== Command: ./installed/bin/exiv2 crashes-2018-03-27-15-54/exiv2000id000007,sig:11,src:000947,op:havoc,rep:4 ==29031== ==29031== Invalid read of size 1 ==29031== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29031== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== Address 0x68b5ba2 is 0 bytes after a block of size 2 alloc'd ==29031== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29031== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== ==29031== ==29031== Process terminating with default action of signal 11 (SIGSEGV) ==29031== Access not within mapped region at address 0x6C9B000 ==29031== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29031== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29031== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29031== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29031== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29031== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29031== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29031== by 0x40E2B6: main (exiv2.cpp:166) ==29031== If you believe this happened as a result of a stack ==29031== overflow in your program's main thread (unlikely but ==29031== possible), you can try to increase the size of the ==29031== main thread stack using the --main-stacksize= flag. ==29031== The main thread stack size used in this run was 8388608. ==29031== ==29031== HEAP SUMMARY: ==29031== in use at exit: 33,395 bytes in 697 blocks ==29031== total heap usage: 920 allocs, 223 frees, 46,386 bytes allocated ==29031== ==29031== LEAK SUMMARY: ==29031== definitely lost: 0 bytes in 0 blocks ==29031== indirectly lost: 0 bytes in 0 blocks ==29031== possibly lost: 14,018 bytes in 348 blocks ==29031== still reachable: 19,377 bytes in 349 blocks ==29031== suppressed: 0 bytes in 0 blocks ==29031== Rerun with --leak-check=full to see details of leaked memory ==29031== ==29031== For counts of detected and suppressed errors, rerun with: -v ==29031== ERROR SUMMARY: 4084831 errors from 1 contexts (suppressed: 0 from 0) =============== the second one: ================= ==29386== Memcheck, a memory error detector ==29386== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==29386== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==29386== Command: ./installed/bin/exiv2 crashes-2018-03-27-15-54/exiv2000id000020,sig:11,src:001299+000137,op:splice,rep:2 ==29386== ==29386== Invalid read of size 1 ==29386== at 0x5233FE8: Exiv2::Internal::binaryToString(unsigned char const*, unsigned long, unsigned long) (image.cpp:1031) ==29386== by 0x523B43C: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:364) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b55b5 is 0 bytes after a block of size 21 alloc'd ==29386== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== Invalid read of size 1 ==29386== at 0x523B4B9: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:357) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b56b8 is 88 bytes inside a block of size 537 free'd ==29386== at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5703540: std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19) ==29386== by 0x520D7BB: Exiv2::IptcDataSets::dataSetName(unsigned short, unsigned short) (datasets.cpp:494) ==29386== by 0x523B399: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:362) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== Invalid read of size 1 ==29386== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== Address 0x68b6382 is 0 bytes after a block of size 2 alloc'd ==29386== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29386== by 0x5231653: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:467) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== ==29386== ==29386== Process terminating with default action of signal 11 (SIGSEGV) ==29386== Access not within mapped region at address 0x6C9B000 ==29386== at 0x523B295: Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) (iptc.cpp:354) ==29386== by 0x52316CC: Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) (image.cpp:470) ==29386== by 0x5231E0F: Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) (image.cpp:533) ==29386== by 0x52CB2FA: Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) (tiffimage.cpp:344) ==29386== by 0x52CA550: Exiv2::TiffImage::readMetadata() (tiffimage.cpp:187) ==29386== by 0x41CBE8: Action::Print::printSummary() (actions.cpp:296) ==29386== by 0x41C7A6: Action::Print::run(std::string const&) (actions.cpp:242) ==29386== by 0x40E2B6: main (exiv2.cpp:166) ==29386== If you believe this happened as a result of a stack ==29386== overflow in your program's main thread (unlikely but ==29386== possible), you can try to increase the size of the ==29386== main thread stack using the --main-stacksize= flag. ==29386== The main thread stack size used in this run was 8388608. ==29386== ==29386== HEAP SUMMARY: ==29386== in use at exit: 33,451 bytes in 698 blocks ==29386== total heap usage: 929 allocs, 231 frees, 47,782 bytes allocated ==29386== ==29386== LEAK SUMMARY: ==29386== definitely lost: 0 bytes in 0 blocks ==29386== indirectly lost: 0 bytes in 0 blocks ==29386== possibly lost: 14,026 bytes in 348 blocks ==29386== still reachable: 19,425 bytes in 350 blocks ==29386== suppressed: 0 bytes in 0 blocks ==29386== Rerun with --leak-check=full to see details of leaked memory ==29386== ==29386== For counts of detected and suppressed errors, rerun with: -v ==29386== ERROR SUMMARY: 4082854 errors from 3 contexts (suppressed: 0 from 0) ================= the pocs please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/5-printStructure-outbound-read-1 https://github.com/xiaoqx/pocs/blob/master/exiv2/6-binaryToString-outbound-read-1 --- end body --- comments : --- start comments --- --- end comments ---
13,478
208,096
[ "Exiv2", "exiv2" ]
This issue is another out bound read in Exiv2::Internal::stringFormat, it could result to segment fault at least. the debug info as follows: [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x7fffffffd520 --> 0x7ffffbad8001 RCX: 0xffffffffffffffff RDX: 0x28 ('(') RSI: 0x7fffffe8 RDI: 0x1000000000000 RBP: 0x7fffffffd510 --> 0x644b70 (" 50 | 0xfffffff") RSP: 0x7fffffffcf30 --> 0x0 RIP: 0x7ffff6d0e943 (<_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi]) R8 : 0x7fffffff R9 : 0x7ffff7fe3780 (0x00007ffff7fe3780) R10: 0x7ffff7083fe0 --> 0x0 R11: 0x0 R12: 0x7ffff6d10f69 (<_IO_vfprintf_internal+17193>: cmp BYTE PTR [rbp-0x508],0x0) R13: 0x1000000000000 R14: 0x7ffff78a3e99 ("%8ld | 0xff%02x %-5s") R15: 0x7fffffffd6c0 --> 0x3000000028 ('(') EFLAGS: 0x10286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff6d0e93a <_IO_vfprintf_internal+7418>: xor eax,eax 0x7ffff6d0e93c <_IO_vfprintf_internal+7420>: or rcx,0xffffffffffffffff 0x7ffff6d0e940 <_IO_vfprintf_internal+7424>: mov rdi,r13 => 0x7ffff6d0e943 <_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi] 0x7ffff6d0e945 <_IO_vfprintf_internal+7429>: mov DWORD PTR [rbp-0x508],0x0 0x7ffff6d0e94f <_IO_vfprintf_internal+7439>: mov rsi,rcx 0x7ffff6d0e952 <_IO_vfprintf_internal+7442>: not rsi 0x7ffff6d0e955 <_IO_vfprintf_internal+7445>: lea r10,[rsi-0x1] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf30 --> 0x0 0008| 0x7fffffffcf38 --> 0x0 0016| 0x7fffffffcf40 --> 0x0 0024| 0x7fffffffcf48 --> 0x0 0032| 0x7fffffffcf50 --> 0x0 0040| 0x7fffffffcf58 --> 0x0 0048| 0x7fffffffcf60 --> 0x7fffffffd090 --> 0xffffffffffffffff 0056| 0x7fffffffcf68 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 1661 vfprintf.c: No such file or directory. gdb-peda$ bt #0 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 #1 0x00007ffff6d35499 in _IO_vsnprintf (string=0x644b70 " 50 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6c0) at vsnprintf.c:119 #2 0x00007ffff7784e1d in Exiv2::Internal::stringFormat (format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff7799089 in Exiv2::JpegBase::printStructure (this=0x644a80, out=..., option=Exiv2::kpsRecursive, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041ca7e in Action::Print::printStructure (this=0x644800, out=..., option=Exiv2::kpsRecursive) at actions.cpp:283 #5 0x000000000041c816 in Action::Print::run (this=0x644800, path="./crashes-2018-03-23-19-59/exiv2000id000000,sig:11,src:000000,op:flip1,pos:2") at actions.cpp:247 #6 0x000000000040e2b7 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #7 0x00007ffff6ce4f45 in __libc_start_main (main=0x40dffe <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #8 0x000000000040df39 in _start () a$ bt #0 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 #1 0x00007ffff6d35499 in _IO_vsnprintf (string=0x644b70 " 50 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6c0) at vsnprintf.c:119 #2 0x00007ffff7784e1d in Exiv2::Internal::stringFormat (format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff7799089 in Exiv2::JpegBase::printStructure (this=0x644a80, out=..., option=Exiv2::kpsRecursive, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041ca7e in Action::Print::printStructure (this=0x644800, out=..., option=Exiv2::kpsRecursive) at actions.cpp:283 #5 0x000000000041c816 in Action::Print::run (this=0x644800, path="./crashes-2018-03-23-19-59/exiv2000id000000,sig:11,src:000000,op:flip1,pos:2") at actions.cpp:247 #6 0x000000000040e2b7 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #7 0x00007ffff6ce4f45 in __libc_start_main (main=0x40dffe <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #8 0x000000000040df39 in _start () the poc please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/3-stringformat-outofbound-read
Another outbound read in Exiv2::Internal::stringFormat
https://api.github.com/repos/Exiv2/exiv2/issues/253/comments
3
"2018-03-29T01:22:56"
"2018-04-01T07:56:50Z"
https://github.com/Exiv2/exiv2/issues/253
309,586,598
253
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Another outbound read in Exiv2::Internal::stringFormat Issue date: --- start body --- This issue is another out bound read in Exiv2::Internal::stringFormat, it could result to segment fault at least. the debug info as follows: [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x7fffffffd520 --> 0x7ffffbad8001 RCX: 0xffffffffffffffff RDX: 0x28 ('(') RSI: 0x7fffffe8 RDI: 0x1000000000000 RBP: 0x7fffffffd510 --> 0x644b70 (" 50 | 0xfffffff") RSP: 0x7fffffffcf30 --> 0x0 RIP: 0x7ffff6d0e943 (<_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi]) R8 : 0x7fffffff R9 : 0x7ffff7fe3780 (0x00007ffff7fe3780) R10: 0x7ffff7083fe0 --> 0x0 R11: 0x0 R12: 0x7ffff6d10f69 (<_IO_vfprintf_internal+17193>: cmp BYTE PTR [rbp-0x508],0x0) R13: 0x1000000000000 R14: 0x7ffff78a3e99 ("%8ld | 0xff%02x %-5s") R15: 0x7fffffffd6c0 --> 0x3000000028 ('(') EFLAGS: 0x10286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff6d0e93a <_IO_vfprintf_internal+7418>: xor eax,eax 0x7ffff6d0e93c <_IO_vfprintf_internal+7420>: or rcx,0xffffffffffffffff 0x7ffff6d0e940 <_IO_vfprintf_internal+7424>: mov rdi,r13 => 0x7ffff6d0e943 <_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi] 0x7ffff6d0e945 <_IO_vfprintf_internal+7429>: mov DWORD PTR [rbp-0x508],0x0 0x7ffff6d0e94f <_IO_vfprintf_internal+7439>: mov rsi,rcx 0x7ffff6d0e952 <_IO_vfprintf_internal+7442>: not rsi 0x7ffff6d0e955 <_IO_vfprintf_internal+7445>: lea r10,[rsi-0x1] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf30 --> 0x0 0008| 0x7fffffffcf38 --> 0x0 0016| 0x7fffffffcf40 --> 0x0 0024| 0x7fffffffcf48 --> 0x0 0032| 0x7fffffffcf50 --> 0x0 0040| 0x7fffffffcf58 --> 0x0 0048| 0x7fffffffcf60 --> 0x7fffffffd090 --> 0xffffffffffffffff 0056| 0x7fffffffcf68 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 1661 vfprintf.c: No such file or directory. gdb-peda$ bt #0 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 #1 0x00007ffff6d35499 in _IO_vsnprintf (string=0x644b70 " 50 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6c0) at vsnprintf.c:119 #2 0x00007ffff7784e1d in Exiv2::Internal::stringFormat (format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff7799089 in Exiv2::JpegBase::printStructure (this=0x644a80, out=..., option=Exiv2::kpsRecursive, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041ca7e in Action::Print::printStructure (this=0x644800, out=..., option=Exiv2::kpsRecursive) at actions.cpp:283 #5 0x000000000041c816 in Action::Print::run (this=0x644800, path="./crashes-2018-03-23-19-59/exiv2000id000000,sig:11,src:000000,op:flip1,pos:2") at actions.cpp:247 #6 0x000000000040e2b7 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #7 0x00007ffff6ce4f45 in __libc_start_main (main=0x40dffe <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #8 0x000000000040df39 in _start () a$ bt #0 0x00007ffff6d0e943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd520, format=<optimized out>, format@entry=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6c0) at vfprintf.c:1661 #1 0x00007ffff6d35499 in _IO_vsnprintf (string=0x644b70 " 50 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6c0) at vsnprintf.c:119 #2 0x00007ffff7784e1d in Exiv2::Internal::stringFormat (format=0x7ffff78a3e99 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff7799089 in Exiv2::JpegBase::printStructure (this=0x644a80, out=..., option=Exiv2::kpsRecursive, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041ca7e in Action::Print::printStructure (this=0x644800, out=..., option=Exiv2::kpsRecursive) at actions.cpp:283 #5 0x000000000041c816 in Action::Print::run (this=0x644800, path="./crashes-2018-03-23-19-59/exiv2000id000000,sig:11,src:000000,op:flip1,pos:2") at actions.cpp:247 #6 0x000000000040e2b7 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #7 0x00007ffff6ce4f45 in __libc_start_main (main=0x40dffe <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #8 0x000000000040df39 in _start () the poc please refer to : https://github.com/xiaoqx/pocs/blob/master/exiv2/3-stringformat-outofbound-read --- end body --- comments : --- start comments --- --- end comments ---
5,261
208,097
[ "Exiv2", "exiv2" ]
When I was porting redmine issue 444 from the old to the new test suite, I always got an error from python that it could not decode the output as utf-8. The issue can be reproduced via: ``` $ exiv2 -u -pi test/data/exiv2-bug444.jpg Iptc.Envelope.CharacterSet String 4 � Iptc.Application2.Urgency String 2 GT Iptc.Application2.SuppCategory String 8 portrait Iptc.Application2.Caption String 18 Witty caption here Iptc.Application2.Keywords String 3 ize Iptc.Application2.0x007b String 4 n123 ``` The output of the first line depends on the terminal used. `st` and `xterm` show the `�` symbol, `st+tmux` shows nothing and `urxvt` shows `Ä`. The issue is, that for certain metadata types exiv2 just forwards all binary contents to stdout, which can contain non-utf-8 characters. Maybe we should add a utf-8 strict mode, that will upon encountering of invalid characters output them as hex numbers instead?
exiv2 outputs non utf-8 characters
https://api.github.com/repos/Exiv2/exiv2/issues/251/comments
19
"2018-03-23T23:34:16"
"2021-04-13T12:52:17Z"
https://github.com/Exiv2/exiv2/issues/251
308,206,860
251
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : exiv2 outputs non utf-8 characters Issue date: --- start body --- When I was porting redmine issue 444 from the old to the new test suite, I always got an error from python that it could not decode the output as utf-8. The issue can be reproduced via: ``` $ exiv2 -u -pi test/data/exiv2-bug444.jpg Iptc.Envelope.CharacterSet String 4 � Iptc.Application2.Urgency String 2 GT Iptc.Application2.SuppCategory String 8 portrait Iptc.Application2.Caption String 18 Witty caption here Iptc.Application2.Keywords String 3 ize Iptc.Application2.0x007b String 4 n123 ``` The output of the first line depends on the terminal used. `st` and `xterm` show the `�` symbol, `st+tmux` shows nothing and `urxvt` shows `Ä`. The issue is, that for certain metadata types exiv2 just forwards all binary contents to stdout, which can contain non-utf-8 characters. Maybe we should add a utf-8 strict mode, that will upon encountering of invalid characters output them as hex numbers instead? --- end body --- comments : --- start comments --- --- end comments ---
1,256
208,098
[ "Exiv2", "exiv2" ]
We need to retire the old test suite so that we can move forward with #180 and other patches. Unfortunately, that is a lot of grind work. So, if you happen to have a little time at your hand, please help. ### Progress The main focus should be on the regression tests: - [x] GitHub issues: #249 - [x] Redmine issues 426-825 (bugfixes-test.sh) (#287) - [x] Redmine issues 1179 - 1305 (bugfixes-test.sh) (#333) - [x] Redmine issues 831-937 (bugfixes-test.sh) (#353) - [x] Redmine issues 1024-1170 (bugfixes-test.sh) (#367) - [x] Redmine issues 1043, 1074, 1137 (bugfixes-test.sh) (#419) The remaining ones have lower priority: - [x] tiff-test.sh (already in master) - [ ] webp-test.sh - [ ] addmoddel.sh - [ ] conversions.sh - [ ] crw-test.sh - [ ] curliotest.sh - [ ] eps-preview-test.sh - [ ] eps-test.sh - [ ] exifdata-test.sh - [ ] exiv2-test.sh - [ ] geotag-test.sh - [ ] httpiotest.sh - [ ] http-test.sh - [ ] icc-test.sh - [ ] imagetest.sh - [ ] iotest.sh - [ ] iptctest.sh - [ ] iso65k-test.sh - [ ] modify-test.sh - [ ] path-test.sh - [ ] preview-test.sh - [ ] sshiotest.sh - [ ] stdin-test.sh - [ ] stringto-test.sh (these should become unit tests) - [ ] testMSVC.sh - [ ] tiff-test.sh - [ ] version-test.sh - [ ] video-test.sh - [ ] write2-test.sh - [ ] write-test.sh - [ ] write-video-test.sh - [ ] xmpparser-test.sh ### Porting guide The actual porting process is not too hard. The old test suite is just a set of shell scripts in `test/` that call `exiv2` repeatedly, collect the output of the whole script and compare it to a binary output file (it is under `test/data/` and has the same name as the script, but with the ending `.out` instead of `.sh`). Example from `test/bugfixes-test.sh`: ``` bash num=426 filename=`prep_file $num` runTest exiv2 -u -pi $filename ``` and the corresponding output from `test/data/bugfixes-test.out` ``` ------> Bug 426 <------- Iptc.Application2.RecordVersion Short 1 2 Iptc.Application2.FixtureId String 22 2005 Oregon Coast Tour Iptc.Application2.Byline String 14 Julie V. Early Iptc.Application2.City String 21 159 km SW of Portland Iptc.Application2.ProvinceState String 6 Oregon Iptc.Application2.CountryName String 13 United States Iptc.Application2.Contact String 16 Jeffrey J. Early ``` The new test suite on the other hand uses Python's unit test suite to perform the same task. In addition to that, it check the standard output & error separately and also checks the return value. Each issue should have its own python test file, which has roughly this form: ``` Python # -*- coding: utf-8 -*- import system_tests class AnInformativeName(metaclass=system_tests.CaseMeta): filename = system_tests.path("$data_path/exiv2-reproducer-filename") commands = ["$exiv2 $filename"] stdout = [""] stderr = ["""$exiv2_exception_message $filename: $kerCorruptedMetadata """] retval = [1] ``` This file should be located in an appropriate directory under `tests/`, in that directory must be an empty file called `__init__.py` and the file must have the prefix `test_` (otherwise python's test collector will ignore it). Most issues can be ported rather easily (using the excerpt from `bugfixes-test.sh`): 1. Create a new file under `tests/` with an appropriate name. E.g. `tests/bugfixes/redmine/test_issue_426.py` 2. Insert the python class skeleton. 3. Identify the reproducer which is run, either its name is written in the script or it is created via `prep_file`. `prep_file $num` means that the file is called `exiv2-bug$num.jpg`. Write this name into the python class into the variable `filename`, prefixed with `$data_path` and wrap it in `system_tests.path()` (for Windows path support). For the example, you'll get: `filename = system_tests.path("$data_path/exiv2-bug426.jpg")`. 4. Extract the command from the script, that is the part after `runTest`. 5. Run the reproducer, to obtain the stdout, stderr & return value and write them as python strings into the class. For issue 426 we'll end up with something like this: ``` Python # -*- coding: utf-8 -*- import system_tests class ReadIPTfromJPEG(metaclass=system_tests.CaseMeta): url = "http://dev.exiv2.org/issues/426" filename = system_tests.path("$data_path/exiv2-bug426.jpg") commands = ["exiv2 -u -pi $filename"] stdout = ["""Iptc.Application2.RecordVersion Short 1 2 Iptc.Application2.FixtureId String 22 2005 Oregon Coast Tour Iptc.Application2.Byline String 14 Julie V. Early Iptc.Application2.City String 21 159 km SW of Portland Iptc.Application2.ProvinceState String 6 Oregon Iptc.Application2.CountryName String 13 United States Iptc.Application2.Contact String 16 Jeffrey J. Early """] stderr = [""] retval = [0] ``` ### Remarks - Not all output from exiv2 is useful. Especially stderr is often cluttered with error messages about which we do not really care. In that case, leave stderr empty and instead set the following inside the python class (thereby the actual output will be ignored except for error messages from ASAN and UBSAN): ``` compare_stderr = system_tests.check_no_ASAN_UBSAN_errors ``` - Some of the tests should not be system tests. They should be rewritten as unit tests instead.
Port the old test suite to the new one
https://api.github.com/repos/Exiv2/exiv2/issues/250/comments
3
"2018-03-23T23:24:46"
"2021-04-13T08:32:16Z"
https://github.com/Exiv2/exiv2/issues/250
308,205,577
250
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Port the old test suite to the new one Issue date: --- start body --- We need to retire the old test suite so that we can move forward with #180 and other patches. Unfortunately, that is a lot of grind work. So, if you happen to have a little time at your hand, please help. ### Progress The main focus should be on the regression tests: - [x] GitHub issues: #249 - [x] Redmine issues 426-825 (bugfixes-test.sh) (#287) - [x] Redmine issues 1179 - 1305 (bugfixes-test.sh) (#333) - [x] Redmine issues 831-937 (bugfixes-test.sh) (#353) - [x] Redmine issues 1024-1170 (bugfixes-test.sh) (#367) - [x] Redmine issues 1043, 1074, 1137 (bugfixes-test.sh) (#419) The remaining ones have lower priority: - [x] tiff-test.sh (already in master) - [ ] webp-test.sh - [ ] addmoddel.sh - [ ] conversions.sh - [ ] crw-test.sh - [ ] curliotest.sh - [ ] eps-preview-test.sh - [ ] eps-test.sh - [ ] exifdata-test.sh - [ ] exiv2-test.sh - [ ] geotag-test.sh - [ ] httpiotest.sh - [ ] http-test.sh - [ ] icc-test.sh - [ ] imagetest.sh - [ ] iotest.sh - [ ] iptctest.sh - [ ] iso65k-test.sh - [ ] modify-test.sh - [ ] path-test.sh - [ ] preview-test.sh - [ ] sshiotest.sh - [ ] stdin-test.sh - [ ] stringto-test.sh (these should become unit tests) - [ ] testMSVC.sh - [ ] tiff-test.sh - [ ] version-test.sh - [ ] video-test.sh - [ ] write2-test.sh - [ ] write-test.sh - [ ] write-video-test.sh - [ ] xmpparser-test.sh ### Porting guide The actual porting process is not too hard. The old test suite is just a set of shell scripts in `test/` that call `exiv2` repeatedly, collect the output of the whole script and compare it to a binary output file (it is under `test/data/` and has the same name as the script, but with the ending `.out` instead of `.sh`). Example from `test/bugfixes-test.sh`: ``` bash num=426 filename=`prep_file $num` runTest exiv2 -u -pi $filename ``` and the corresponding output from `test/data/bugfixes-test.out` ``` ------> Bug 426 <------- Iptc.Application2.RecordVersion Short 1 2 Iptc.Application2.FixtureId String 22 2005 Oregon Coast Tour Iptc.Application2.Byline String 14 Julie V. Early Iptc.Application2.City String 21 159 km SW of Portland Iptc.Application2.ProvinceState String 6 Oregon Iptc.Application2.CountryName String 13 United States Iptc.Application2.Contact String 16 Jeffrey J. Early ``` The new test suite on the other hand uses Python's unit test suite to perform the same task. In addition to that, it check the standard output & error separately and also checks the return value. Each issue should have its own python test file, which has roughly this form: ``` Python # -*- coding: utf-8 -*- import system_tests class AnInformativeName(metaclass=system_tests.CaseMeta): filename = system_tests.path("$data_path/exiv2-reproducer-filename") commands = ["$exiv2 $filename"] stdout = [""] stderr = ["""$exiv2_exception_message $filename: $kerCorruptedMetadata """] retval = [1] ``` This file should be located in an appropriate directory under `tests/`, in that directory must be an empty file called `__init__.py` and the file must have the prefix `test_` (otherwise python's test collector will ignore it). Most issues can be ported rather easily (using the excerpt from `bugfixes-test.sh`): 1. Create a new file under `tests/` with an appropriate name. E.g. `tests/bugfixes/redmine/test_issue_426.py` 2. Insert the python class skeleton. 3. Identify the reproducer which is run, either its name is written in the script or it is created via `prep_file`. `prep_file $num` means that the file is called `exiv2-bug$num.jpg`. Write this name into the python class into the variable `filename`, prefixed with `$data_path` and wrap it in `system_tests.path()` (for Windows path support). For the example, you'll get: `filename = system_tests.path("$data_path/exiv2-bug426.jpg")`. 4. Extract the command from the script, that is the part after `runTest`. 5. Run the reproducer, to obtain the stdout, stderr & return value and write them as python strings into the class. For issue 426 we'll end up with something like this: ``` Python # -*- coding: utf-8 -*- import system_tests class ReadIPTfromJPEG(metaclass=system_tests.CaseMeta): url = "http://dev.exiv2.org/issues/426" filename = system_tests.path("$data_path/exiv2-bug426.jpg") commands = ["exiv2 -u -pi $filename"] stdout = ["""Iptc.Application2.RecordVersion Short 1 2 Iptc.Application2.FixtureId String 22 2005 Oregon Coast Tour Iptc.Application2.Byline String 14 Julie V. Early Iptc.Application2.City String 21 159 km SW of Portland Iptc.Application2.ProvinceState String 6 Oregon Iptc.Application2.CountryName String 13 United States Iptc.Application2.Contact String 16 Jeffrey J. Early """] stderr = [""] retval = [0] ``` ### Remarks - Not all output from exiv2 is useful. Especially stderr is often cluttered with error messages about which we do not really care. In that case, leave stderr empty and instead set the following inside the python class (thereby the actual output will be ignored except for error messages from ASAN and UBSAN): ``` compare_stderr = system_tests.check_no_ASAN_UBSAN_errors ``` - Some of the tests should not be system tests. They should be rewritten as unit tests instead. --- end body --- comments : --- start comments --- --- end comments ---
5,835
208,099
[ "Exiv2", "exiv2" ]
I'd like to use Ninja (https://ninja-build.org/) as a highly parallel cross platform build backend with exiv2. It works well on MacOSX and Linux, but fails on MSVC with error: ``` -- Configuring done -- Generating done -- Build files have been written to: D:/tmp-MSVC-Generic-7-x64-cl19.00.24210/Debug/Shared/exiv2-0.26-x64 ninja: error: build.ninja:857: bad $-escape (literal $ must be written as $$) LINK_PATH = -LIBPATH:\$(ConfigurationName) ^ near here make[1]: *** [MSVC/Makefile.BDA.MSVC.exiv2:19: /d/artifacts-MSVC-Generic-7-x64-cl19.00.24210/Debug/Shared/include/exiv2/exiv2.hpp] Error 1 make[1]: Leaving directory '/d/gitlabci/local/builds/e59b7d05/0/BDAThirdparty' make: *** [Makefile.BDA:49: debug] Error 2 clear: terminal attributes: No such device or address ``` Its not a super high priority, but would be great to have Ninja support.
Can not build with Ninja on MSVC
https://api.github.com/repos/Exiv2/exiv2/issues/248/comments
12
"2018-03-23T11:24:31"
"2018-03-27T08:55:12Z"
https://github.com/Exiv2/exiv2/issues/248
307,991,997
248
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Can not build with Ninja on MSVC Issue date: --- start body --- I'd like to use Ninja (https://ninja-build.org/) as a highly parallel cross platform build backend with exiv2. It works well on MacOSX and Linux, but fails on MSVC with error: ``` -- Configuring done -- Generating done -- Build files have been written to: D:/tmp-MSVC-Generic-7-x64-cl19.00.24210/Debug/Shared/exiv2-0.26-x64 ninja: error: build.ninja:857: bad $-escape (literal $ must be written as $$) LINK_PATH = -LIBPATH:\$(ConfigurationName) ^ near here make[1]: *** [MSVC/Makefile.BDA.MSVC.exiv2:19: /d/artifacts-MSVC-Generic-7-x64-cl19.00.24210/Debug/Shared/include/exiv2/exiv2.hpp] Error 1 make[1]: Leaving directory '/d/gitlabci/local/builds/e59b7d05/0/BDAThirdparty' make: *** [Makefile.BDA:49: debug] Error 2 clear: terminal attributes: No such device or address ``` Its not a super high priority, but would be great to have Ninja support. --- end body --- comments : --- start comments --- --- end comments ---
1,082
208,100
[ "Exiv2", "exiv2" ]
An Invalid memory access in Exiv2::Internal::printCsLensFFFF in canonmn_int.cpp:1773 the debug info as follows : s-----------------------------------] RAX: 0xb8 RBX: 0x0 RCX: 0x7fffffffdb10 --> 0x404570 --> 0xd00220000502f ('/P') RDX: 0x644ad0 --> 0x0 RSI: 0x7fffffffdbdf --> 0x2000 ('') RDI: 0x644ad0 --> 0x0 RBP: 0x7fffffffdd70 --> 0x7fffffffde10 --> 0x7fffffffde60 --> 0x7fffffffe000 --> 0x7fffffffe200 --> 0x7fffffffe270 (--> ...) RSP: 0x7fffffffdc40 --> 0x0 RIP: 0x7ffff77308bf (<Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+288>: mov rax,QWORD PTR [rax]) R8 : 0x0 R9 : 0x648220 --> 0x644890 --> 0x0 R10: 0x7fffffffda00 --> 0x0 R11: 0x42cf1c (<std::_List_const_iterator<Exiv2::Exifdatum>::operator->() const>: push rbp) R12: 0x20 (' ') R13: 0x0 R14: 0x0 R15: 0x1 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff77308b3 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+276>: mov rdx,rax 0x7ffff77308b6 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+279>: mov rax,QWORD PTR [rdx] 0x7ffff77308b9 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+282>: add rax,0xb8 => 0x7ffff77308bf <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+288>: mov rax,QWORD PTR [rax] 0x7ffff77308c2 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+291>: mov rdi,rdx 0x7ffff77308c5 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+294>: call rax 0x7ffff77308c7 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+296>: mov rdx,rax 0x7ffff77308ca <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+299>: lea rax,[rbp-0xd0] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffdc40 --> 0x0 0008| 0x7fffffffdc48 --> 0x1f75b4f78 0016| 0x7fffffffdc50 --> 0x101000000000000 0024| 0x7fffffffdc58 --> 0x644ac0 --> 0x64a580 --> 0x6442f0 --> 0x64d9c0 --> 0x64da90 (--> ...) 0032| 0x7fffffffdc60 --> 0x651760 --> 0x7ffff7b883d0 --> 0x7ffff7752106 (<Exiv2::ValueType<unsigned short>::~ValueType()>: push rbp) 0040| 0x7fffffffdc68 --> 0x7fffffffde90 --> 0x7ffff75842b8 --> 0x7ffff73324a0 (<_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev>: push rbx) 0048| 0x7fffffffdc70 --> 0x7ffff7b862c0 --> 0x4 0056| 0x7fffffffdc78 --> 0x7ffff7b865a0 --> 0x1 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff77308bf in Exiv2::Internal::printCsLensFFFF (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1773 1773 if( metadata->findKey(ExifKey("Exif.Image.Model" ))->value().toString() == "Canon EOS 30D" gdb-peda$ bt #0 0x00007ffff77308bf in Exiv2::Internal::printCsLensFFFF (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1773 #1 0x00007ffff7731e73 in Exiv2::Internal::CanonMakerNote::printCsLensType (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1941 #2 0x00007ffff776ce90 in Exiv2::Exifdatum::write (this=0x651680, os=..., pMetadata=0x644ac0) at exif.cpp:226 #3 0x00007ffff779f9ba in Exiv2::Metadatum::print (this=0x651680, pMetadata=0x644ac0) at metadatum.cpp:75 #4 0x0000000000421219 in Action::Print::printMetadatum (this=0x644830, md=..., pImage=0x644ab0) at actions.cpp:759 #5 0x000000000041fda6 in Action::Print::printMetadata (this=0x644830, image=0x644ab0) at actions.cpp:556 #6 0x000000000041fcd4 in Action::Print::printList (this=0x644830) at actions.cpp:545 #7 0x000000000041c83b in Action::Print::run (this=0x644830, path="./crashes-2018-03-23-16-19/exiv2000:id:000000,sig:11,src:000000,op:flip1,pos:52") at actions.cpp:243 #8 0x000000000040e337 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #9 0x00007ffff6cdcf45 in __libc_start_main (main=0x40e07e <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #10 0x000000000040dfb9 in _start () ============ the bug trigger commandline is : ./bin/.libs/lt-exiv2 -pt $POC please ref the following url for the poc: https://github.com/xiaoqx/pocs/blob/master/exiv2/2-invalid-memory-access
Invalid memory access in Exiv2::Internal::printCsLensFFFF
https://api.github.com/repos/Exiv2/exiv2/issues/247/comments
1
"2018-03-23T09:57:44"
"2018-11-08T01:43:07Z"
https://github.com/Exiv2/exiv2/issues/247
307,964,845
247
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Invalid memory access in Exiv2::Internal::printCsLensFFFF Issue date: --- start body --- An Invalid memory access in Exiv2::Internal::printCsLensFFFF in canonmn_int.cpp:1773 the debug info as follows : s-----------------------------------] RAX: 0xb8 RBX: 0x0 RCX: 0x7fffffffdb10 --> 0x404570 --> 0xd00220000502f ('/P') RDX: 0x644ad0 --> 0x0 RSI: 0x7fffffffdbdf --> 0x2000 ('') RDI: 0x644ad0 --> 0x0 RBP: 0x7fffffffdd70 --> 0x7fffffffde10 --> 0x7fffffffde60 --> 0x7fffffffe000 --> 0x7fffffffe200 --> 0x7fffffffe270 (--> ...) RSP: 0x7fffffffdc40 --> 0x0 RIP: 0x7ffff77308bf (<Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+288>: mov rax,QWORD PTR [rax]) R8 : 0x0 R9 : 0x648220 --> 0x644890 --> 0x0 R10: 0x7fffffffda00 --> 0x0 R11: 0x42cf1c (<std::_List_const_iterator<Exiv2::Exifdatum>::operator->() const>: push rbp) R12: 0x20 (' ') R13: 0x0 R14: 0x0 R15: 0x1 EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff77308b3 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+276>: mov rdx,rax 0x7ffff77308b6 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+279>: mov rax,QWORD PTR [rdx] 0x7ffff77308b9 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+282>: add rax,0xb8 => 0x7ffff77308bf <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+288>: mov rax,QWORD PTR [rax] 0x7ffff77308c2 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+291>: mov rdi,rdx 0x7ffff77308c5 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+294>: call rax 0x7ffff77308c7 <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+296>: mov rdx,rax 0x7ffff77308ca <Exiv2::Internal::printCsLensFFFF(std::ostream&, Exiv2::Value const&, Exiv2::ExifData const*)+299>: lea rax,[rbp-0xd0] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffdc40 --> 0x0 0008| 0x7fffffffdc48 --> 0x1f75b4f78 0016| 0x7fffffffdc50 --> 0x101000000000000 0024| 0x7fffffffdc58 --> 0x644ac0 --> 0x64a580 --> 0x6442f0 --> 0x64d9c0 --> 0x64da90 (--> ...) 0032| 0x7fffffffdc60 --> 0x651760 --> 0x7ffff7b883d0 --> 0x7ffff7752106 (<Exiv2::ValueType<unsigned short>::~ValueType()>: push rbp) 0040| 0x7fffffffdc68 --> 0x7fffffffde90 --> 0x7ffff75842b8 --> 0x7ffff73324a0 (<_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev>: push rbx) 0048| 0x7fffffffdc70 --> 0x7ffff7b862c0 --> 0x4 0056| 0x7fffffffdc78 --> 0x7ffff7b865a0 --> 0x1 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff77308bf in Exiv2::Internal::printCsLensFFFF (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1773 1773 if( metadata->findKey(ExifKey("Exif.Image.Model" ))->value().toString() == "Canon EOS 30D" gdb-peda$ bt #0 0x00007ffff77308bf in Exiv2::Internal::printCsLensFFFF (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1773 #1 0x00007ffff7731e73 in Exiv2::Internal::CanonMakerNote::printCsLensType (os=..., value=..., metadata=0x644ac0) at canonmn_int.cpp:1941 #2 0x00007ffff776ce90 in Exiv2::Exifdatum::write (this=0x651680, os=..., pMetadata=0x644ac0) at exif.cpp:226 #3 0x00007ffff779f9ba in Exiv2::Metadatum::print (this=0x651680, pMetadata=0x644ac0) at metadatum.cpp:75 #4 0x0000000000421219 in Action::Print::printMetadatum (this=0x644830, md=..., pImage=0x644ab0) at actions.cpp:759 #5 0x000000000041fda6 in Action::Print::printMetadata (this=0x644830, image=0x644ab0) at actions.cpp:556 #6 0x000000000041fcd4 in Action::Print::printList (this=0x644830) at actions.cpp:545 #7 0x000000000041c83b in Action::Print::run (this=0x644830, path="./crashes-2018-03-23-16-19/exiv2000:id:000000,sig:11,src:000000,op:flip1,pos:52") at actions.cpp:243 #8 0x000000000040e337 in main (argc=0x3, argv=0x7fffffffe498) at exiv2.cpp:166 #9 0x00007ffff6cdcf45 in __libc_start_main (main=0x40e07e <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe498, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe488) at libc-start.c:287 #10 0x000000000040dfb9 in _start () ============ the bug trigger commandline is : ./bin/.libs/lt-exiv2 -pt $POC please ref the following url for the poc: https://github.com/xiaoqx/pocs/blob/master/exiv2/2-invalid-memory-access --- end body --- comments : --- start comments --- --- end comments ---
4,943
208,101
[ "Exiv2", "exiv2" ]
a bug results to segment fault in Exiv2::Internal::stringFormat, and it maybe a string format vulnerability which could be exploited. the debug info as follows: Breakpoint 1, Exiv2::Internal::stringFormat (format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s") at image.cpp:1013 1013 rc = vsnprintf(&buffer[0], buffer.size(), format, args); gdb-peda$ n Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x7fffffffd540 --> 0x7ffffbad8001 RCX: 0xffffffffffffffff RDX: 0x28 ('(') RSI: 0x7fffffe8 RDI: 0x1000000000000 RBP: 0x7fffffffd530 --> 0x644b70 (" 63 | 0xfffffff") RSP: 0x7fffffffcf50 --> 0x0 RIP: 0x7ffff6d06943 (<_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi]) R8 : 0x7fffffff R9 : 0x7ffff7fe3780 (0x00007ffff7fe3780) R10: 0x7ffff707bfe0 --> 0x0 R11: 0x0 R12: 0x7ffff6d08f69 (<_IO_vfprintf_internal+17193>: cmp BYTE PTR [rbp-0x508],0x0) R13: 0x1000000000000 R14: 0x7ffff78a1879 ("%8ld | 0xff%02x %-5s") R15: 0x7fffffffd6e0 --> 0x3000000028 ('(') EFLAGS: 0x10286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff6d0693a <_IO_vfprintf_internal+7418>: xor eax,eax 0x7ffff6d0693c <_IO_vfprintf_internal+7420>: or rcx,0xffffffffffffffff 0x7ffff6d06940 <_IO_vfprintf_internal+7424>: mov rdi,r13 => 0x7ffff6d06943 <_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi] 0x7ffff6d06945 <_IO_vfprintf_internal+7429>: mov DWORD PTR [rbp-0x508],0x0 0x7ffff6d0694f <_IO_vfprintf_internal+7439>: mov rsi,rcx 0x7ffff6d06952 <_IO_vfprintf_internal+7442>: not rsi 0x7ffff6d06955 <_IO_vfprintf_internal+7445>: lea r10,[rsi-0x1] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf50 --> 0x0 0008| 0x7fffffffcf58 --> 0x0 0016| 0x7fffffffcf60 --> 0x0 0024| 0x7fffffffcf68 --> 0x0 0032| 0x7fffffffcf70 --> 0x0 0040| 0x7fffffffcf78 --> 0x0 0048| 0x7fffffffcf80 --> 0x7fffffffd0b0 --> 0xffffffffffffffff 0056| 0x7fffffffcf88 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff6d06943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd540, format=<optimized out>, format@entry=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6e0) at vfprintf.c:1661 1661 vfprintf.c: No such file or directory. gdb-peda$ bt #0 0x00007ffff6d06943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd540, format=<optimized out>, format@entry=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6e0) at vfprintf.c:1661 #1 0x00007ffff6d2d499 in _IO_vsnprintf (string=0x644b70 " 63 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6e0) at vsnprintf.c:119 #2 0x00007ffff778247d in Exiv2::Internal::stringFormat (format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff77966e9 in Exiv2::JpegBase::printStructure (this=0x644a60, out=..., option=Exiv2::kpsBasic, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041cafe in Action::Print::printStructure (this=0x6447e0, out=..., option=Exiv2::kpsBasic) at actions.cpp:283 #5 0x000000000041c87b in Action::Print::run (this=0x6447e0, path="/data/xqx/projects/docker-fuzz/testcases/pics/exiv2/1-poc.jpg") at actions.cpp:246 #6 0x000000000040e337 in main (argc=0x3, argv=0x7fffffffe4b8) at exiv2.cpp:166 #7 0x00007ffff6cdcf45 in __libc_start_main (main=0x40e07e <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe4b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4a8) at libc-start.c:287 #8 0x000000000040dfb9 in _start () ========================================= the bug trigger commandline is : ./bin/.libs/lt-exiv2 -pS $POC please ref the following url for the poc: https://github.com/xiaoqx/pocs/blob/master/exiv2/1-string-format.jpg
a bug in Exiv2::Internal::stringFormat
https://api.github.com/repos/Exiv2/exiv2/issues/246/comments
2
"2018-03-23T09:37:18"
"2018-04-01T15:29:56Z"
https://github.com/Exiv2/exiv2/issues/246
307,958,389
246
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : a bug in Exiv2::Internal::stringFormat Issue date: --- start body --- a bug results to segment fault in Exiv2::Internal::stringFormat, and it maybe a string format vulnerability which could be exploited. the debug info as follows: Breakpoint 1, Exiv2::Internal::stringFormat (format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s") at image.cpp:1013 1013 rc = vsnprintf(&buffer[0], buffer.size(), format, args); gdb-peda$ n Program received signal SIGSEGV, Segmentation fault. [----------------------------------registers-----------------------------------] RAX: 0x0 RBX: 0x7fffffffd540 --> 0x7ffffbad8001 RCX: 0xffffffffffffffff RDX: 0x28 ('(') RSI: 0x7fffffe8 RDI: 0x1000000000000 RBP: 0x7fffffffd530 --> 0x644b70 (" 63 | 0xfffffff") RSP: 0x7fffffffcf50 --> 0x0 RIP: 0x7ffff6d06943 (<_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi]) R8 : 0x7fffffff R9 : 0x7ffff7fe3780 (0x00007ffff7fe3780) R10: 0x7ffff707bfe0 --> 0x0 R11: 0x0 R12: 0x7ffff6d08f69 (<_IO_vfprintf_internal+17193>: cmp BYTE PTR [rbp-0x508],0x0) R13: 0x1000000000000 R14: 0x7ffff78a1879 ("%8ld | 0xff%02x %-5s") R15: 0x7fffffffd6e0 --> 0x3000000028 ('(') EFLAGS: 0x10286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow) [-------------------------------------code-------------------------------------] 0x7ffff6d0693a <_IO_vfprintf_internal+7418>: xor eax,eax 0x7ffff6d0693c <_IO_vfprintf_internal+7420>: or rcx,0xffffffffffffffff 0x7ffff6d06940 <_IO_vfprintf_internal+7424>: mov rdi,r13 => 0x7ffff6d06943 <_IO_vfprintf_internal+7427>: repnz scas al,BYTE PTR es:[rdi] 0x7ffff6d06945 <_IO_vfprintf_internal+7429>: mov DWORD PTR [rbp-0x508],0x0 0x7ffff6d0694f <_IO_vfprintf_internal+7439>: mov rsi,rcx 0x7ffff6d06952 <_IO_vfprintf_internal+7442>: not rsi 0x7ffff6d06955 <_IO_vfprintf_internal+7445>: lea r10,[rsi-0x1] [------------------------------------stack-------------------------------------] 0000| 0x7fffffffcf50 --> 0x0 0008| 0x7fffffffcf58 --> 0x0 0016| 0x7fffffffcf60 --> 0x0 0024| 0x7fffffffcf68 --> 0x0 0032| 0x7fffffffcf70 --> 0x0 0040| 0x7fffffffcf78 --> 0x0 0048| 0x7fffffffcf80 --> 0x7fffffffd0b0 --> 0xffffffffffffffff 0056| 0x7fffffffcf88 --> 0x0 [------------------------------------------------------------------------------] Legend: code, data, rodata, value Stopped reason: SIGSEGV 0x00007ffff6d06943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd540, format=<optimized out>, format@entry=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6e0) at vfprintf.c:1661 1661 vfprintf.c: No such file or directory. gdb-peda$ bt #0 0x00007ffff6d06943 in _IO_vfprintf_internal (s=s@entry=0x7fffffffd540, format=<optimized out>, format@entry=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", ap=ap@entry=0x7fffffffd6e0) at vfprintf.c:1661 #1 0x00007ffff6d2d499 in _IO_vsnprintf (string=0x644b70 " 63 | 0xfffffff", maxlen=<optimized out>, format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s", args=0x7fffffffd6e0) at vsnprintf.c:119 #2 0x00007ffff778247d in Exiv2::Internal::stringFormat (format=0x7ffff78a1879 "%8ld | 0xff%02x %-5s") at image.cpp:1013 #3 0x00007ffff77966e9 in Exiv2::JpegBase::printStructure (this=0x644a60, out=..., option=Exiv2::kpsBasic, depth=0x0) at jpgimage.cpp:787 #4 0x000000000041cafe in Action::Print::printStructure (this=0x6447e0, out=..., option=Exiv2::kpsBasic) at actions.cpp:283 #5 0x000000000041c87b in Action::Print::run (this=0x6447e0, path="/data/xqx/projects/docker-fuzz/testcases/pics/exiv2/1-poc.jpg") at actions.cpp:246 #6 0x000000000040e337 in main (argc=0x3, argv=0x7fffffffe4b8) at exiv2.cpp:166 #7 0x00007ffff6cdcf45 in __libc_start_main (main=0x40e07e <main(int, char* const*)>, argc=0x3, argv=0x7fffffffe4b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4a8) at libc-start.c:287 #8 0x000000000040dfb9 in _start () ========================================= the bug trigger commandline is : ./bin/.libs/lt-exiv2 -pS $POC please ref the following url for the poc: https://github.com/xiaoqx/pocs/blob/master/exiv2/1-string-format.jpg --- end body --- comments : --- start comments --- --- end comments ---
4,298
208,102
[ "Exiv2", "exiv2" ]
We have been observing some issues in the CI jobs with conan on different platforms: https://travis-ci.org/piponazo/exiv2/jobs/355986434 https://travis-ci.org/piponazo/exiv2/jobs/355986435 We need to update to the latest conan version, updates the recipe versions (if needed) and try to make stable the CI jobs again.
Update to latest conan version and solve issues
https://api.github.com/repos/Exiv2/exiv2/issues/243/comments
2
"2018-03-20T18:23:41"
"2018-03-23T06:06:02Z"
https://github.com/Exiv2/exiv2/issues/243
306,985,233
243
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Update to latest conan version and solve issues Issue date: --- start body --- We have been observing some issues in the CI jobs with conan on different platforms: https://travis-ci.org/piponazo/exiv2/jobs/355986434 https://travis-ci.org/piponazo/exiv2/jobs/355986435 We need to update to the latest conan version, updates the recipe versions (if needed) and try to make stable the CI jobs again. --- end body --- comments : --- start comments --- --- end comments ---
532
208,103
[ "Exiv2", "exiv2" ]
``` diff diff --git a/src/properties.cpp b/src/properties.cpp index 8b4f1c54..321b6227 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -1334,7 +1334,7 @@ namespace Exiv2 { { "Arranger", N_("Arranger"), "Text", xmpText, xmpExternal, N_("Information about the Arranger.") }, { "ArrangerKeywords", N_("Arranger Keywords"), "Text", xmpText, xmpExternal, N_("Information about the Arranger Keywords.") }, { "Artist", N_("Artist"), "Text", xmpText, xmpExternal, N_("The name of the artist or artists.") }, - { "AspectRatio", N_("Video Aspect Ratio"), "Ratio", xmpText, xmpExternal, N_("Ratio of Width:Height, helps to determine how a video would be displayed on a screen") }, + { "AspectRatio", N_("Video Aspect Ratio"), "Rational", xmpText, xmpExternal, N_("Ratio of Width:Height, helps to determine how a video would be displayed on a screen") }, { "AspectRatioType", N_("Video Aspect Ratio Type"), "Text", xmpText, xmpExternal, N_("Aspect Ratio Type. Eg - Free-Resizing or Fixed") }, { "AttachFileData", N_("Attached File Data"), "Text", xmpText, xmpExternal, N_("Attached File Data") }, { "AttachFileDesc", N_("Attached File Description"), "Text", xmpText, xmpExternal, N_("Attached File Description") }, ```
Xmp.video.AspectRatio not defined as Rational (typo)
https://api.github.com/repos/Exiv2/exiv2/issues/237/comments
1
"2018-03-08T16:32:04"
"2018-11-08T01:43:35Z"
https://github.com/Exiv2/exiv2/issues/237
303,544,509
237
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Xmp.video.AspectRatio not defined as Rational (typo) Issue date: --- start body --- ``` diff diff --git a/src/properties.cpp b/src/properties.cpp index 8b4f1c54..321b6227 100644 --- a/src/properties.cpp +++ b/src/properties.cpp @@ -1334,7 +1334,7 @@ namespace Exiv2 { { "Arranger", N_("Arranger"), "Text", xmpText, xmpExternal, N_("Information about the Arranger.") }, { "ArrangerKeywords", N_("Arranger Keywords"), "Text", xmpText, xmpExternal, N_("Information about the Arranger Keywords.") }, { "Artist", N_("Artist"), "Text", xmpText, xmpExternal, N_("The name of the artist or artists.") }, - { "AspectRatio", N_("Video Aspect Ratio"), "Ratio", xmpText, xmpExternal, N_("Ratio of Width:Height, helps to determine how a video would be displayed on a screen") }, + { "AspectRatio", N_("Video Aspect Ratio"), "Rational", xmpText, xmpExternal, N_("Ratio of Width:Height, helps to determine how a video would be displayed on a screen") }, { "AspectRatioType", N_("Video Aspect Ratio Type"), "Text", xmpText, xmpExternal, N_("Aspect Ratio Type. Eg - Free-Resizing or Fixed") }, { "AttachFileData", N_("Attached File Data"), "Text", xmpText, xmpExternal, N_("Attached File Data") }, { "AttachFileDesc", N_("Attached File Description"), "Text", xmpText, xmpExternal, N_("Attached File Description") }, ``` --- end body --- comments : --- start comments --- --- end comments ---
1,890
208,104
[ "Exiv2", "exiv2" ]
Just thought i file the meta-bug. I'm investigating that new raw format from the point-of-view of the raw image decoding in RawSpeed library in https://github.com/darktable-org/rawspeed/issues/121. Right now exiv2 (0.25 001900) knows nothing about it. It should eventually have the same support as for the usual CR2: * camera orientation * thumbnail - [ ] https://github.com/Exiv2/exiv2/issues/235
Canon CR3 support.
https://api.github.com/repos/Exiv2/exiv2/issues/236/comments
66
"2018-03-02T21:30:22"
"2021-04-13T08:35:33Z"
https://github.com/Exiv2/exiv2/issues/236
301,911,144
236
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Canon CR3 support. Issue date: --- start body --- Just thought i file the meta-bug. I'm investigating that new raw format from the point-of-view of the raw image decoding in RawSpeed library in https://github.com/darktable-org/rawspeed/issues/121. Right now exiv2 (0.25 001900) knows nothing about it. It should eventually have the same support as for the usual CR2: * camera orientation * thumbnail - [ ] https://github.com/Exiv2/exiv2/issues/235 --- end body --- comments : --- start comments --- --- end comments ---
588
208,105
[ "Exiv2", "exiv2" ]
(Cross-reference with https://github.com/darktable-org/rawspeed/issues/121) Required for https://github.com/Exiv2/exiv2/issues/236
ISO Media / ISO/IEC 14496-12 support.
https://api.github.com/repos/Exiv2/exiv2/issues/235/comments
8
"2018-03-02T21:30:19"
"2021-04-13T08:36:51Z"
https://github.com/Exiv2/exiv2/issues/235
301,911,128
235
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : ISO Media / ISO/IEC 14496-12 support. Issue date: --- start body --- (Cross-reference with https://github.com/darktable-org/rawspeed/issues/121) Required for https://github.com/Exiv2/exiv2/issues/236 --- end body --- comments : --- start comments --- --- end comments ---
329
208,106
[ "Exiv2", "exiv2" ]
there is a heap-based buffer over-read in the Exiv2::Image::byteSwap4 function (src/image.cpp), which can be triggered by poc_0.tiff in the attachment. Note that this vulnerability exists in the exiv2 library, any software using exiv2 will be affected by this vulnerability. Remote attackers can exploit this vulnerability to disclose memory data or cause a denial of service via a crafted tiff file. As a demonstration, please run the following command-line to trigger this vulnerability: ./0.26/bin/exiv2 poc_0.tiff ================================================================= ==11745==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed80 at pc 0x000000620b4d bp 0x7ffccda7af80 sp 0x7ffccda7af70 READ of size 1 at 0x60200000ed80 thread T0 #0 0x620b4c in Exiv2::Image::byteSwap4(Exiv2::DataBuf&, unsigned long, bool) /home/fuzz/exiv2/0.26/src/image.cpp:269 #1 0x620b4c in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/fuzz/exiv2/0.26/src/image.cpp:444 #2 0x622035 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/fuzz/exiv2/0.26/src/image.cpp:517 #3 0x7ea794 in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/fuzz/exiv2/0.26/src/tiffimage.cpp:348 #4 0x7fa25d in Exiv2::TiffImage::readMetadata() /home/fuzz/exiv2/0.26/src/tiffimage.cpp:191 #5 0x4f2ea6 in Action::Print::printSummary() /home/fuzz/exiv2/0.26/src/actions.cpp:289 #6 0x4f7907 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/fuzz/exiv2/0.26/src/actions.cpp:244 #7 0x409cec in main /home/fuzz/exiv2/0.26/src/exiv2.cpp:170 #8 0x7f795525182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x48f718 in _start (/home/fuzz/exiv2/0.26/bin/exiv2+0x48f718) 0x60200000ed80 is located 0 bytes to the right of 16-byte region [0x60200000ed70,0x60200000ed80) allocated by thread T0 here: #0 0x7f79565956b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x61cbc3 in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:204 #2 0x61cbc3 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/fuzz/exiv2/0.26/src/image.cpp:402 #3 0x622035 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/fuzz/exiv2/0.26/src/image.cpp:517 #4 0x7ea794 in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/fuzz/exiv2/0.26/src/tiffimage.cpp:348 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fuzz/exiv2/0.26/src/image.cpp:269 Exiv2::Image::byteSwap4(Exiv2::DataBuf&, unsigned long, bool) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 00 =>0x0c047fff9db0:[fa]fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9dc0: fa fa 06 fa fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9dd0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9de0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9df0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa fd fa 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==11745==ABORTING Details: https://bugzilla.redhat.com/show_bug.cgi?id=1524104
heap-based buffer over-read in Exiv2::Image::byteSwap4 (image.cpp)
https://api.github.com/repos/Exiv2/exiv2/issues/229/comments
9
"2018-02-13T09:43:29"
"2018-11-08T01:43:49Z"
https://github.com/Exiv2/exiv2/issues/229
296,671,761
229
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : heap-based buffer over-read in Exiv2::Image::byteSwap4 (image.cpp) Issue date: --- start body --- there is a heap-based buffer over-read in the Exiv2::Image::byteSwap4 function (src/image.cpp), which can be triggered by poc_0.tiff in the attachment. Note that this vulnerability exists in the exiv2 library, any software using exiv2 will be affected by this vulnerability. Remote attackers can exploit this vulnerability to disclose memory data or cause a denial of service via a crafted tiff file. As a demonstration, please run the following command-line to trigger this vulnerability: ./0.26/bin/exiv2 poc_0.tiff ================================================================= ==11745==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed80 at pc 0x000000620b4d bp 0x7ffccda7af80 sp 0x7ffccda7af70 READ of size 1 at 0x60200000ed80 thread T0 #0 0x620b4c in Exiv2::Image::byteSwap4(Exiv2::DataBuf&, unsigned long, bool) /home/fuzz/exiv2/0.26/src/image.cpp:269 #1 0x620b4c in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/fuzz/exiv2/0.26/src/image.cpp:444 #2 0x622035 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/fuzz/exiv2/0.26/src/image.cpp:517 #3 0x7ea794 in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/fuzz/exiv2/0.26/src/tiffimage.cpp:348 #4 0x7fa25d in Exiv2::TiffImage::readMetadata() /home/fuzz/exiv2/0.26/src/tiffimage.cpp:191 #5 0x4f2ea6 in Action::Print::printSummary() /home/fuzz/exiv2/0.26/src/actions.cpp:289 #6 0x4f7907 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/fuzz/exiv2/0.26/src/actions.cpp:244 #7 0x409cec in main /home/fuzz/exiv2/0.26/src/exiv2.cpp:170 #8 0x7f795525182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #9 0x48f718 in _start (/home/fuzz/exiv2/0.26/bin/exiv2+0x48f718) 0x60200000ed80 is located 0 bytes to the right of 16-byte region [0x60200000ed70,0x60200000ed80) allocated by thread T0 here: #0 0x7f79565956b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2) #1 0x61cbc3 in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:204 #2 0x61cbc3 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/fuzz/exiv2/0.26/src/image.cpp:402 #3 0x622035 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/fuzz/exiv2/0.26/src/image.cpp:517 #4 0x7ea794 in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/fuzz/exiv2/0.26/src/tiffimage.cpp:348 SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fuzz/exiv2/0.26/src/image.cpp:269 Exiv2::Image::byteSwap4(Exiv2::DataBuf&, unsigned long, bool) Shadow bytes around the buggy address: 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c047fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 00 00 =>0x0c047fff9db0:[fa]fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fd 0x0c047fff9dc0: fa fa 06 fa fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9dd0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9de0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04 0x0c047fff9df0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa fd fa 0x0c047fff9e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==11745==ABORTING Details: https://bugzilla.redhat.com/show_bug.cgi?id=1524104 --- end body --- comments : --- start comments --- --- end comments ---
4,905
208,107
[ "Exiv2", "exiv2" ]
there is a reachable assertion aborted in Exiv2::(anonymous namespace)::readHeader in bigtiffimage.cpp, which can be triggered by poc_2.tiff in the attachment. Note that this vulnerability exists in the exiv2 library, any software using exiv2 will be affected by this vulnerability. Remote attackers can exploit this vulnerability cause a denial of service via a crafted tiff file. As a demonstration, please run the following command-line to trigger this vulnerability: ./bin/exiv2 poc_2.tiff exiv2: /homes/you58/exiv2/master/src/bigtiffimage.cpp:113: Exiv2::(anonymous namespace)::Header Exiv2::(anonymous namespace)::readHeader(Exiv2::BasicIo &): Assertion `size == 8' failed. Aborted (core dumped) For details see: https://bugzilla.redhat.com/show_bug.cgi?id=1524116
assertion aborted in Exiv2::(anonymous namespace)::readHeader (bigtiffimage.cpp)
https://api.github.com/repos/Exiv2/exiv2/issues/228/comments
5
"2018-02-13T09:29:11"
"2018-02-14T15:44:23Z"
https://github.com/Exiv2/exiv2/issues/228
296,667,526
228
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : assertion aborted in Exiv2::(anonymous namespace)::readHeader (bigtiffimage.cpp) Issue date: --- start body --- there is a reachable assertion aborted in Exiv2::(anonymous namespace)::readHeader in bigtiffimage.cpp, which can be triggered by poc_2.tiff in the attachment. Note that this vulnerability exists in the exiv2 library, any software using exiv2 will be affected by this vulnerability. Remote attackers can exploit this vulnerability cause a denial of service via a crafted tiff file. As a demonstration, please run the following command-line to trigger this vulnerability: ./bin/exiv2 poc_2.tiff exiv2: /homes/you58/exiv2/master/src/bigtiffimage.cpp:113: Exiv2::(anonymous namespace)::Header Exiv2::(anonymous namespace)::readHeader(Exiv2::BasicIo &): Assertion `size == 8' failed. Aborted (core dumped) For details see: https://bugzilla.redhat.com/show_bug.cgi?id=1524116 --- end body --- comments : --- start comments --- --- end comments ---
1,040
208,108