[Bug 1231159] New: mc crashes extracting from a compressed tarball
https://bugzilla.suse.com/show_bug.cgi?id=1231159 Bug ID: 1231159 Summary: mc crashes extracting from a compressed tarball Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.6 Hardware: x86-64 OS: Other Status: NEW Severity: Critical Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: vkrevs@yahoo.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0 Build Identifier: Download a compressed tarball from github, extract it and recompress it using "tar zcf ...". Then attempt to extract files from the newly created tarball via Midnight Commander and this results in a segfault. Curiously, this does not happen with the original downloaded tarball. Reproduced on my main openSUSE Leap 15.6 dev box and a clean openSUSE Leap 15.6 VirtualBox VM. Reproducible: Always Steps to Reproduce: mkdir ddd && cd ddd wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protobu... tar xvf protobuf-cpp-3.21.12.tar.gz tar zcf protobuf-3.21.12.tgz protobuf-3.21.12 l protobuf-3.21.12.tgz protobuf-cpp-3.21.12.tar.gz ; file protobuf-cpp-3.21.12.tar.gz protobuf-3.21.12.tgz -rw-r--r-- 1 user1 users 4942918 Sep 30 19:03 protobuf-3.21.12.tgz -rw-r--r-- 1 user1 users 4842303 Dec 14 2022 protobuf-cpp-3.21.12.tar.gz protobuf-cpp-3.21.12.tar.gz: gzip compressed data, max compression, from Unix protobuf-3.21.12.tgz: gzip compressed data, from Unix mkdir ccc Now start mc and open the "ccc" and "ddd" folders in its panels Position the mc's cursor over the created protobuf-3.21.12.tgz and hit Enter to view the contents of the compressed tarball, then press the down arrow to position the cursor over "protobuf-3.21.12" directory inside the tarball. press F5 and Enter. Actual Result: Segmentation Fault (core dumped) Expected Result: No segfault, compressed tarballs is extracted successfully Installed debuginfo and attempted to look at the core file: $ gdb /usr/bin/mc core_mc_1000.11402 GNU gdb (GDB; SUSE Linux Enterprise 15) 13.2 ... [New LWP 11402] warning: Section `.reg-xstate/11402' in core file too small. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/bin/mc -P /tmp/mc-vadymk/mc.pwd.3883'. Program terminated with signal SIGSEGV, Segmentation fault. warning: Section `.reg-xstate/11402' in core file too small. #0 0x00007f7be16b698b in _int_malloc (av=av@entry=0x7f7be17ffac0 <main_arena>, bytes=bytes@entry=257) at malloc.c:3839 3839 { Missing separate debuginfos, use: zypper install libX11-devel-debuginfo-1.8.7-150600.1.2.x86_64 libXau6-debuginfo-1.0.8-1.26.x86_64 libext2fs2-debuginfo-1.47.0-150600.4.3.2.x86_64 libgpm2-debuginfo-1.20.7-7.3.1.x86_64 libjitterentropy3-debuginfo-3.4.1-150000.1.12.1.x86_64 libslang2-debuginfo-2.3.1a-150000.5.2.3.x86_64 libssh2-1-debuginfo-1.11.0-150600.18.1.x86_64 libxcb1-debuginfo-1.13-150000.3.11.1.x86_64 (gdb) where #0 0x00007f7be16b698b in _int_malloc (av=av@entry=0x7f7be17ffac0 <main_arena>, bytes=bytes@entry=257) at malloc.c:3839 #1 0x00007f7be16b7bd2 in _int_realloc (av=av@entry=0x7f7be17ffac0 <main_arena>, oldp=oldp@entry=0x559789499830, oldsize=oldsize@entry=144, nb=nb@entry=272) at malloc.c:4968 #2 0x00007f7be16b8cc6 in __GI___libc_realloc (oldmem=0x559789499840, bytes=bytes@entry=256) at malloc.c:3501 #3 0x00007f7be1d1d768 in g_realloc (mem=0x559789499840, n_bytes=256) at ../glib/gmem.c:201 #4 0x00007f7be1d3bdec in g_string_expand (string=0x55978b805a10, len=<optimized out>) at ../glib/gstring.c:92 #5 0x00007f7be1d3c20b in g_string_maybe_expand (len=142, string=0x55978b805a10) at ../glib/gstring.c:100 #6 g_string_insert_len (string=string@entry=0x55978b805a10, pos=pos@entry=-1, val=val@entry=0x55978949d601 "tmp/ddd/protobuf-3.21.12.tgz/utar://protobuf-3.21.12/third_party/googletest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj", len=len@entry=-1) at ../glib/gstring.c:539 #7 0x000055978746c205 in g_string_append_len_inline (len=-1, val=0x55978949d601 "tmp/ddd/protobuf-3.21.12.tgz/utar://protobuf-3.21.12/third_party/googletest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj", gstring=0x55978b805a10) at /usr/include/glib-2.0/glib/gstring.h:243 #8 mc_build_filenamev (first_element=<optimized out>, args=args@entry=0x7ffe3ae191b0) at utilunix.c:1254 #9 0x000055978748a2c0 in vfs_path_build_filename (first_element=<optimized out>) at path.c:1272 #10 0x000055978748a3c9 in vfs_path_append_new (vpath=vpath@entry=0x55978b8056c0, first_element=<optimized out>) at path.c:1306 #11 0x0000559787450a22 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b8056c0, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:668 #12 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b805280, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #13 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b804de0, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #14 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b8049a0, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #15 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b804500, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #16 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b8040c0, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #17 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b803c20, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #18 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b8037e0, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 #19 0x0000559787450b82 in do_compute_dir_size (dirname_vpath=dirname_vpath@entry=0x55978b803340, dsm=dsm@entry=0x7ffe3b6150d0, dir_count=dir_count@entry=0x7ffe3b6150c8, ret_marked=ret_marked@entry=0x559789497c28, ret_total=ret_total@entry=0x559789497c30, stat_func=stat_func@entry=0x5597874866f0 <mc_lstat>) at file.c:674 <this repeats forever> Actual Results: segmentation fault in mc Expected Results: no segmentation fault openSUSE Leap 15.6, x86_64 $ rpm -q mc tar libz1 mc-4.8.30-bp156.1.6.x86_64 tar-1.34-150000.3.34.1.x86_64 libz1-1.2.13-150500.4.3.1.x86_64 -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1231159 Vadim Krevs <vkrevs@yahoo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vkrevs@yahoo.com -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com