[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/24891] New: objdump memory leaks when parsing malformed ar
From: |
vincent.ulitzsch at gmail dot com |
Subject: |
[Bug binutils/24891] New: objdump memory leaks when parsing malformed archive |
Date: |
Thu, 08 Aug 2019 00:15:53 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24891
Bug ID: 24891
Summary: objdump memory leaks when parsing malformed archive
Product: binutils
Version: 2.33 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: vincent.ulitzsch at gmail dot com
Target Milestone: ---
Created attachment 11942
--> https://sourceware.org/bugzilla/attachment.cgi?id=11942&action=edit
A file that causes the memory leak for objdump when being called like this:
objdump -x leak
objdump has several memory leaks when reading a malformed archive. The
allocations in questions seem to happen in archive.c, when opening a nested
file:
/* It's not an element of a nested archive;
open the external file as a bfd. */
n_bfd = open_nested_file (filename, archive);
The n_bdf struct has several members that are not freed, for example:
n_bfd->filename = xstrdup (filename);
Attached is a file that triggers the memory leaks. Find below an ASAN trace
that should help with debugging:
[vincent@vincent build-binutils]$ ./binutils/objdump -x
./leak-c1325380ba3eb282d0b4e376d5153c4fb4ecc5b0
In archive
../build_binutils_fuzzer/leak-c1325380ba3eb282d0b4e376d5153c4fb4ecc5b0:
�: file format tekhex
�
architecture: UNKNOWN!, flags 0x00000000:
start address 0x00000000
Sections:
Idx Name Size VMA LMA File off Algn
0 $$^A 00000000 00000000 00000000 00000000 2**0
SYMBOL TABLE:
no symbols
./binutils/objdump:
../build_binutils_fuzzer/leak-c1325380ba3eb282d0b4e376d5153c4fb4ecc5b0:
malformed archive
=================================================================
==2786==ERROR: LeakSanitizer: detected memory leaks
Indirect leak of 52832 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0xa45b3e in objalloc_create
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/objalloc.c:95:23
#2 0x6901d5 in bfd_hash_table_init_n
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/hash.c:385:28
#3 0x697d20 in _bfd_new_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:84:8
#4 0x697d83 in _bfd_new_bfd_contained_in
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:103:10
#5 0x660664 in _bfd_create_empty_archive_element_shell
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:279:10
#6 0x662edc in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:706:15
#7 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#8 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#9 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#10 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#11 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#12 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#13 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#14 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#15 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 52832 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0xa45b3e in objalloc_create
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/objalloc.c:95:23
#2 0x697c1d in _bfd_new_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:74:18
#3 0x697d83 in _bfd_new_bfd_contained_in
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:103:10
#4 0x660664 in _bfd_create_empty_archive_element_shell
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:279:10
#5 0x662edc in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:706:15
#6 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#7 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#8 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#9 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#10 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#11 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#12 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#13 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#14 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 3640 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0x693e4c in bfd_malloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/libbfd.c:275:9
#2 0x694104 in bfd_zmalloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/libbfd.c:360:15
#3 0x697b01 in _bfd_new_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:62:18
#4 0x697d83 in _bfd_new_bfd_contained_in
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:103:10
#5 0x660664 in _bfd_create_empty_archive_element_shell
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:279:10
#6 0x662edc in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:706:15
#7 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#8 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#9 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#10 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#11 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#12 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#13 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#14 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#15 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 3224 byte(s) in 13 object(s) allocated from:
#0 0x5011ae in calloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x5011ae)
#1 0x660fac in _bfd_calloc_wrapper
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:347:10
#2 0xa3ec89 in htab_create_typed_alloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/hashtab.c:360:29
#3 0xa3eba4 in htab_create_alloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/hashtab.c:285:10
#4 0x660c0a in _bfd_add_bfd_to_archive_cache
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:361:20
#5 0x663515 in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:739:7
#6 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#7 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#8 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#9 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#10 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#11 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#12 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#13 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#14 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 1534 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0x693e4c in bfd_malloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/libbfd.c:275:9
#2 0x694104 in bfd_zmalloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/libbfd.c:360:15
#3 0x661da9 in _bfd_generic_read_ar_hdr_mag
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:589:27
#4 0x660fd8 in _bfd_generic_read_ar_hdr
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:477:10
#5 0x662a54 in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:658:44
#6 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#7 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#8 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#9 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#10 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#11 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#12 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#13 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#14 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 1456 byte(s) in 13 object(s) allocated from:
#0 0x5011ae in calloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x5011ae)
#1 0x660fac in _bfd_calloc_wrapper
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:347:10
#2 0xa3ec57 in htab_create_typed_alloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/hashtab.c:357:21
#3 0xa3eba4 in htab_create_alloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/hashtab.c:285:10
#4 0x660c0a in _bfd_add_bfd_to_archive_cache
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:361:20
#5 0x663515 in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:739:7
#6 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#7 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#8 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#9 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#10 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#11 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#12 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#13 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#14 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 312 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0xa45b11 in objalloc_create
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/objalloc.c:91:29
#2 0x6901d5 in bfd_hash_table_init_n
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/hash.c:385:28
#3 0x697d20 in _bfd_new_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:84:8
#4 0x697d83 in _bfd_new_bfd_contained_in
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:103:10
#5 0x660664 in _bfd_create_empty_archive_element_shell
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:279:10
#6 0x662edc in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:706:15
#7 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#8 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#9 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#10 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#11 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#12 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#13 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#14 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#15 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 312 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0xa45b11 in objalloc_create
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/objalloc.c:91:29
#2 0x697c1d in _bfd_new_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:74:18
#3 0x697d83 in _bfd_new_bfd_contained_in
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/opncls.c:103:10
#4 0x660664 in _bfd_create_empty_archive_element_shell
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:279:10
#5 0x662edc in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:706:15
#6 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#7 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#8 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#9 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#10 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#11 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#12 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#13 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#14 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
Indirect leak of 26 byte(s) in 13 object(s) allocated from:
#0 0x500f60 in malloc
(/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/objdump+0x500f60)
#1 0xa48af7 in xmalloc
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/xmalloc.c:147:12
#2 0xa48cac in xstrdup
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/libiberty/../../libiberty/xstrdup.c:34:24
#3 0x6630f7 in _bfd_get_elt_at_filepos
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:724:25
#4 0x6641ed in bfd_generic_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:828:10
#5 0x663f62 in bfd_openr_next_archived_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:796:10
#6 0x664ad8 in bfd_generic_archive_p
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/archive.c:905:15
#7 0x68d76f in bfd_check_format_matches
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:322:14
#8 0x68c70e in bfd_check_format
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/bfd/../../bfd/format.c:94:10
#9 0x539bc9 in display_any_bfd
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4174:7
#10 0x5393c8 in display_file
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4248:3
#11 0x538be1 in main
/home/vincent/Documents/Research/fuzzing/binutils-gdb/build-binutils/binutils/../../binutils/objdump.c:4567:6
#12 0x7f8d35749f32 in __libc_start_main (/lib64/libc.so.6+0x23f32)
SUMMARY: AddressSanitizer: 116168 byte(s) leaked in 117 allocation(s).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/24891] New: objdump memory leaks when parsing malformed archive,
vincent.ulitzsch at gmail dot com <=
- [Bug binutils/24891] objdump memory leaks when parsing malformed archive, amodra at gmail dot com, 2019/08/07
- [Bug binutils/24891] objdump memory leaks when parsing malformed archive, amodra at gmail dot com, 2019/08/28
- [Bug binutils/24891] objdump memory leaks when parsing malformed archive, cvs-commit at gcc dot gnu.org, 2019/08/28
- [Bug binutils/24891] objdump memory leaks when parsing malformed archive, amodra at gmail dot com, 2019/08/28
- [Bug binutils/24891] objdump memory leaks when parsing malformed archive, amodra at gmail dot com, 2019/08/28