Debian Bug report logs - #626482
libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots

version graph

Package: src:glibc; Maintainer for src:glibc is GNU Libc Maintainers <debian-glibc@lists.debian.org>;

Affects: debootstrap, debirf

Reported by: Axel Beckert <abe@debian.org>

Date: Thu, 12 May 2011 10:27:02 UTC

Severity: normal

Fixed in version 2.19-11

Done: Steven Chamberlain <steven@pyro.eu.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, abe@debian.org, debian-bsd@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#626482; Package libc0.1. (Thu, 12 May 2011 10:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
New Bug report received and forwarded. Copy sent to abe@debian.org, debian-bsd@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Thu, 12 May 2011 10:27:08 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots on kfreebsd-*
Date: Thu, 12 May 2011 12:15:48 +0200 (CEST)
Package: libc0.1
Version: 2.13-2
Severity: important
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

[Mostly a summary of
 http://lists.debian.org/debian-bsd/2011/05/msg00038.html and
 http://lists.debian.org/debian-bsd/2011/05/msg00039.html]

After dist-upgrading libc0.1 and friends (i.e. all(*) installed packages
which are also built from eglibc source) from 2.11.2-something to 2.13-2
inside io's and asdfasdf's sid, calling "dchroot sid" segfaults on io
and causes bus errors on asdfasdf:

io:~# dchroot sid /bin/true
Segmentation fault
io:~# dchroot sid
Segmentation fault
io:~# 

asdfasdf:~# dchroot sid /bin/true
Bus error
asdfasdf:~# dchroot sid
Bus error
asdfasdf:~# 

Ah normal (but root only) "chroot /srv/chroot/sid" works on both
machines, so I could at least fix it from the inside by downgrading
libc0.1 and friends back to 2.11.2-13.

Please note that the used dchroot command comes from DSA's version of
dchroot-dsa (version 2:1.1), not from the one in the Debian archive. The
latter does not show this problem according to Petr Salinger.

I'm not sure where exactly the causing bug is located, it could be in
eglibc, in DSA's dchroot, and maybe also in gcc-4.6 (with which libc0.1
2.13-2 very likely has been compiled). But as downgrading libc0.1 and
friends helped to fix this regression, I'm filing it against libc0.1.

I'm not filing this as RC as it is not yet reproducible with only
packages from the official archive, but since porterboxes are affected
I doubt that this is a less important issue.

So feel free to raise the severity and/or reassign this bug.

(*) locales is definitely not relevant here as I initially by accident
    just downgraded all architecture-dependent packages built from the
    eglibc source.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 8.2-1-686
Locale: LANG=en_US.iso885915, LC_CTYPE=en_US.iso885915 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc0.1 depends on:
ii  libc-bin                      2.13-2  Embedded GNU C Library: Binaries
ii  libgcc1                       1:4.6.0-7  GCC support library

Versions of packages libc0.1 recommends:
pn  libc0.1-i686                  <none>     (no description available)

Versions of packages libc0.1 suggests:
ii  debconf [debconf-2.0]         1.5.39     Debian configuration management sy
pn  glibc-doc                     <none>     (no description available)
ii  locales                       2.13-2  Embedded GNU C Library: National L
ii  locales-all [locales]         2.13-2  Embedded GNU C Library: Precompile

-- debconf information:
* glibc/restart-services: cron
  glibc/disable-screensaver:
  glibc/restart-failed:
  glibc/upgrade: true




Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#626482; Package libc0.1. (Thu, 12 May 2011 10:39:14 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Thu, 12 May 2011 10:39:14 GMT) (full text, mbox, link).


Message #10 received at 626482@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: debian-bsd@lists.debian.org
Cc: admin@io.debian.net, 626482@bugs.debian.org
Subject: Re: sid chroots on io and asdfasdf currently broken
Date: Thu, 12 May 2011 12:36:52 +0200
Hi,

taking the discussion back to debian-bsd@l.d.o and to the bug report I
filed just before Aurelien's mail came in.

Aurelien Jarno wrote:
> > Will probably file a bug report soon. I'm still not sure against
> > which package, but I'll probably choose libc0.1.
> 
> The problem seems to be a conflict between libnss-db outside the chroot
> and inside the chroot. dchroot-dsa calls initgroup("root", 0) after
> chrooting, but before doing an execve, and that causes the crash.
> 
> Disabling libnss-db either inside or outside the chroot workarounds the
> problem.

Ok, will try that on io soon as libnss-db is removed from the sid
chroot there already.

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5




Information forwarded to debian-bugs-dist@lists.debian.org, GNU Libc Maintainers <debian-glibc@lists.debian.org>:
Bug#626482; Package libc0.1. (Thu, 12 May 2011 12:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to GNU Libc Maintainers <debian-glibc@lists.debian.org>. (Thu, 12 May 2011 12:45:04 GMT) (full text, mbox, link).


