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" ]
I'm using exiv2 on macOS (High Sierra), exiv2 0.26 001a00 (64 bit build), comes from macport. First I prepare 2 images using ImagaMagick (6.9.9-26 Q16 x86_64), just do the following: ``` convert logo: logo.tif convert logo: logo.jpg ``` then, add simple xmp with exiv2. ``` exiv2 -M"set Xmp.dc.rights foo" logo.tif exiv2 -M"set Xmp.dc.rights foo" logo.jpg ``` Here is the file after adding xmp: [logo.zip](https://github.com/Exiv2/exiv2/files/1704875/logo.zip) I confirmed the raw packet is there by using `exiv2 -pX`, so far it looks no problem. Then I compile [`xmpdump.cpp`](https://github.com/Exiv2/exiv2/blob/0.26/src/xmpdump.cpp) found in your src directory, with gcc, and just execute. For jpeg image, it outputs xpacket in the file, however for tiff, it returns error: ```Caught Exiv2 exception './logo.tif: No XMP packet found in the file'``` It looks it fails to find xpacket. I think this should be worked for all supported image, but I am afraid i missed something - are there any way to explicitly specify the page, because tiff could have multiple images in one file. --- PS I checked with MSYS2 binaries (mingw-w64-x86_64-exiv2-0.26-3) on Windows 7 (64 bit), and the result are the same.
Exiv2::Image::xmpPacket() does not work for some tiff.
https://api.github.com/repos/Exiv2/exiv2/issues/226/comments
18
"2018-02-07T14:16:29"
"2018-12-09T17:58:46Z"
https://github.com/Exiv2/exiv2/issues/226
295,153,198
226
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Exiv2::Image::xmpPacket() does not work for some tiff. Issue date: --- start body --- I'm using exiv2 on macOS (High Sierra), exiv2 0.26 001a00 (64 bit build), comes from macport. First I prepare 2 images using ImagaMagick (6.9.9-26 Q16 x86_64), just do the following: ``` convert logo: logo.tif convert logo: logo.jpg ``` then, add simple xmp with exiv2. ``` exiv2 -M"set Xmp.dc.rights foo" logo.tif exiv2 -M"set Xmp.dc.rights foo" logo.jpg ``` Here is the file after adding xmp: [logo.zip](https://github.com/Exiv2/exiv2/files/1704875/logo.zip) I confirmed the raw packet is there by using `exiv2 -pX`, so far it looks no problem. Then I compile [`xmpdump.cpp`](https://github.com/Exiv2/exiv2/blob/0.26/src/xmpdump.cpp) found in your src directory, with gcc, and just execute. For jpeg image, it outputs xpacket in the file, however for tiff, it returns error: ```Caught Exiv2 exception './logo.tif: No XMP packet found in the file'``` It looks it fails to find xpacket. I think this should be worked for all supported image, but I am afraid i missed something - are there any way to explicitly specify the page, because tiff could have multiple images in one file. --- PS I checked with MSYS2 binaries (mingw-w64-x86_64-exiv2-0.26-3) on Windows 7 (64 bit), and the result are the same. --- end body --- comments : --- start comments --- --- end comments ---
1,463
208,109
[ "Exiv2", "exiv2" ]
Weekend of Saturday May 5 Venue: Robin's Home in England (I'll provide the address by private email) Objectives: The primary objective of the meeting is to get to know each other better. The secondary objective is to agree on the contents and schedule for v0.27. Attendees: Robin and Alison will provide accommodation and meals for participants and partners. If anybody wants to bring their children, I'll investigate AirBnB and the local hotel. Robin and Alison have 4 bedrooms and can stay with neighbours if we have 4 participants. If we have more than 4 participants, I'll investigate AirBnB and the local hotel. Location: We live in Camberley, Surrey. It's about 30km from Heathrow Airport. We will collect/drop-off participants at the airport. Gatwick is one hour by train from Camberley. Don't consider Luton, Stanstead or London City Airport as they are very inconvenient for Camberley. Program: Try to arrive by Friday so we have a full day together on Saturday. Monday is a public holiday in England. There is a 10K event in Camberley on Sunday. If everybody's staying until Monday, we could run on Sunday morning. Participants are welcome to stay with us before/after the meeting if want to have a vacation in England that includes the meeting. Participant's partners will be entertained by Alison while the engineers are discussing technology. The Royal Wedding on May 19 will be in Windsor which is 20km from Camberley. A walk in Windsor to see the preparations is highly likely. Camberley is 35 minutes from London by train from Brookwood Station. We'll give you a lift to/from Brookwood if partners want to visit London. I hope we have a successful meeting and enjoyable time together. Exiv2 has been a considerable burden for years and I believe the project is now ready to move into the future as a team effort. I hope this meeting will lay the foundations for a successful future.
Exiv2 Developer's Meeting [proposal]
https://api.github.com/repos/Exiv2/exiv2/issues/225/comments
3
"2018-02-03T12:51:07"
"2018-11-08T01:44:28Z"
https://github.com/Exiv2/exiv2/issues/225
294,108,551
225
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Exiv2 Developer's Meeting [proposal] Issue date: --- start body --- Weekend of Saturday May 5 Venue: Robin's Home in England (I'll provide the address by private email) Objectives: The primary objective of the meeting is to get to know each other better. The secondary objective is to agree on the contents and schedule for v0.27. Attendees: Robin and Alison will provide accommodation and meals for participants and partners. If anybody wants to bring their children, I'll investigate AirBnB and the local hotel. Robin and Alison have 4 bedrooms and can stay with neighbours if we have 4 participants. If we have more than 4 participants, I'll investigate AirBnB and the local hotel. Location: We live in Camberley, Surrey. It's about 30km from Heathrow Airport. We will collect/drop-off participants at the airport. Gatwick is one hour by train from Camberley. Don't consider Luton, Stanstead or London City Airport as they are very inconvenient for Camberley. Program: Try to arrive by Friday so we have a full day together on Saturday. Monday is a public holiday in England. There is a 10K event in Camberley on Sunday. If everybody's staying until Monday, we could run on Sunday morning. Participants are welcome to stay with us before/after the meeting if want to have a vacation in England that includes the meeting. Participant's partners will be entertained by Alison while the engineers are discussing technology. The Royal Wedding on May 19 will be in Windsor which is 20km from Camberley. A walk in Windsor to see the preparations is highly likely. Camberley is 35 minutes from London by train from Brookwood Station. We'll give you a lift to/from Brookwood if partners want to visit London. I hope we have a successful meeting and enjoyable time together. Exiv2 has been a considerable burden for years and I believe the project is now ready to move into the future as a team effort. I hope this meeting will lay the foundations for a successful future. --- end body --- comments : --- start comments --- --- end comments ---
2,143
208,110
[ "Exiv2", "exiv2" ]
http://dev.exiv2.org/issues/1334
Version 0.26 returns unwanted data from RW2 and ORF files
https://api.github.com/repos/Exiv2/exiv2/issues/220/comments
0
"2018-01-28T19:13:24"
"2018-02-03T14:20:01Z"
https://github.com/Exiv2/exiv2/issues/220
292,229,851
220
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Version 0.26 returns unwanted data from RW2 and ORF files Issue date: --- start body --- http://dev.exiv2.org/issues/1334 --- end body --- comments : --- start comments --- --- end comments ---
251
208,111
[ "Exiv2", "exiv2" ]
The past months have uncovered a number of (mostly) memory issues. These can be found quite easily via fuzzing which many volunteers have done and provided us with some valuable insight. We have been mostly patching these individually, but this does not solve the issues at the root and only on a case by case basis. The past issues mostly fall in the following categories: 1. out of bounds read/writes due to bad range checks 2. bugs due to the usage of untrusted input, like an out of bounds read due to the length of an array being extracted from an input image 3. bugs due to integer overflows I propose the following changes (further details below): 1. Replace `DataBuf` with a new container type that does not give raw access to the byte array but only via a range checked type. 2. Make the `getUShort()` functions return a quarantine type (e.g. `untrusted_t<>` or `quarantined_t<>`), that does allows for some basic handling (like arithmetics, storing) but is not convertible to the saved type. It would only be convertible to the underlying type via an explicit check. 3. Expand & optimize the overflow checked operations in `src/safe_op.hpp`. 4. Start replacing all the standard types like `long`, `int`, `long long` with fixed size (`int64_t`, `uint32_t` etc.) or other special purpose types (`size_t`, `uintptr_t`), where applicable. ### New Container Originally, I wanted to use `std::vector` & `std::array` as the new `DataBuf`, but both have a rather nasty drawback: you cannot really conveniently do this: ``` C++ const unsigned short val = getUShort(buf.data_ + 4, byteOrder); ``` It is possible to do this with iterators, but iterators are not range checked. So that would retain the same disadvantage, while making the code less readable. We could use the "standard" approach for this, by changing the API in the following way: ``` C++ usigned short getUshort(const iterator start, const iterator end, byteOrder); ``` Personally, I think that's not a good API, as it is needlessly verbose and requires more error checking (nothing prevents you from passing `end < start`) and unnecessarily more work by the programmer. Also, it's more complicated then before. Therefore, I think we should either implement our own container or a range checked iterator for `std::vector`. Although the custom container is more work, it could be beneficial, as the API could be more uniform. I was thinking about using a container and a slice type, where the container is something like `std::vector` and the slice represents a part of the vector (the slice would also only hold a pointer/reference to the container). Both would provide an `at(size_t index)` function, which would either return a reference to the requested element at `index` or throw an exception. I have experimented a bit with this and wanted to make the container as immutable as possible (i.e. length is constant & set on construction). Unfortunately this makes it impossible to use it as a class member where the length is decided later or to re-use the container with a different length, at least directly. One could achieve this indirectly by storing the container on the heap in a `unique_ptr`. Maybe a wrapper around `std::vector` would be way to go? ### Untrusted input The encapsulating type for untrusted values could be something like this: ``` C++ template <typename T> struct untrusted_t { template <typename F, int err_code> T get_value(F is_valid) { if (!is_valid(val_)) { throw Error(err_code); } return val_; } private: const T val_; }; ``` The idea is, that to actually use the saved value, you have to provide the `get_value` function with a custom check function that forces you to verify that the input is ok for further usage. With C++11 lambdas, this can be achieved like this: ``` C++ const auto extracted_length = getULong(...); const unsigned long length = extracted_length.get_value( [&io](unsigned int val) { return val < io.size(); } ); ``` In a nutshell this should prevent one from just taking input from a file before doing a sanity check while also not requiring to write the `if (cond) { throw ... ; } else { val = ... }` boilerplate. However it might be possible that we have to implement a raw getter for data where no check is possible, like the path which is saved in the image metadata. Whether this type would require arithmetic operators (which would always check for overflows) is debatable. We could of course simply save most of the metadata as `untrusted_t` thereby indicating downstream library users, that they should really check the values before using them. But then we'll break a lot of code and everybody will hate us. Any comments & suggestions are welcome.
[RFC] Code base improvements
https://api.github.com/repos/Exiv2/exiv2/issues/218/comments
3
"2018-01-24T23:20:34"
"2019-01-30T23:46:31Z"
https://github.com/Exiv2/exiv2/issues/218
291,396,070
218
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : [RFC] Code base improvements Issue date: --- start body --- The past months have uncovered a number of (mostly) memory issues. These can be found quite easily via fuzzing which many volunteers have done and provided us with some valuable insight. We have been mostly patching these individually, but this does not solve the issues at the root and only on a case by case basis. The past issues mostly fall in the following categories: 1. out of bounds read/writes due to bad range checks 2. bugs due to the usage of untrusted input, like an out of bounds read due to the length of an array being extracted from an input image 3. bugs due to integer overflows I propose the following changes (further details below): 1. Replace `DataBuf` with a new container type that does not give raw access to the byte array but only via a range checked type. 2. Make the `getUShort()` functions return a quarantine type (e.g. `untrusted_t<>` or `quarantined_t<>`), that does allows for some basic handling (like arithmetics, storing) but is not convertible to the saved type. It would only be convertible to the underlying type via an explicit check. 3. Expand & optimize the overflow checked operations in `src/safe_op.hpp`. 4. Start replacing all the standard types like `long`, `int`, `long long` with fixed size (`int64_t`, `uint32_t` etc.) or other special purpose types (`size_t`, `uintptr_t`), where applicable. ### New Container Originally, I wanted to use `std::vector` & `std::array` as the new `DataBuf`, but both have a rather nasty drawback: you cannot really conveniently do this: ``` C++ const unsigned short val = getUShort(buf.data_ + 4, byteOrder); ``` It is possible to do this with iterators, but iterators are not range checked. So that would retain the same disadvantage, while making the code less readable. We could use the "standard" approach for this, by changing the API in the following way: ``` C++ usigned short getUshort(const iterator start, const iterator end, byteOrder); ``` Personally, I think that's not a good API, as it is needlessly verbose and requires more error checking (nothing prevents you from passing `end < start`) and unnecessarily more work by the programmer. Also, it's more complicated then before. Therefore, I think we should either implement our own container or a range checked iterator for `std::vector`. Although the custom container is more work, it could be beneficial, as the API could be more uniform. I was thinking about using a container and a slice type, where the container is something like `std::vector` and the slice represents a part of the vector (the slice would also only hold a pointer/reference to the container). Both would provide an `at(size_t index)` function, which would either return a reference to the requested element at `index` or throw an exception. I have experimented a bit with this and wanted to make the container as immutable as possible (i.e. length is constant & set on construction). Unfortunately this makes it impossible to use it as a class member where the length is decided later or to re-use the container with a different length, at least directly. One could achieve this indirectly by storing the container on the heap in a `unique_ptr`. Maybe a wrapper around `std::vector` would be way to go? ### Untrusted input The encapsulating type for untrusted values could be something like this: ``` C++ template <typename T> struct untrusted_t { template <typename F, int err_code> T get_value(F is_valid) { if (!is_valid(val_)) { throw Error(err_code); } return val_; } private: const T val_; }; ``` The idea is, that to actually use the saved value, you have to provide the `get_value` function with a custom check function that forces you to verify that the input is ok for further usage. With C++11 lambdas, this can be achieved like this: ``` C++ const auto extracted_length = getULong(...); const unsigned long length = extracted_length.get_value( [&io](unsigned int val) { return val < io.size(); } ); ``` In a nutshell this should prevent one from just taking input from a file before doing a sanity check while also not requiring to write the `if (cond) { throw ... ; } else { val = ... }` boilerplate. However it might be possible that we have to implement a raw getter for data where no check is possible, like the path which is saved in the image metadata. Whether this type would require arithmetic operators (which would always check for overflows) is debatable. We could of course simply save most of the metadata as `untrusted_t` thereby indicating downstream library users, that they should really check the values before using them. But then we'll break a lot of code and everybody will hate us. Any comments & suggestions are welcome. --- end body --- comments : --- start comments --- --- end comments ---
4,996
208,112
[ "Exiv2", "exiv2" ]
On latest version of exiv2 (0.26) and the latest master branch: there is a segmentation fault caused by uncontrolled recursion of Exiv2::Image::printIFDStructure function in src/image.cpp file, which could cause a denial of service via a crafted tif file. This issue could be reproduced by command: `exiv2 $POC`. POC is available at: https://github.com/ProbeFuzzer/poc/blob/master/exiv2/exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif The stack trace is as follows: ``` ...Recursion of Exiv2::Image::printIFDStructure call... at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20679 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=2) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20680 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=1) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20681 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20682 0x00007ffff7b9df98 in Exiv2::Image::printTiffStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, depth=-1, offset=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:547 #20683 0x00007ffff7be882b in Exiv2::TiffImage::printStructure (this=0x6635b0, out=..., option=Exiv2::kpsRecursive, depth=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/tiffimage.cpp:346 #20684 0x00007ffff7be7948 in Exiv2::TiffImage::readMetadata (this=0x6635b0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/tiffimage.cpp:188 #20685 0x000000000042adde in Action::Print::printSummary (this=0x662210) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/actions.cpp:297 #20686 0x000000000042a9b3 in Action::Print::run (this=0x662210, path=...) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/actions.cpp:243 #20687 0x000000000041bfb9 in main (argc=2, argv=0x7fffffffdd88) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/exiv2.cpp:166 ```
Segmentation fault caused by uncontrolled recursion of Exiv2::Image::printIFDStructure (src/image.cpp)
https://api.github.com/repos/Exiv2/exiv2/issues/216/comments
3
"2018-01-18T05:42:05"
"2018-11-08T01:44:40Z"
https://github.com/Exiv2/exiv2/issues/216
289,511,015
216
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Segmentation fault caused by uncontrolled recursion of Exiv2::Image::printIFDStructure (src/image.cpp) Issue date: --- start body --- On latest version of exiv2 (0.26) and the latest master branch: there is a segmentation fault caused by uncontrolled recursion of Exiv2::Image::printIFDStructure function in src/image.cpp file, which could cause a denial of service via a crafted tif file. This issue could be reproduced by command: `exiv2 $POC`. POC is available at: https://github.com/ProbeFuzzer/poc/blob/master/exiv2/exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif The stack trace is as follows: ``` ...Recursion of Exiv2::Image::printIFDStructure call... at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20679 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=2) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20680 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=1) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20681 0x00007ffff7b9d6c2 in Exiv2::Image::printIFDStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, start=8, bSwap=true, c=77 'M', depth=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:468 #20682 0x00007ffff7b9df98 in Exiv2::Image::printTiffStructure (this=0x6635b0, io=..., out=..., option=Exiv2::kpsRecursive, depth=-1, offset=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/image.cpp:547 #20683 0x00007ffff7be882b in Exiv2::TiffImage::printStructure (this=0x6635b0, out=..., option=Exiv2::kpsRecursive, depth=0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/tiffimage.cpp:346 #20684 0x00007ffff7be7948 in Exiv2::TiffImage::readMetadata (this=0x6635b0) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/tiffimage.cpp:188 #20685 0x000000000042adde in Action::Print::printSummary (this=0x662210) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/actions.cpp:297 #20686 0x000000000042a9b3 in Action::Print::run (this=0x662210, path=...) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/actions.cpp:243 #20687 0x000000000041bfb9 in main (argc=2, argv=0x7fffffffdd88) at /u/youwei/ProbeFuzzer/product/exiv2/patch/src/src/exiv2.cpp:166 ``` --- end body --- comments : --- start comments --- --- end comments ---
2,580
208,113
[ "Exiv2", "exiv2" ]
First of all thanks for the excellent library (I've been fixing some bugs as well in v0.25 when it wasn't hosted at GitHub). Though it is a speculative topic I would like to register this issue because maybe there would be interest from other members of the community in the same thing. So what I would like to request is either providing exiv2 library as dual-licensed with some permissive license like Apache, MIT or BSD or relicense it to be provided under this license. I've switched to MIT permissive license for [my project](https://github.com/ribtoks/xpiks/) (because of religious conflicts with GPL) and I cannot use exiv2 library anymore, because it's GPLv2. I believe that this also will make it even more popular and will allow people like me to contribute into it again/too (well, that was the reason to move to GitHub - to get some more visibility for this project). Thanks
Permissive license
https://api.github.com/repos/Exiv2/exiv2/issues/215/comments
16
"2018-01-16T13:27:19"
"2021-01-12T13:15:07Z"
https://github.com/Exiv2/exiv2/issues/215
288,906,230
215
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Permissive license Issue date: --- start body --- First of all thanks for the excellent library (I've been fixing some bugs as well in v0.25 when it wasn't hosted at GitHub). Though it is a speculative topic I would like to register this issue because maybe there would be interest from other members of the community in the same thing. So what I would like to request is either providing exiv2 library as dual-licensed with some permissive license like Apache, MIT or BSD or relicense it to be provided under this license. I've switched to MIT permissive license for [my project](https://github.com/ribtoks/xpiks/) (because of religious conflicts with GPL) and I cannot use exiv2 library anymore, because it's GPLv2. I believe that this also will make it even more popular and will allow people like me to contribute into it again/too (well, that was the reason to move to GitHub - to get some more visibility for this project). Thanks --- end body --- comments : --- start comments --- --- end comments ---
1,077
208,114
[ "Exiv2", "exiv2" ]
@clanmills suggested in #46 that we should move to C++11 for 0.27. Things we should consider before the move: 1. For which platforms will we drop support by that? C++11 is fully supported by gcc >= 4.8.1, clang >= 3.3 and msvc probably >= 2015 (msvc supports some features already since 2010, but some like noexcept, are not supported by msvc < 2015). 2. Are all our dependencies compatible with C++11? expat, zlib, curl, libssh are written in C, so they are fine. I am however not sure about the XMP SDK. I haven't found any information about this and thus I am afraid this will be more work. 3. Will this be a problem for projects using exiv2? The KDE & GNOME projects both use exiv2. Afaik KDE uses C++11, GNOME maybe too? Anyway, we should probably ask a bit around before moving on, as we don't want projects using 0.26 for longer than necessary Here is my list what we should do for C++11 support: - [x] drop `auto_ptr` and replace it with `unique_ptr` or `shared_ptr` (see #257) - [x] replace the current method how we prevent some classes from being copied (declare a private copy constructor & `operator=()`) with the `classname(const classname&) = delete` (and the same for the move constructor) (see #697) - [x] remove any `throw()` or `throw(something_t)` from the code and replace the former with `noexcept`, generally we should add `noexcept` to all functions that will not throw - [ ] make some constructors `constexpr` & introduce `static_assert` where applicable - [x] Use `nullptr` instead of `NULL` - [ ] Switch to the using directive for inherited functions (especially in `slices.hpp`) - [ ] Introduce variadic templates where appropriate (`enforce.hpp`, Constructors of `BasicError`)
Migration to C++11
https://api.github.com/repos/Exiv2/exiv2/issues/214/comments
24
"2018-01-15T22:06:53"
"2021-04-13T14:16:57Z"
https://github.com/Exiv2/exiv2/issues/214
288,728,489
214
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Migration to C++11 Issue date: --- start body --- @clanmills suggested in #46 that we should move to C++11 for 0.27. Things we should consider before the move: 1. For which platforms will we drop support by that? C++11 is fully supported by gcc >= 4.8.1, clang >= 3.3 and msvc probably >= 2015 (msvc supports some features already since 2010, but some like noexcept, are not supported by msvc < 2015). 2. Are all our dependencies compatible with C++11? expat, zlib, curl, libssh are written in C, so they are fine. I am however not sure about the XMP SDK. I haven't found any information about this and thus I am afraid this will be more work. 3. Will this be a problem for projects using exiv2? The KDE & GNOME projects both use exiv2. Afaik KDE uses C++11, GNOME maybe too? Anyway, we should probably ask a bit around before moving on, as we don't want projects using 0.26 for longer than necessary Here is my list what we should do for C++11 support: - [x] drop `auto_ptr` and replace it with `unique_ptr` or `shared_ptr` (see #257) - [x] replace the current method how we prevent some classes from being copied (declare a private copy constructor & `operator=()`) with the `classname(const classname&) = delete` (and the same for the move constructor) (see #697) - [x] remove any `throw()` or `throw(something_t)` from the code and replace the former with `noexcept`, generally we should add `noexcept` to all functions that will not throw - [ ] make some constructors `constexpr` & introduce `static_assert` where applicable - [x] Use `nullptr` instead of `NULL` - [ ] Switch to the using directive for inherited functions (especially in `slices.hpp`) - [ ] Introduce variadic templates where appropriate (`enforce.hpp`, Constructors of `BasicError`) --- end body --- comments : --- start comments --- --- end comments ---
1,903
208,115
[ "Exiv2", "exiv2" ]
http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-003.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` =3015==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000d3d6 at pc 0x7f457e3fc981 bp 0x7ffc19b9b000 sp 0x7ffc19b9aff8 READ of size 1 at 0x60300000d3d6 thread T0 #0 0x7f457e3fc980 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) /home/hsalo/src/exiv2/src/types.cpp:234 #1 0x7f457e14fbb2 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:361 #2 0x7f457e12d441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #3 0x7f457e12f602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #4 0x7f457e3b9eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #5 0x7f457e3b79c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #6 0x55cf127a7ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #7 0x55cf127ac077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #8 0x55cf1274287b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #9 0x7f457d1812b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #10 0x55cf12743729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60300000d3d6 is located 0 bytes to the right of 22-byte region [0x60300000d3c0,0x60300000d3d6) allocated by thread T0 here: #0 0x7f457f03cd70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7f457e12d358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7f457e12f602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7f457e3b9eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7f457e3b79c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x55cf127a7ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x55cf127ac077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x55cf1274287b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7f457d1812b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/types.cpp:234 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c067fff9a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff9a70: fa fa fa fa fa fa fa fa 00 00[06]fa fa fa fd fd 0x0c067fff9a80: fd fd fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c067fff9a90: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c067fff9aa0: fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 0x0c067fff9ab0: 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 0x0c067fff9ac0: 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 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 ==3015==ABORTING ```
heap-buffer-overflow src/types.cpp:234 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder)
https://api.github.com/repos/Exiv2/exiv2/issues/211/comments
1
"2018-01-09T21:25:31"
"2018-11-08T01:44:55Z"
https://github.com/Exiv2/exiv2/issues/211
287,235,550
211
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : heap-buffer-overflow src/types.cpp:234 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) Issue date: --- start body --- http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-003.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` =3015==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000d3d6 at pc 0x7f457e3fc981 bp 0x7ffc19b9b000 sp 0x7ffc19b9aff8 READ of size 1 at 0x60300000d3d6 thread T0 #0 0x7f457e3fc980 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) /home/hsalo/src/exiv2/src/types.cpp:234 #1 0x7f457e14fbb2 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:361 #2 0x7f457e12d441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #3 0x7f457e12f602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #4 0x7f457e3b9eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #5 0x7f457e3b79c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #6 0x55cf127a7ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #7 0x55cf127ac077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #8 0x55cf1274287b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #9 0x7f457d1812b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #10 0x55cf12743729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60300000d3d6 is located 0 bytes to the right of 22-byte region [0x60300000d3c0,0x60300000d3d6) allocated by thread T0 here: #0 0x7f457f03cd70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7f457e12d358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7f457e12f602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7f457e3b9eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7f457e3b79c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x55cf127a7ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x55cf127ac077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x55cf1274287b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7f457d1812b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/types.cpp:234 in Exiv2::getUShort(unsigned char const*, Exiv2::ByteOrder) Shadow bytes around the buggy address: 0x0c067fff9a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff9a70: fa fa fa fa fa fa fa fa 00 00[06]fa fa fa fd fd 0x0c067fff9a80: fd fd fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c067fff9a90: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c067fff9aa0: fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 0x0c067fff9ab0: 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 0x0c067fff9ac0: 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 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 ==3015==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
4,927
208,116
[ "Exiv2", "exiv2" ]
http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-002.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` ==19325==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed51 at pc 0x7fe10ee7e1fe bp 0x7ffd661baac0 sp 0x7ffd661baab8 READ of size 1 at 0x60200000ed51 thread T0 #0 0x7fe10ee7e1fd in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:354 #1 0x7fe10ee5b441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #2 0x7fe10ee5d602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fe10f0e7eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fe10f0e59c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x563547182ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x563547187077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x56354711d87b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fe10deaf2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #9 0x56354711e729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60200000ed51 is located 0 bytes to the right of 1-byte region [0x60200000ed50,0x60200000ed51) allocated by thread T0 here: #0 0x7fe10fd6ad70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7fe10ee5b358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7fe10ee5d602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fe10f0e7eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fe10f0e59c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x563547182ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x563547187077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x56354711d87b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fe10deaf2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/iptc.cpp:354 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) Shadow bytes around the buggy address: 0x0c047fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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[01]fa fa fa fd fd 0x0c047fff9db0: fa fa fd fa fa fa 00 fa fa fa 00 fa fa fa 00 fa 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 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 ```
CVE-2017-17724: heap-buffer-overflow src/iptc.cpp:354 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int)
https://api.github.com/repos/Exiv2/exiv2/issues/210/comments
11
"2018-01-09T21:21:01"
"2018-11-08T01:45:09Z"
https://github.com/Exiv2/exiv2/issues/210
287,234,334
210
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2017-17724: heap-buffer-overflow src/iptc.cpp:354 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) Issue date: --- start body --- http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-002.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` ==19325==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ed51 at pc 0x7fe10ee7e1fe bp 0x7ffd661baac0 sp 0x7ffd661baab8 READ of size 1 at 0x60200000ed51 thread T0 #0 0x7fe10ee7e1fd in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:354 #1 0x7fe10ee5b441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #2 0x7fe10ee5d602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fe10f0e7eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fe10f0e59c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x563547182ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x563547187077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x56354711d87b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fe10deaf2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #9 0x56354711e729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60200000ed51 is located 0 bytes to the right of 1-byte region [0x60200000ed50,0x60200000ed51) allocated by thread T0 here: #0 0x7fe10fd6ad70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7fe10ee5b358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7fe10ee5d602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fe10f0e7eeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fe10f0e59c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x563547182ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x563547187077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x56354711d87b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fe10deaf2b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/iptc.cpp:354 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) Shadow bytes around the buggy address: 0x0c047fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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[01]fa fa fa fd fd 0x0c047fff9db0: fa fa fd fa fa fa 00 fa fa fa 00 fa fa fa 00 fa 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 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 ``` --- end body --- comments : --- start comments --- --- end comments ---
4,882
208,117
[ "Exiv2", "exiv2" ]
http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-002.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` =15745==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000d3d6 at pc 0x7fc0828a11dd bp 0x7ffeb52c1950 sp 0x7ffeb52c1948 READ of size 1 at 0x60300000d3d6 thread T0 #0 0x7fc0828a11dc in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:1031 #1 0x7fc0828d3c70 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:364 #2 0x7fc0828b1441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #3 0x7fc0828b3602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #4 0x7fc082b3deeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #5 0x7fc082b3b9c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #6 0x556bd42d8ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #7 0x556bd42dd077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #8 0x556bd427387b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #9 0x7fc0819052b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #10 0x556bd4274729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60300000d3d6 is located 0 bytes to the right of 22-byte region [0x60300000d3c0,0x60300000d3d6) allocated by thread T0 here: #0 0x7fc0837c0d70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7fc0828b1358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7fc0828b3602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fc082b3deeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fc082b3b9c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x556bd42d8ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x556bd42dd077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x556bd427387b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fc0819052b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/image.cpp:1031 in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long) Shadow bytes around the buggy address: 0x0c067fff9a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff9a70: fa fa fa fa fa fa fa fa 00 00[06]fa fa fa fd fd 0x0c067fff9a80: fd fd fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c067fff9a90: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c067fff9aa0: fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 0x0c067fff9ab0: 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 0x0c067fff9ac0: 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 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 ==15745==ABORTING ```
heap-buffer-overflow exiv2/src/image.cpp:1031 in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long)
https://api.github.com/repos/Exiv2/exiv2/issues/209/comments
8
"2018-01-09T21:13:16"
"2018-11-08T01:45:23Z"
https://github.com/Exiv2/exiv2/issues/209
287,232,206
209
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : heap-buffer-overflow exiv2/src/image.cpp:1031 in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long) Issue date: --- start body --- http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-002.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` =15745==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300000d3d6 at pc 0x7fc0828a11dd bp 0x7ffeb52c1950 sp 0x7ffeb52c1948 READ of size 1 at 0x60300000d3d6 thread T0 #0 0x7fc0828a11dc in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:1031 #1 0x7fc0828d3c70 in Exiv2::IptcData::printStructure(std::ostream&, unsigned char const*, unsigned long, unsigned int) /home/hsalo/src/exiv2/src/iptc.cpp:364 #2 0x7fc0828b1441 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:470 #3 0x7fc0828b3602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #4 0x7fc082b3deeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #5 0x7fc082b3b9c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #6 0x556bd42d8ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #7 0x556bd42dd077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #8 0x556bd427387b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #9 0x7fc0819052b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #10 0x556bd4274729 in _start (/home/hsalo/builds/exiv2/2018-01-08/bin/exiv2+0x12729) 0x60300000d3d6 is located 0 bytes to the right of 22-byte region [0x60300000d3c0,0x60300000d3d6) allocated by thread T0 here: #0 0x7fc0837c0d70 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc2d70) #1 0x7fc0828b1358 in Exiv2::Image::printIFDStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, unsigned int, bool, char, int) /home/hsalo/src/exiv2/src/image.cpp:467 #2 0x7fc0828b3602 in Exiv2::Image::printTiffStructure(Exiv2::BasicIo&, std::ostream&, Exiv2::PrintStructureOption, int, unsigned long) /home/hsalo/src/exiv2/src/image.cpp:533 #3 0x7fc082b3deeb in Exiv2::TiffImage::printStructure(std::ostream&, Exiv2::PrintStructureOption, int) /home/hsalo/src/exiv2/src/tiffimage.cpp:344 #4 0x7fc082b3b9c4 in Exiv2::TiffImage::readMetadata() /home/hsalo/src/exiv2/src/tiffimage.cpp:187 #5 0x556bd42d8ad6 in Action::Print::printSummary() /home/hsalo/src/exiv2/src/actions.cpp:296 #6 0x556bd42dd077 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/hsalo/src/exiv2/src/actions.cpp:242 #7 0x556bd427387b in main /home/hsalo/src/exiv2/src/exiv2.cpp:166 #8 0x7fc0819052b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/hsalo/src/exiv2/src/image.cpp:1031 in Exiv2::Internal::binaryToString[abi:cxx11](unsigned char const*, unsigned long, unsigned long) Shadow bytes around the buggy address: 0x0c067fff9a20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c067fff9a60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c067fff9a70: fa fa fa fa fa fa fa fa 00 00[06]fa fa fa fd fd 0x0c067fff9a80: fd fd fa fa fd fd fd fa fa fa fd fd fd fa fa fa 0x0c067fff9a90: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fa 0x0c067fff9aa0: fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 0x0c067fff9ab0: 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 fa fa 0x0c067fff9ac0: 00 00 00 07 fa fa 00 00 00 07 fa fa 00 00 00 07 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 ==15745==ABORTING ``` --- end body --- comments : --- start comments --- --- end comments ---
5,052
208,118
[ "Exiv2", "exiv2" ]
http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-001.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` exiv2: bigtiffimage.cpp:113: Exiv2::{anonymous}::Header Exiv2::{anonymous}::readHeader(Exiv2::BasicIo&): Assertion `size == 8' failed. Aborted ```
CVE-2017-17722: exiv2: bigtiffimage.cpp:113: Exiv2::{anonymous}::Header Exiv2::{anonymous}::readHeader(Exiv2::BasicIo&): Assertion `size == 8' failed.
https://api.github.com/repos/Exiv2/exiv2/issues/208/comments
3
"2018-01-09T21:09:53"
"2018-11-08T01:45:46Z"
https://github.com/Exiv2/exiv2/issues/208
287,231,269
208
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2017-17722: exiv2: bigtiffimage.cpp:113: Exiv2::{anonymous}::Header Exiv2::{anonymous}::readHeader(Exiv2::BasicIo&): Assertion `size == 8' failed. Issue date: --- start body --- http://bugs.fi/media/afl/exiv2/2018-01-09-exiv2-crash-001.tiff 4be065595e4b81e876e32c9c4705f8313f896d43 ``` exiv2: bigtiffimage.cpp:113: Exiv2::{anonymous}::Header Exiv2::{anonymous}::readHeader(Exiv2::BasicIo&): Assertion `size == 8' failed. Aborted ``` --- end body --- comments : --- start comments --- --- end comments ---
572
208,119
[ "Exiv2", "exiv2" ]
Hi I try to create a conan recipe for a huge library from sources and have space problem on C:\ so the build may take multiple calls to nmake(through cmake) in order to be build completely. Is there a way the resume package creation without purging work already done? i know the -k for create option to avoid gitcloning sources but is there the same for install to prevent copy source to cache and restart the whole building process?
How to resume a fail build
https://api.github.com/repos/Exiv2/exiv2/issues/206/comments
1
"2018-01-09T17:18:43"
"2018-01-09T17:23:42Z"
https://github.com/Exiv2/exiv2/issues/206
287,166,036
206
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : How to resume a fail build Issue date: --- start body --- Hi I try to create a conan recipe for a huge library from sources and have space problem on C:\ so the build may take multiple calls to nmake(through cmake) in order to be build completely. Is there a way the resume package creation without purging work already done? i know the -k for create option to avoid gitcloning sources but is there the same for install to prevent copy source to cache and restart the whole building process? --- end body --- comments : --- start comments --- --- end comments ---
629
208,120
[ "Exiv2", "exiv2" ]
When investigating #201, I was wondering why the compiler did not complain about shadowing, although I enabled the extra warnings via `cmake -DEXIV2_TEAM_EXTRA_WARNINGS=ON`. As it turns out, the extra warnings are not added to the internal sources (I think so, `src/pentaxmn_int.cpp` did not get them), the xmpsdk and also the executables like `exiv2` and `exiv2json`. Adding the warnings via the envirnoment variable `CXXFLAGS` works on the other hand. I have glanced over the cmake files, but I have no clue where the issue is.
Exiv2 team warnings are not added to all source files
https://api.github.com/repos/Exiv2/exiv2/issues/204/comments
0
"2018-01-05T23:36:04"
"2018-03-29T11:17:26Z"
https://github.com/Exiv2/exiv2/issues/204
286,434,908
204
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : Exiv2 team warnings are not added to all source files Issue date: --- start body --- When investigating #201, I was wondering why the compiler did not complain about shadowing, although I enabled the extra warnings via `cmake -DEXIV2_TEAM_EXTRA_WARNINGS=ON`. As it turns out, the extra warnings are not added to the internal sources (I think so, `src/pentaxmn_int.cpp` did not get them), the xmpsdk and also the executables like `exiv2` and `exiv2json`. Adding the warnings via the envirnoment variable `CXXFLAGS` works on the other hand. I have glanced over the cmake files, but I have no clue where the issue is. --- end body --- comments : --- start comments --- --- end comments ---
743
208,121
[ "Exiv2", "exiv2" ]
version: exiv2 0.26 001a00 (64 bit build) ./exiv2 ./poc ### when memory not enough output this error found by afl ``` ==103308==ERROR: AddressSanitizer failed to allocate 0xff803000 (4286590976) bytes of LargeMmapAllocator (errno: 12) ==103308==Process memory map follows: 0x000000400000-0x000000e49000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x000001049000-0x00000104a000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x00000104a000-0x00000113a000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x00000113a000-0x000001159000 0x00007fff7000-0x00008fff7000 0x00008fff7000-0x02008fff7000 0x02008fff7000-0x10007fff8000 0x600000000000-0x602000000000 0x602000000000-0x602000010000 0x602000010000-0x603000000000 0x603000000000-0x603000010000 0x603000010000-0x604000000000 0x604000000000-0x604000010000 0x604000010000-0x606000000000 0x606000000000-0x606000010000 0x606000010000-0x607000000000 0x607000000000-0x607000010000 0x607000010000-0x608000000000 0x608000000000-0x608000010000 0x608000010000-0x60b000000000 0x60b000000000-0x60b000010000 0x60b000010000-0x60c000000000 0x60c000000000-0x60c000010000 0x60c000010000-0x60f000000000 0x60f000000000-0x60f000010000 0x60f000010000-0x610000000000 0x610000000000-0x610000010000 0x610000010000-0x611000000000 0x611000000000-0x611000010000 0x611000010000-0x612000000000 0x612000000000-0x612000010000 0x612000010000-0x614000000000 0x614000000000-0x614000020000 0x614000020000-0x616000000000 0x616000000000-0x616000020000 0x616000020000-0x618000000000 0x618000000000-0x618000020000 0x618000020000-0x619000000000 0x619000000000-0x619000020000 0x619000020000-0x621000000000 0x621000000000-0x621000020000 0x621000020000-0x624000000000 0x624000000000-0x624000020000 0x624000020000-0x631000000000 0x631000000000-0x631000030000 0x631000030000-0x640000000000 0x640000000000-0x640000003000 0x7f08fb328000-0x7f08fb600000 /usr/lib/locale/locale-archive 0x7f08fb600000-0x7f08fb700000 0x7f08fb800000-0x7f08fb900000 0x7f08fb9aa000-0x7f08fdcfc000 0x7f08fdcfc000-0x7f08fdcff000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdcff000-0x7f08fdefe000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdefe000-0x7f08fdeff000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdeff000-0x7f08fdf00000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdf00000-0x7f08fe0c0000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe0c0000-0x7f08fe2c0000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c0000-0x7f08fe2c4000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c4000-0x7f08fe2c6000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c6000-0x7f08fe2ca000 0x7f08fe2ca000-0x7f08fe2e0000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe2e0000-0x7f08fe4df000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe4df000-0x7f08fe4e0000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe4e0000-0x7f08fe5e8000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe5e8000-0x7f08fe7e7000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e7000-0x7f08fe7e8000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e8000-0x7f08fe7e9000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e9000-0x7f08fe95b000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08fe95b000-0x7f08feb5b000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb5b000-0x7f08feb65000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb65000-0x7f08feb67000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb67000-0x7f08feb6b000 0x7f08feb6b000-0x7f08feb83000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08feb83000-0x7f08fed82000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed82000-0x7f08fed83000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed83000-0x7f08fed84000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed84000-0x7f08fed88000 0x7f08fed88000-0x7f08fedae000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fedae000-0x7f08fefae000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefae000-0x7f08fefb0000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefb0000-0x7f08fefb1000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefb1000-0x7f08fefca000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08fefca000-0x7f08ff1c9000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1c9000-0x7f08ff1ca000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1ca000-0x7f08ff1cb000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1cb000-0x7f08ff2bf000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff2bf000-0x7f08ff4bf000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4bf000-0x7f08ff4c2000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4c2000-0x7f08ff4c3000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4c3000-0x7f0900138000 0x7f0900138000-0x7f090015e000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f09002c3000-0x7f0900352000 0x7f0900352000-0x7f090035d000 0x7f090035d000-0x7f090035e000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f090035e000-0x7f090035f000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f090035f000-0x7f0900360000 0x7ffd1d376000-0x7ffd1d397000 [stack] 0x7ffd1d3a9000-0x7ffd1d3ab000 [vvar] 0x7ffd1d3ab000-0x7ffd1d3ad000 [vdso] 0xffffffffff600000-0xffffffffff601000 [vsyscall] ==103308==End of process memory map. ==103308==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix.cc:121 "(("unable to mmap" && 0)) != (0)" (0x0, 0x0) #0 0x7f08ff26b631 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa0631) #1 0x7f08ff270613 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa5613) #2 0x7f08ff278641 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xad641) #3 0x7f08ff1edc0c (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x22c0c) #4 0x7f08ff26467e in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9967e) #5 0x67831a in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:206 #6 0x67831a in Exiv2::Jp2Image::readMetadata() /home/fuzz/fuzz/exiv2/src/jp2image.cpp:271 #7 0x4f572c in Action::Print::printSummary() /home/fuzz/fuzz/exiv2/src/actions.cpp:296 #8 0x4f9dc7 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/fuzz/fuzz/exiv2/src/actions.cpp:242 #9 0x40a18c in main /home/fuzz/fuzz/exiv2/src/exiv2.cpp:166 #10 0x7f08fdf2082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #11 0x490c38 in _start (/home/fuzz/fuzz/exiv2/bin/exiv2+0x490c38) ``` testcase: https://github.com/xcainiao/poc/blob/master/exiv2-memorymmap-error found : topsecLab
CVE-2018-4868: LargeMmapAllocator error in sanitizer_posix.cc
https://api.github.com/repos/Exiv2/exiv2/issues/202/comments
12
"2018-01-01T13:58:07"
"2019-03-09T22:55:11Z"
https://github.com/Exiv2/exiv2/issues/202
285,308,726
202
This is a GitHub Issue repo:exiv2 owner:Exiv2 Title : CVE-2018-4868: LargeMmapAllocator error in sanitizer_posix.cc Issue date: --- start body --- version: exiv2 0.26 001a00 (64 bit build) ./exiv2 ./poc ### when memory not enough output this error found by afl ``` ==103308==ERROR: AddressSanitizer failed to allocate 0xff803000 (4286590976) bytes of LargeMmapAllocator (errno: 12) ==103308==Process memory map follows: 0x000000400000-0x000000e49000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x000001049000-0x00000104a000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x00000104a000-0x00000113a000 /home/fuzz/fuzz/exiv2/bin/exiv2 0x00000113a000-0x000001159000 0x00007fff7000-0x00008fff7000 0x00008fff7000-0x02008fff7000 0x02008fff7000-0x10007fff8000 0x600000000000-0x602000000000 0x602000000000-0x602000010000 0x602000010000-0x603000000000 0x603000000000-0x603000010000 0x603000010000-0x604000000000 0x604000000000-0x604000010000 0x604000010000-0x606000000000 0x606000000000-0x606000010000 0x606000010000-0x607000000000 0x607000000000-0x607000010000 0x607000010000-0x608000000000 0x608000000000-0x608000010000 0x608000010000-0x60b000000000 0x60b000000000-0x60b000010000 0x60b000010000-0x60c000000000 0x60c000000000-0x60c000010000 0x60c000010000-0x60f000000000 0x60f000000000-0x60f000010000 0x60f000010000-0x610000000000 0x610000000000-0x610000010000 0x610000010000-0x611000000000 0x611000000000-0x611000010000 0x611000010000-0x612000000000 0x612000000000-0x612000010000 0x612000010000-0x614000000000 0x614000000000-0x614000020000 0x614000020000-0x616000000000 0x616000000000-0x616000020000 0x616000020000-0x618000000000 0x618000000000-0x618000020000 0x618000020000-0x619000000000 0x619000000000-0x619000020000 0x619000020000-0x621000000000 0x621000000000-0x621000020000 0x621000020000-0x624000000000 0x624000000000-0x624000020000 0x624000020000-0x631000000000 0x631000000000-0x631000030000 0x631000030000-0x640000000000 0x640000000000-0x640000003000 0x7f08fb328000-0x7f08fb600000 /usr/lib/locale/locale-archive 0x7f08fb600000-0x7f08fb700000 0x7f08fb800000-0x7f08fb900000 0x7f08fb9aa000-0x7f08fdcfc000 0x7f08fdcfc000-0x7f08fdcff000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdcff000-0x7f08fdefe000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdefe000-0x7f08fdeff000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdeff000-0x7f08fdf00000 /lib/x86_64-linux-gnu/libdl-2.23.so 0x7f08fdf00000-0x7f08fe0c0000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe0c0000-0x7f08fe2c0000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c0000-0x7f08fe2c4000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c4000-0x7f08fe2c6000 /lib/x86_64-linux-gnu/libc-2.23.so 0x7f08fe2c6000-0x7f08fe2ca000 0x7f08fe2ca000-0x7f08fe2e0000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe2e0000-0x7f08fe4df000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe4df000-0x7f08fe4e0000 /lib/x86_64-linux-gnu/libgcc_s.so.1 0x7f08fe4e0000-0x7f08fe5e8000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe5e8000-0x7f08fe7e7000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e7000-0x7f08fe7e8000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e8000-0x7f08fe7e9000 /lib/x86_64-linux-gnu/libm-2.23.so 0x7f08fe7e9000-0x7f08fe95b000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08fe95b000-0x7f08feb5b000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb5b000-0x7f08feb65000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb65000-0x7f08feb67000 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 0x7f08feb67000-0x7f08feb6b000 0x7f08feb6b000-0x7f08feb83000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08feb83000-0x7f08fed82000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed82000-0x7f08fed83000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed83000-0x7f08fed84000 /lib/x86_64-linux-gnu/libpthread-2.23.so 0x7f08fed84000-0x7f08fed88000 0x7f08fed88000-0x7f08fedae000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fedae000-0x7f08fefae000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefae000-0x7f08fefb0000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefb0000-0x7f08fefb1000 /lib/x86_64-linux-gnu/libexpat.so.1.6.0 0x7f08fefb1000-0x7f08fefca000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08fefca000-0x7f08ff1c9000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1c9000-0x7f08ff1ca000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1ca000-0x7f08ff1cb000 /lib/x86_64-linux-gnu/libz.so.1.2.8 0x7f08ff1cb000-0x7f08ff2bf000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff2bf000-0x7f08ff4bf000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4bf000-0x7f08ff4c2000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4c2000-0x7f08ff4c3000 /usr/lib/x86_64-linux-gnu/libasan.so.2.0.0 0x7f08ff4c3000-0x7f0900138000 0x7f0900138000-0x7f090015e000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f09002c3000-0x7f0900352000 0x7f0900352000-0x7f090035d000 0x7f090035d000-0x7f090035e000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f090035e000-0x7f090035f000 /lib/x86_64-linux-gnu/ld-2.23.so 0x7f090035f000-0x7f0900360000 0x7ffd1d376000-0x7ffd1d397000 [stack] 0x7ffd1d3a9000-0x7ffd1d3ab000 [vvar] 0x7ffd1d3ab000-0x7ffd1d3ad000 [vdso] 0xffffffffff600000-0xffffffffff601000 [vsyscall] ==103308==End of process memory map. ==103308==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_posix.cc:121 "(("unable to mmap" && 0)) != (0)" (0x0, 0x0) #0 0x7f08ff26b631 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa0631) #1 0x7f08ff270613 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa5613) #2 0x7f08ff278641 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xad641) #3 0x7f08ff1edc0c (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x22c0c) #4 0x7f08ff26467e in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9967e) #5 0x67831a in Exiv2::DataBuf::DataBuf(long) ../include/exiv2/types.hpp:206 #6 0x67831a in Exiv2::Jp2Image::readMetadata() /home/fuzz/fuzz/exiv2/src/jp2image.cpp:271 #7 0x4f572c in Action::Print::printSummary() /home/fuzz/fuzz/exiv2/src/actions.cpp:296 #8 0x4f9dc7 in Action::Print::run(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/fuzz/fuzz/exiv2/src/actions.cpp:242 #9 0x40a18c in main /home/fuzz/fuzz/exiv2/src/exiv2.cpp:166 #10 0x7f08fdf2082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #11 0x490c38 in _start (/home/fuzz/fuzz/exiv2/bin/exiv2+0x490c38) ``` testcase: https://github.com/xcainiao/poc/blob/master/exiv2-memorymmap-error found : topsecLab --- end body --- comments : --- start comments --- --- end comments ---
6,775
208,122