Regression: busybox gzip broken

Aaro Koskinen aaro.koskinen at iki.fi
Fri Oct 25 19:06:32 UTC 2019


Hi,

This time gzip is broken, caused by:

c763392458304d68951d0b22e89e2422b9c2f8ef is the first bad commit
commit c763392458304d68951d0b22e89e2422b9c2f8ef
Author: Denys Vlasenko <vda.linux at googlemail.com>
Date:   Sat Oct 19 18:33:49 2019 +0200

    gzip: code shrink

Decompressing large gzip archive segfaults:

$ busybox gzip -cd arm-rootfs.tar.gz > /dev/null
Segmentation fault (core dumped)

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000444620 in inflate_codes (state=state at entry=0x15c3220)
    at archival/libarchive/decompress_gunzip.c:565
565                             t = td + ((unsigned) bb & md);
(gdb) bt
#0  0x0000000000444620 in inflate_codes (state=state at entry=0x15c3220)
    at archival/libarchive/decompress_gunzip.c:565
#1  0x00000000004449f3 in inflate_get_next_window (state=0x15c3220)
    at archival/libarchive/decompress_gunzip.c:971
#2  inflate_unzip_internal (state=state at entry=0x15c3220, xstate=xstate at entry=0x7ffd526e4048)
    at archival/libarchive/decompress_gunzip.c:1020
#3  0x0000000000444c00 in unpack_gz_stream (xstate=xstate at entry=0x7ffd526e4048)
    at archival/libarchive/decompress_gunzip.c:1240
#4  0x000000000043dee9 in bbunpack (argv=0x7ffd526e4310, unpacker=0x444a8b <unpack_gz_stream>, 
    make_new_name=0x43dca5 <make_new_name_gunzip>, expected_ext=0x0) at archival/bbunzip.c:126
#5  0x0000000000407900 in run_applet_no_and_exit (applet_no=63, 
    name=name at entry=0x7ffd526e5884 "gzip", argv=argv at entry=0x7ffd526e4300)
    at libbb/appletlib.c:997
#6  0x0000000000407bc3 in run_applet_and_exit (name=0x7ffd526e5884 "gzip", 
    argv=argv at entry=0x7ffd526e4300) at libbb/appletlib.c:1015
#7  0x0000000000407ba6 in busybox_main (argv=0x7ffd526e4300) at libbb/appletlib.c:958
#8  run_applet_and_exit (name=<optimized out>, argv=argv at entry=0x7ffd526e42f8)
    at libbb/appletlib.c:1008
#9  0x0000000000407c44 in main (argc=<optimized out>, argv=0x7ffd526e42f8)
    at libbb/appletlib.c:1123
(gdb) 

A.


More information about the busybox mailing list