[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#839264: marked as done (mklibs-copy: segfaults under fakeroot on various archs: armel armhf i386 mips mipsel)

Your message dated Fri, 30 Sep 2016 23:05:07 +0000
with message-id <E1bq6rb-0001YI-AF@franck.debian.org>
and subject line Bug#839264: fixed in mklibs 0.1.42
has caused the Debian Bug report #839264,
regarding mklibs-copy: segfaults under fakeroot on various archs: armel armhf i386 mips mipsel
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

839264: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839264
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: mklibs-copy
Version: 0.1.41
Severity: serious
Tags: patch pending
Justification: breaks d-i build


We've been seeing a bunch of d-i FTBFS since early september, due to
mklibs-readelf segfaults, on various archs. Looking at d-i build logs,
what changed then (example for i386, see timestamps 20160904-00:46
[success] vs. 20160905-00:41 [failure]) isn't obvious… (but we don't
store host package list, unfortunately)

In a stretch i386 chroot, I've tried downgrading fakeroot to a previous
version, with no effect, and also libc* to 2.24-1 (which is the only
thing that popped up in the diff), with no effect either.

Anyway, looking at the segfault, it is triggered by trying to look at
the dynamic section:
| (gdb) bt full
| #0  0x0805e818 in std::vector<Elf::dynamic*, std::allocator<Elf::dynamic*> >::begin (this=0x6c2f7572) at /usr/include/c++/6/bits/stl_vector.h:558
| No locals.
| #1  0x0805de2e in process_dynamics (file=0x8075a10, tag=15) at ../../../src/mklibs-readelf/main.cpp:62
|         it = <error reading variable it (Cannot access memory at address 0x3336e00)>
|         section = 0x6c2f756e
| #2  0x0805e47f in process (cmd=COMMAND_PRINT_RPATH, filename=0xffffd6b1 "./tmp/cdrom_gtk/tree/sbin/blkid") at ../../../src/mklibs-readelf/main.cpp:149
|         file = 0x8075a10
| #3  0x0805e6cd in main (argc=3, argv=0xffffd544) at ../../../src/mklibs-readelf/main.cpp:242
|         i = 2
|         c = -1
|         cmd = COMMAND_PRINT_RPATH
| (gdb) 

but that doesn't happen without fakeroot: section is 0x0 instead of
pointing to an address gdb can't access.

I've checked how the sections are initialized in file_data's constructor
(src/mklibs-readelf/elf.cpp), it seems the section_type_DYNAMIC::id case
in the switch is never hit. (With or without fakeroot, according to a
debugging statement I've never seen printed.)

Seeing how there's an explicit init for those:
| section_GNU_VERDEF = NULL;
| section_GNU_VERNEED = NULL;
| section_GNU_VERSYM = NULL;

I decided to try my luck and to init the two others explicitly, and it
seems to fix the issue: section_DYNAMIC and section_DYNSYM.

I'll commit this shortly, once I've checked the resulting image seems to
actually work.


--- End Message ---
--- Begin Message ---
Source: mklibs
Source-Version: 0.1.42

We believe that the bug you reported is fixed in the latest version of
mklibs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 839264@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Cyril Brulebois <kibi@debian.org> (supplier of updated mklibs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)

Hash: SHA1

Format: 1.8
Date: Fri, 30 Sep 2016 22:32:13 +0000
Source: mklibs
Binary: mklibs mklibs-copy
Architecture: source
Version: 0.1.42
Distribution: unstable
Urgency: high
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Cyril Brulebois <kibi@debian.org>
 mklibs     - Shared library reduction script
 mklibs-copy - Shared library reduction script
Closes: 839264
 mklibs (0.1.42) unstable; urgency=high
   * mklibs-readelf: Initialize section_DYNAMIC and section_DYNSYM to
     NULL to make sure they don't end up with a random address, which
     could lead to a segfault when trying to access them. This was
     seen under fakeroot with the debian-installer FTBFS on armel, armhf,
     i386, mips, and mipsel since early september (Closes: #839264).
 718c41f31670efe72692cbbf2a6c594e59aadeb4 1725 mklibs_0.1.42.dsc
 3cee73a88c6323777eb1dabed1658a9c40a892c0 22428 mklibs_0.1.42.tar.xz
 e4ba7f69f76e0cbf161ddb9da40d5d61c9b310fffd6f4b41582086d29be20608 1725 mklibs_0.1.42.dsc
 340daf19693efc1c3f9cf2d9d879759d1ffb8d1818727900054ee1e2d6002381 22428 mklibs_0.1.42.tar.xz
 5451b623c7eaf227777501aad6e72118 1725 devel optional mklibs_0.1.42.dsc
 5242f2c7244c23a51250a20cffeec626 22428 devel optional mklibs_0.1.42.tar.xz

Version: GnuPG v1


--- End Message ---

Reply to: