Attached file will cause an invalid read access in bsdtar. Can be seen with
address sanitizer.
==30629==ERROR: AddressSanitizer: global-buffer-overflow on address
0x000000847ce2 at pc 0x43a436 bp 0x7fff284b4830 sp 0x7fff284b4820
READ of size 6 at 0x000000847ce2 thread T0
#0 0x43a435 in ae_strtofflags libarchive/archive_entry.c:1753
#1 0x43a435 in archive_entry_copy_fflags_text libarchive/archive_entry.c:808
#2 0x577450 in parse_keyword libarchive/archive_read_support_format_mtree.c:1474
#3 0x5795d4 in parse_line libarchive/archive_read_support_format_mtree.c:1315
#4 0x5795d4 in parse_file libarchive/archive_read_support_format_mtree.c:1094
#5 0x5795d4 in read_header libarchive/archive_read_support_format_mtree.c:1061
#6 0x46c4d2 in _archive_read_next_header2 libarchive/archive_read.c:645
#7 0x46c4d2 in _archive_read_next_header libarchive/archive_read.c:685
#8 0x41b0b2 in read_archive tar/read.c:252
#9 0x41d243 in tar_mode_x tar/read.c:104
#10 0x40d78f in main tar/bsdtar.c:805
#11 0x7f6795838f9f in __libc_start_main (/lib64/libc.so.6+0x1ff9f)
#12 0x412d81 (/mnt/ram/libarchive/bsdtar+0x412d81)
Will attach full asan output. Found with american fuzzy lop.
Original issue reported on code.google.com by hanno@hboeck.de on 7 Feb 2015 at 11:30
Original issue reported on code.google.com by
hanno@hboeck.de
on 7 Feb 2015 at 11:30Attachments: