Hello, I found a null pointer as argument of strncpy at Action.c:718.
This can be triggered by specific command line arguments.
version: exif-0.6.22
system: ubuntu-20.04
build: with asan
POC: poc.zip
command:
./exif --no-fixup -x poc
asan
AddressSanitizer:DEADLYSIGNAL
=================================================================
==223657==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f8126ddd821 bp 0x7ffeba289580 sp 0x7ffeba288ce8 T0)
==223657==The signal is caused by a READ memory access.
==223657==Hint: address points to the zero page.
#0 0x7f8126ddd820 (/lib/x86_64-linux-gnu/libc.so.6+0x18b820)
#1 0x7f812700f5bf in __interceptor_strncpy (/lib/x86_64-linux-gnu/libasan.so.5+0xba5bf)
#2 0x55a122fb278a in show_entry_xml /home/tl455047/target/exif/exif/actions.c:718
#3 0x7f8126e8cbfe in exif_content_foreach_entry /home/tl455047/target/libexif/libexif/exif-content.c:225
#4 0x7f8126e8cbfe in exif_content_foreach_entry /home/tl455047/target/libexif/libexif/exif-content.c:216
#5 0x7f8126e98cfa in exif_data_foreach_content /home/tl455047/target/libexif/libexif/exif-data.c:1174
#6 0x7f8126e98cfa in exif_data_foreach_content /home/tl455047/target/libexif/libexif/exif-data.c:1165
#7 0x55a122fbbfba in action_tag_list_xml /home/tl455047/target/exif/exif/actions.c:747
#8 0x55a122fb09b1 in main /home/tl455047/target/exif/exif/main.c:474
#9 0x7f8126c790b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
#10 0x55a122fb0e2d in _start (/home/tl455047/target/exif/exif/exif+0xce2d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18b820)
==223657==ABORTING
Hello, I found a null pointer as argument of strncpy at Action.c:718. This can be triggered by specific command line arguments. version: exif-0.6.22 system: ubuntu-20.04 build: with asan POC: poc.zip command:
asan
without asan
gdb