FPE /home/lin/libtiff/tools/tiffcrop.c:5776 in computeOutputPixelOffsets
Summary SUMMARY: AddressSanitizer: FPE /home/lin/libtiff/tools/tiffcrop.c:5776 in computeOutputPixelOffsets
Version
➜ tiffcrop_test git:(master) ✗ ./tiffcrop -v
Library Release: LIBTIFF, Version 4.3.0
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
Tiffcrop version: 2.4, last updated: 12-13-2010
Tiffcp code: Copyright (c) 1988-1997 Sam Leffler
: Copyright (c) 1991-1997 Silicon Graphics, Inc
Tiffcrop additions: Copyright (c) 2007-2010 Richard Nolde
At branch 27f399af (libtiff version)
Steps to reproduce
git clone git@gitlab.com:libtiff/libtiff.git
cd libtiff/
./autogen.sh
./configure CC=gcc CXX=g++ CFLAGS="-g -fsanitize=address" --disable-shared & make
./tools/tiffcrop -J 10 ./poc ./out2
(How one can reproduce the issue - this is very important)
Platform
➜ libtiff git:(master) ✗ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
➜ libtiff git:(master) ✗ uname -r
5.4.0-91-generic
➜ libtiff git:(master) ✗ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
(Operating system, architecture, compiler details)
- ASAN
TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 0 (0x0) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 1 (0x1) encountered.
TIFFReadDirectory: Warning, Unknown field with tag 769 (0x301) encountered.
TIFFFetchNormalTag: Warning, IO error during reading of "DocumentName"; tag ignored.
TIFFFetchNormalTag: Warning, Incorrect count for "ResolutionUnit"; tag ignored.
TIFFAdvanceDirectory: Error fetching directory count.
Fax3DecodeRLE: Warning, Line length mismatch at line 0 of strip 0 (got 34, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 1 of strip 0 (got 34, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 2 of strip 0 (got 35, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 3 of strip 0 (got 1973, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 4 of strip 0 (got 35, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 5 of strip 0 (got 46, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 6 of strip 0 (got 47, expected 32).
Fax3DecodeRLE: Warning, Premature EOL at line 7 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 9 of strip 0 (got 2897, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 10 of strip 0 (got 46, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 11 of strip 0 (got 46, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 12 of strip 0 (got 33, expected 32).
Fax3DecodeRLE: Warning, Premature EOL at line 13 of strip 0 (got 23, expected 32).
Fax3DecodeRLE: Warning, Premature EOL at line 14 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Warning, Premature EOL at line 15 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Warning, Line length mismatch at line 16 of strip 0 (got 1812, expected 32).
Fax3DecodeRLE: Warning, Premature EOL at line 17 of strip 0 (got 15, expected 32).
Fax3DecodeRLE: Bad code word at line 18 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 18 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 19 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 19 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 20 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 20 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 21 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 21 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 22 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 22 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 23 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 23 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 24 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 24 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 25 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 25 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 26 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 26 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 27 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 27 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 28 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 28 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 29 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 29 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 30 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 30 of strip 0 (got 0, expected 32).
Fax3DecodeRLE: Bad code word at line 31 of strip 0 (x 0).
Fax3DecodeRLE: Warning, Premature EOL at line 31 of strip 0 (got 0, expected 32).
ASAN:DEADLYSIGNAL
=================================================================
==18084==ERROR: AddressSanitizer: FPE on unknown address 0x55b09b21385d (pc 0x55b09b21385d bp 0x7ffde6e57c60 sp 0x7ffde6e57bd0 T0)
#0 0x55b09b21385c in computeOutputPixelOffsets /home/lin/libtiff/tools/tiffcrop.c:5776
#1 0x55b09b1ffaf0 in main /home/lin/libtiff/tools/tiffcrop.c:2440
#2 0x7f50b8ecdbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#3 0x55b09b1f6629 in _start (/home/lin/libtiff/tools/tiffcrop+0x28629)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: FPE /home/lin/libtiff/tools/tiffcrop.c:5776 in computeOutputPixelOffsets
==18084==ABORTING
poc: POC.zip
Thanks !!