Message #15 received at 626482@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurelien@aurel32.net>
To: Axel Beckert <abe@debian.org>, 626482@bugs.debian.org
Subject: Re: Bug#626482: libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots on kfreebsd-*
Date: Thu, 12 May 2011 14:41:33 +0200
On Thu, May 12, 2011 at 12:15:48PM +0200, Axel Beckert wrote:
> Package: libc0.1
> Version: 2.13-2
> Severity: important
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
> 
> [Mostly a summary of
>  http://lists.debian.org/debian-bsd/2011/05/msg00038.html and
>  http://lists.debian.org/debian-bsd/2011/05/msg00039.html]
> 
> After dist-upgrading libc0.1 and friends (i.e. all(*) installed packages
> which are also built from eglibc source) from 2.11.2-something to 2.13-2
> inside io's and asdfasdf's sid, calling "dchroot sid" segfaults on io
> and causes bus errors on asdfasdf:
> 
> io:~# dchroot sid /bin/true
> Segmentation fault
> io:~# dchroot sid
> Segmentation fault
> io:~# 
> 
> asdfasdf:~# dchroot sid /bin/true
> Bus error
> asdfasdf:~# dchroot sid
> Bus error
> asdfasdf:~# 
> 
> Ah normal (but root only) "chroot /srv/chroot/sid" works on both
> machines, so I could at least fix it from the inside by downgrading
> libc0.1 and friends back to 2.11.2-13.
> 
> Please note that the used dchroot command comes from DSA's version of
> dchroot-dsa (version 2:1.1), not from the one in the Debian archive. The
> latter does not show this problem according to Petr Salinger.
> 
> I'm not sure where exactly the causing bug is located, it could be in
> eglibc, in DSA's dchroot, and maybe also in gcc-4.6 (with which libc0.1
> 2.13-2 very likely has been compiled). But as downgrading libc0.1 and
> friends helped to fix this regression, I'm filing it against libc0.1.
> 
> I'm not filing this as RC as it is not yet reproducible with only
> packages from the official archive, but since porterboxes are affected
> I doubt that this is a less important issue.


First of all please note that this problem is not GNU/kFreeBSD specific, but
can easily reproduced on GNU/Linux. 

The problems comes from the fact that dchroot calls chroot() to actually
chroot into a directory, and after calls libc functions which can 
trigger library loading. It means that the version of the library in the
chroot will end-up in the same memory space that libraries inside the 
chroot, and they might not be compatible. In our case, the call to 
initgroups() after chroot() might load libnss-db from the chroot 
(depending on some conditions, mainly if the user is defined in 
/etc/passwd or in the nss database inside and outside the chroot), and 
libnss-db as most libnss libraries has a strong dependency on the libc 
version.

> So feel free to raise the severity and/or reassign this bug.
> 

IMHO the bug is in dchroot-dsa, but given the version we are using is
not in the archive, I can't reassign it.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net




Changed Bug title to 'libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots' from 'libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots on kfreebsd-*' Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Thu, 12 May 2011 13:33:02 GMT) (full text, mbox, link).


Set Bug forwarded-to-address to 'debian-admin@lists.debian.org'. Request was from Axel Beckert <abe@debian.org> to control@bugs.debian.org. (Fri, 13 May 2011 14:57:03 GMT) (full text, mbox, link).


Bug reassigned from package 'libc0.1' to 'eglibc'. Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:03 GMT) (full text, mbox, link).


No longer marked as found in versions eglibc/2.13-2. Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:03 GMT) (full text, mbox, link).


Unset Bug forwarded-to-address Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:06 GMT) (full text, mbox, link).


Severity set to 'normal' from 'important' Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:06 GMT) (full text, mbox, link).


Added indication that 626482 affects debootstrap,debirf Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:07 GMT) (full text, mbox, link).


Merged 626482 649146 650234 Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Thu, 26 Apr 2012 15:30:09 GMT) (full text, mbox, link).


Disconnected #626482 from all other report(s). Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Wed, 24 Oct 2012 07:36:08 GMT) (full text, mbox, link).


Bug reassigned from package 'eglibc' to 'src:glibc'. Request was from Aurelien Jarno <aurelien@aurel32.net> to control@bugs.debian.org. (Thu, 26 Jun 2014 14:57:20 GMT) (full text, mbox, link).


Reply sent to Steven Chamberlain <steven@pyro.eu.org>:
You have taken responsibility. (Tue, 21 Oct 2014 23:21:08 GMT) (full text, mbox, link).


Notification sent to Axel Beckert <abe@debian.org>:
Bug acknowledged by developer. (Tue, 21 Oct 2014 23:21:08 GMT) (full text, mbox, link).


Message #40 received at 626482-done@bugs.debian.org (full text, mbox, reply):

From: Steven Chamberlain <steven@pyro.eu.org>
To: 626482-done@bugs.debian.org
Subject: Re: Bug#626482: libc0.1: 2.13 causes segfaults + bus errors inside DSA's dchroots
Date: Wed, 22 Oct 2014 00:17:50 +0100
Source-Version: 2.19-11

Not reproducible with sid/jessie glibc.

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 20 Jan 2015 07:28:20 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 14 00:59:11 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.