Skip to content

UBSAN failure due to left-shift of negative number in Exiv2::Internal::PentaxMakerNote::printDate #1920

Closed
@kevinbackhouse

Description

@kevinbackhouse

Found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39060

To reproduce, you need a sanitizer build:

mkdir build-asan
build-asan/
cmake -DCMAKE_BUILD_TYPE=Debug -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DEXIV2_TEAM_USE_SANITIZERS=ON ..
make
./bin/exiv2 -Pt poc.tiff

poc: poc.tar.gz

Error message:

/home/kev/work/exiv2/src/pentaxmn_int.cpp:1039:33: runtime error: left shift of negative value -1

I do not consider this a security bug, because the left shift works perfectly fine in a normal build.

Metadata

Metadata

Labels

OSS-FuzzBug reported by https://google.github.io/oss-fuzz/bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions