Skip to content

SIGSEGV in archive_wstring_append_from_mbs() #842

Closed
@fumfel

Description

@fumfel

SIGSEGV in archive_wstring_append_from_mbs()

Tested on Git HEAD: 54546be

Payload: https://frankowicz.me/storage/crashes/la_segv_archive_wstring_append_from_mbs

To reproduce: bsdtar -t -f la_segv_archive_wstring_append_from_mbs

ASAN Output:

==1002==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000005fb3cc bp 0x7ffc5999dae0 sp 0x7ffc5999daa0 T0)
    #0 0x5fb3cb in archive_wstring_append_from_mbs libarchive/archive_string.c:603
    #1 0x60363a in archive_mstring_get_wcs libarchive/archive_string.c:3929
    #2 0x42a1c4 in archive_entry_pathname_w libarchive/archive_entry.c:580
    #3 0x5bfee9 in zip_read_local_file_header libarchive/archive_read_support_format_zip.c:871
    #4 0x5c2b1d in archive_read_format_zip_streamable_read_header libarchive/archive_read_support_format_zip.c:2149
    #5 0x45841b in _archive_read_next_header2 libarchive/archive_read.c:648
    #6 0x45841b in _archive_read_next_header libarchive/archive_read.c:686
    #7 0x41280f in read_archive tar/read.c:261
    #8 0x414b06 in tar_mode_t tar/read.c:94
    #9 0x40963f in main tar/bsdtar.c:803
    #10 0x7fb92a6f482f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #11 0x40c3e8 in _start (/usr/local/bin/bsdtar+0x40c3e8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV libarchive/archive_string.c:603 
```archive_wstring_append_from_mbs
==1002==ABORTING

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions