An invalid memory access in the decode function in iptc.cpp of Exiv2 0.27.99.0 allows attackers to cause a denial of service (DOS) via a crafted tif file.
cpe:2.3:a:exiv2:exiv2:0.27.99.0:*:*:*:*:*:*:*
B5688A15-F378-451E-9D5B-44082AC687E3
OR
POC:
[segment_poc.zip](https://github.com/Exiv2/exiv2/files/3006103/segment_poc.zip)

gdb --args ./exiv2 -pt ~/segment_poc

Program received signal SIGSEGV, Segmentation fault.
0xb7c649d6 in Exiv2::IptcParser::decode (iptcData=..., pData=<optimized out>, size=<optimized out>) at /home/rookie/exiv2-master/src/iptc.cpp:453
453	            if (*pRead++ != marker_) continue;
(gdb) bt
#0  0xb7c649d6 in Exiv2::IptcParser::decode (iptcData=..., pData=<optimized out>, size=<optimized out>) at /home/rookie/exiv2-master/src/iptc.cpp:453
#1  0xb7e49838 in Exiv2::Internal::TiffDecoder::decodeIptc (this=<optimized out>, object=0x0) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:428
#2  0xb7e46726 in decodeTiffEntry (this=<optimized out>, object=<optimized out>) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:476
#3  Exiv2::Internal::TiffDecoder::visitEntry (this=<optimized out>, object=<optimized out>) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:312
#4  0xb7e28e2a in Exiv2::Internal::TiffEntry::doAccept (this=0x80cbf00, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:895
#5  0xb7e2907a in operator* (this=<optimized out>, visitor=..., this=<optimized out>) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:890
#6  Exiv2::Internal::TiffDirectory::doAccept (this=<optimized out>, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:918
#7  0xb7e28dae in Exiv2::Internal::TiffComponent::accept (this=0x80cbd40, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:890
#8  0xb7e35f69 in Exiv2::Internal::TiffParserWorker::decode (exifData=..., iptcData=..., xmpData=..., pData=<optimized out>, size=<optimized out>, root=<optimized out>, findDecoderFct=<optimized out>, pHeader=<optimized out>)
    at /home/rookie/exiv2-master/src/tiffimage_int.cpp:1562
#9  0xb7cf54be in Exiv2::TiffImage::readMetadata (this=<optimized out>) at /home/rookie/exiv2-master/src/tiffimage.cpp:187
#10 0x0807e002 in Action::Print::printList (this=0x80cbb28) at /home/rookie/exiv2-master/src/actions.cpp:523
#11 0x08070c67 in Action::Print::run (this=0x80cbb28, path="/home/rookie/segment_poc") at /home/rookie/exiv2-master/src/actions.cpp:248
#12 0x0804dd9b in main (argc=<optimized out>, argv=<optimized out>) at /home/rookie/exiv2-master/src/exiv2.cpp:172

one invalid memory access in decode function in iptc.cpp
This is a GitHub Issue
repo:exiv2
owner:Exiv2
Title : one invalid memory access in decode function in iptc.cpp
Issue date:

--- start body ---
POC:
[segment_poc.zip](https://github.com/Exiv2/exiv2/files/3006103/segment_poc.zip)

gdb --args ./exiv2 -pt ~/segment_poc

Program received signal SIGSEGV, Segmentation fault.
0xb7c649d6 in Exiv2::IptcParser::decode (iptcData=..., pData=<optimized out>, size=<optimized out>) at /home/rookie/exiv2-master/src/iptc.cpp:453
453	            if (*pRead++ != marker_) continue;
(gdb) bt
#0  0xb7c649d6 in Exiv2::IptcParser::decode (iptcData=..., pData=<optimized out>, size=<optimized out>) at /home/rookie/exiv2-master/src/iptc.cpp:453
#1  0xb7e49838 in Exiv2::Internal::TiffDecoder::decodeIptc (this=<optimized out>, object=0x0) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:428
#2  0xb7e46726 in decodeTiffEntry (this=<optimized out>, object=<optimized out>) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:476
#3  Exiv2::Internal::TiffDecoder::visitEntry (this=<optimized out>, object=<optimized out>) at /home/rookie/exiv2-master/src/tiffvisitor_int.cpp:312
#4  0xb7e28e2a in Exiv2::Internal::TiffEntry::doAccept (this=0x80cbf00, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:895
#5  0xb7e2907a in operator* (this=<optimized out>, visitor=..., this=<optimized out>) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:890
#6  Exiv2::Internal::TiffDirectory::doAccept (this=<optimized out>, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:918
#7  0xb7e28dae in Exiv2::Internal::TiffComponent::accept (this=0x80cbd40, visitor=...) at /home/rookie/exiv2-master/src/tiffcomposite_int.cpp:890
#8  0xb7e35f69 in Exiv2::Internal::TiffParserWorker::decode (exifData=..., iptcData=..., xmpData=..., pData=<optimized out>, size=<optimized out>, root=<optimized out>, findDecoderFct=<optimized out>, pHeader=<optimized out>)
    at /home/rookie/exiv2-master/src/tiffimage_int.cpp:1562
#9  0xb7cf54be in Exiv2::TiffImage::readMetadata (this=<optimized out>) at /home/rookie/exiv2-master/src/tiffimage.cpp:187
#10 0x0807e002 in Action::Print::printList (this=0x80cbb28) at /home/rookie/exiv2-master/src/actions.cpp:523
#11 0x08070c67 in Action::Print::run (this=0x80cbb28, path="/home/rookie/segment_poc") at /home/rookie/exiv2-master/src/actions.cpp:248
#12 0x0804dd9b in main (argc=<optimized out>, argv=<optimized out>) at /home/rookie/exiv2-master/src/exiv2.cpp:172

--- end body ---

comments :
--- start comments ---

--- end comments ---