NIS broken with bash

Bug #23077 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
glibc (Debian)
Fix Released
Unknown
glibc (Ubuntu)
Invalid
High
Jeff Bailey

Bug Description

Automatically imported from Debian bug report #328440 http://bugs.debian.org/328440

Revision history for this message
In , Ernest Demaret (ernestdemaret) wrote : libc6: postinstallation error

Package: libc6
Version: 2.3.5-6
Followup-For: Bug #328440

apt-get install libc6 gives the following error message:
/var/lib/dpkg/info/libc6.postinst: line 459: 2118 Segmentation fault ldconfig
dpkg: error processing libc6 (--configure):
 subprocess post-installation script returned error exit status 139
Errors were encountered while processing:
 libc6
E: Sub-process /usr/bin/dpkg returned an error code (1)

The system's still running but I'm no longer capable of upgrading via apt
because libc6 needs to be configured... The system is a 9500/200 which
cannot run on a kernel version 2.2 higher than 2.2 (yet).

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.2.20
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

-- no debconf information

Revision history for this message
In , Herbert Xu (herbert-gondor) wrote : NSS/NIS is totally broken

severity 328440 grave
retitle 328440 NIS broken with bash
quit

I'm raising the severity of this bug since it'll lock the user out
if NIS is used for authentication.

With this version of libc6, any attempt to login into a machine using
NIS fails with:

-bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.

This bug was previously reported upstream as

http://sources.redhat.com/bugzilla/show_bug.cgi?id=962

However, it appears to have been prematurely closed.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <email address hidden>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #328440 http://bugs.debian.org/328440

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 15 Sep 2005 12:14:47 +0200
From: Andrea Paternesi <email address hidden>
To: <email address hidden>
Subject: Debian Testing libc6 bug

Package: libc6
Version: 2.3.5-6

When i run the "bash" command in a machine with NIS authentication and external NFS home
i get an assetion failed.

--------------------------------------------------------
sirio:~> bash
bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Asserzione `malloc_usable_size (netgrp->data) >= len + 1' fallita.
Segnale di annullamento
sirio:~>
--------------------------------------------------------

If i downgrade the libc6 to the stable version 2.3.2.ds1-22 it does not happen anymore.

I am using Debian GNU/Linux 3.1 upgraded to Testing, kernel 2.6.11-1-686 and libc6 2.3.5-6.

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <E1EGb7r-00049O-NG@debian1>
Date: Sat, 17 Sep 2005 13:44:58 +0200
From: Ernest Demaret <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: libc6: postinstallation error

Package: libc6
Version: 2.3.5-6
Followup-For: Bug #328440

apt-get install libc6 gives the following error message:
/var/lib/dpkg/info/libc6.postinst: line 459: 2118 Segmentation fault ldconfig
dpkg: error processing libc6 (--configure):
 subprocess post-installation script returned error exit status 139
Errors were encountered while processing:
 libc6
E: Sub-process /usr/bin/dpkg returned an error code (1)

The system's still running but I'm no longer capable of upgrading via apt
because libc6 needs to be configured... The system is a 9500/200 which
cannot run on a kernel version 2.2 higher than 2.2 (yet).

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.2.20
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

-- no debconf information

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Mon, 3 Oct 2005 20:40:28 +1000
From: Herbert Xu <email address hidden>
To: <email address hidden>
Subject: NSS/NIS is totally broken

severity 328440 grave
retitle 328440 NIS broken with bash
quit

I'm raising the severity of this bug since it'll lock the user out
if NIS is used for authentication.

With this version of libc6, any attempt to login into a machine using
NIS fails with:

-bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.

This bug was previously reported upstream as

http://sources.redhat.com/bugzilla/show_bug.cgi?id=962

However, it appears to have been prematurely closed.

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <email address hidden>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Revision history for this message
Jeff Bailey (jbailey) wrote :

Thanks to Tollef for testing this for me, cannot reproduce, marking NOTWARTY.
Probably another side effect of glibc with gcc-4 in Debian or something.

Tks,
Jeff Bailey

Revision history for this message
In , xrgtn (xrgtn) wrote : libc6/NIS broken with bash/ksh/tcsh/sash

Hi!

I'm having the same problem with new Debian's libc6,
but due to different usage symptoms are different (I
didn't tried to login to NIS accounts, I can expose
problem without it).

For the test, I have "zhinis" NIS user, which is member
of "pwr" netgroup.

If I have "+@pwr" entry in /etc/passwd, tilde expansion
crashes bash:
> ramazan@cherokee:~$ ls ~z
> bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.
> Aborted (core dumped)

although getent works OK:
> ramazan@cherokee:~$ getent passwd zhinis
> zhinis:x:2004:2004:NIS test user Z:/home/zhinis:/bin/zsh4
> ramazan@cherokee:~$ ls ~zhinis
> ls: /home/zhinis: No such file or directory

// pam_mkhomedir.so didn't run yet for this user ;)

If I remove "+@pwr" entry or change it to some
_non-existent_ netgroup, ~-expansion works OK.
// it also works OK if I `/etc/init.d/nis stop`

/etc/nsswitch.conf defines NIS as source for netgroup

P.S.
The same shit with ksh93, tcsh and sash, although zsh,
pdksh, posh, busybox-static (IMHO irrelevant :)),
mksh and dash work OK.

// Didn't tried osh.
--
WBR,
xrgtn

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 6 Oct 2005 22:51:58 +0300
From: Alexander Gattin <email address hidden>
To: <email address hidden>
Subject: libc6/NIS broken with bash/ksh/tcsh/sash

Hi!

I'm having the same problem with new Debian's libc6,
but due to different usage symptoms are different (I
didn't tried to login to NIS accounts, I can expose
problem without it).

For the test, I have "zhinis" NIS user, which is member
of "pwr" netgroup.

If I have "+@pwr" entry in /etc/passwd, tilde expansion
crashes bash:
> ramazan@cherokee:~$ ls ~z
> bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.
> Aborted (core dumped)

although getent works OK:
> ramazan@cherokee:~$ getent passwd zhinis
> zhinis:x:2004:2004:NIS test user Z:/home/zhinis:/bin/zsh4
> ramazan@cherokee:~$ ls ~zhinis
> ls: /home/zhinis: No such file or directory

// pam_mkhomedir.so didn't run yet for this user ;)

If I remove "+@pwr" entry or change it to some
_non-existent_ netgroup, ~-expansion works OK.
// it also works OK if I `/etc/init.d/nis stop`

/etc/nsswitch.conf defines NIS as source for netgroup

P.S.
The same shit with ksh93, tcsh and sash, although zsh,
pdksh, posh, busybox-static (IMHO irrelevant :)),
mksh and dash work OK.

// Didn't tried osh.
--
WBR,
xrgtn

Revision history for this message
In , Wells1632 (jka) wrote :

I have been following this somewhat closely as it is affecting me as
well. One thing I have tried is logging in as a user, unlike Alexander.
I get the same error as he is getting:

User jka is a member of the netgroup leonard, which has an entry
in /etc/passwd.

Via su:

teuber:~# su - jka
-su: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion
`malloc_usable_size (netgrp->data) >= len + 1' failed.
teuber:~#

Via ssh:

teuber:~# ssh jka@localhost
Password:
Linux teuber 2.6.8-2-686-smp #1 SMP Thu May 19 17:27:55 JST 2005 i686
GNU/Linux
Last login: Thu Oct 6 16:08:40 2005 from localhost
-bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion
`malloc_usable_size (netgrp->data) >= len + 1' failed.
Connection to localhost closed.
teuber:~#

In both cases, the shell for user jka is /bin/bash.

Debian package versions follow:

libc6 2.3.5-6
nis 3.14-2
bash 3.0-15

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Fri, 07 Oct 2005 08:38:47 -0400
From: Jon Akers <email address hidden>
To: <email address hidden>
Subject: libc6/NIS broken with bash/ksh/tcsh/sash

I have been following this somewhat closely as it is affecting me as
well. One thing I have tried is logging in as a user, unlike Alexander.
I get the same error as he is getting:

User jka is a member of the netgroup leonard, which has an entry
in /etc/passwd.

Via su:

teuber:~# su - jka
-su: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion
`malloc_usable_size (netgrp->data) >= len + 1' failed.
teuber:~#

Via ssh:

teuber:~# ssh jka@localhost
Password:
Linux teuber 2.6.8-2-686-smp #1 SMP Thu May 19 17:27:55 JST 2005 i686
GNU/Linux
Last login: Thu Oct 6 16:08:40 2005 from localhost
-bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion
`malloc_usable_size (netgrp->data) >= len + 1' failed.
Connection to localhost closed.
teuber:~#

In both cases, the shell for user jka is /bin/bash.

Debian package versions follow:

libc6 2.3.5-6
nis 3.14-2
bash 3.0-15

Revision history for this message
In , xrgtn (xrgtn) wrote :

retitle 328440 NIS broken with bash, ksh, tcsh and sash
thanks

On Thu, Oct 06, 2005 at 10:51:58PM +0300, Alexander Gattin wrote:
> If I have "+@pwr" entry in /etc/passwd, tilde expansion
> crashes bash:

I need to rephrase -- it's rather "tilde completion"
that crashes bash, not "tilde expansion", because the
latter works for fully/correctly specified NIS name and
crashes only for non-existent names.

> > ramazan@cherokee:~$ ls ~z
> > bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.
> > Aborted (core dumped)
>
> although getent works OK:
> > ramazan@cherokee:~$ getent passwd zhinis
> > zhinis:x:2004:2004:NIS test user Z:/home/zhinis:/bin/zsh4
> > ramazan@cherokee:~$ ls ~zhinis
> > ls: /home/zhinis: No such file or directory

--
WBR,
xrgtn

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Sat, 8 Oct 2005 01:00:42 +0300
From: Alexander Gattin <email address hidden>
To: <email address hidden>
Cc: <email address hidden>
Subject: Re: libc6/NIS broken with bash/ksh/tcsh/sash

retitle 328440 NIS broken with bash, ksh, tcsh and sash
thanks

On Thu, Oct 06, 2005 at 10:51:58PM +0300, Alexander Gattin wrote:
> If I have "+@pwr" entry in /etc/passwd, tilde expansion
> crashes bash:

I need to rephrase -- it's rather "tilde completion"
that crashes bash, not "tilde expansion", because the
latter works for fully/correctly specified NIS name and
crashes only for non-existent names.

> > ramazan@cherokee:~$ ls ~z
> > bash: nss_nis/nis-netgrp.c:79: _nss_nis_setnetgrent: Assertion `malloc_usable_size (netgrp->data) >= len + 1' failed.
> > Aborted (core dumped)
>
> although getent works OK:
> > ramazan@cherokee:~$ getent passwd zhinis
> > zhinis:x:2004:2004:NIS test user Z:/home/zhinis:/bin/zsh4
> > ramazan@cherokee:~$ ls ~zhinis
> > ls: /home/zhinis: No such file or directory

--
WBR,
xrgtn

Revision history for this message
In , Justin Pryzby (justinpryzby-users) wrote : severity of 322011 is grave, merging 322011 328440

# Automatically generated email from bts, devscripts version 2.9.8
severity 322011 grave
merge 322011 328440

Revision history for this message
In , Justin Pryzby (justinpryzby-users) wrote : retitle merges

reassign 336661 libc6
merge 322011 328440 336661
retitle 322011 libc6: assertion fails when logging in to NIS account
retitle 328440 libc6: assertion fails when logging in to NIS account
retitle 336661 libc6: assertion fails when logging in to NIS account
thanks

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <E1EZFdt-0005O5-9t@andromeda>
Date: Mon, 7 Nov 2005 17:39:08 -0500
From: Justin Pryzby <email address hidden>
To: <email address hidden>
Subject: severity of 322011 is grave, merging 322011 328440

# Automatically generated email from bts, devscripts version 2.9.8
severity 322011 grave
merge 322011 328440

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20051107230419.GB20786@andromeda>
Date: Mon, 7 Nov 2005 18:04:19 -0500
From: Justin Pryzby <email address hidden>
To: <email address hidden>
Subject: retitle merges

reassign 336661 libc6
merge 322011 328440 336661
retitle 322011 libc6: assertion fails when logging in to NIS account
retitle 328440 libc6: assertion fails when logging in to NIS account
retitle 336661 libc6: assertion fails when logging in to NIS account
thanks

Revision history for this message
In , Denis Barbier (barbier) wrote : Re: Bug#347545: login crashes when trying to use nis

# reassign and merge bugs related to login with NIS
reassign 347545 libc6
merge 347545 322011
thanks

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 12 Jan 2006 17:49:25 +0100
From: Denis Barbier <email address hidden>
To: <email address hidden>
Subject: Re: Bug#347545: login crashes when trying to use nis

# reassign and merge bugs related to login with NIS
reassign 347545 libc6
merge 347545 322011
thanks

Revision history for this message
In , Denis Barbier (barbier) wrote : fixes committed in glibc SVN

tag 233308 pending
tag 235759 pending
tag 254417 pending
tag 254993 pending
tag 271549 pending
tag 310635 pending
tag 322011 pending
tag 328831 pending
tag 334762 pending

Revision history for this message
In , Denis Barbier (barbier) wrote : Bug#322011: fixed in glibc 2.3.5-12
Download full text (7.2 KiB)

Source: glibc
Source-Version: 2.3.5-12

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

glibc-doc_2.3.5-12_all.deb
  to pool/main/g/glibc/glibc-doc_2.3.5-12_all.deb
glibc_2.3.5-12.diff.gz
  to pool/main/g/glibc/glibc_2.3.5-12.diff.gz
glibc_2.3.5-12.dsc
  to pool/main/g/glibc/glibc_2.3.5-12.dsc
libc6-amd64_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-amd64_2.3.5-12_i386.deb
libc6-dbg_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-dbg_2.3.5-12_i386.deb
libc6-dev-amd64_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-dev-amd64_2.3.5-12_i386.deb
libc6-dev_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-dev_2.3.5-12_i386.deb
libc6-i686_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-i686_2.3.5-12_i386.deb
libc6-pic_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-pic_2.3.5-12_i386.deb
libc6-prof_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6-prof_2.3.5-12_i386.deb
libc6-udeb_2.3.5-12_i386.udeb
  to pool/main/g/glibc/libc6-udeb_2.3.5-12_i386.udeb
libc6_2.3.5-12_i386.deb
  to pool/main/g/glibc/libc6_2.3.5-12_i386.deb
libnss-dns-udeb_2.3.5-12_i386.udeb
  to pool/main/g/glibc/libnss-dns-udeb_2.3.5-12_i386.udeb
libnss-files-udeb_2.3.5-12_i386.udeb
  to pool/main/g/glibc/libnss-files-udeb_2.3.5-12_i386.udeb
locales_2.3.5-12_all.deb
  to pool/main/g/glibc/locales_2.3.5-12_all.deb
nscd_2.3.5-12_i386.deb
  to pool/main/g/glibc/nscd_2.3.5-12_i386.deb

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

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Denis Barbier <email address hidden> (supplier of updated glibc 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 <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 15 Jan 2006 00:54:16 +0100
Source: glibc
Binary: libc6-dev-amd64 libc6-i686 libc6-dev-ppc64 libc0.3-pic glibc-doc libc1-udeb libc0.3 libc6.1-dev libc1-pic libc6-s390x libnss-files-udeb libc1-dbg libc6-dev-sparc64 libc0.3-dev libc6-udeb libc6-dbg libc6.1-pic libc6-dev libc0.3-prof libc6-sparcv9 libc6.1-prof libc1 locales libc6-pic libc0.3-udeb libc1-prof libc6-ppc64 libc0.3-dbg libc6-amd64 libc6-prof libc6 libc6-sparcv9b libc6.1-udeb libc6.1-dbg nscd libc6-sparc64 libnss-dns-udeb libc6.1 libc1-dev libc6-dev-s390x
Architecture: source i386 all
Version: 2.3.5-12
Distribution: unstable
Urgency: low
Maintainer: GNU Libc Maintainers <email address hidden>
Changed-By: Denis Barbier <email address hidden>
Description:
 glibc-doc - GNU C Library: Documentation
 libc6 - GNU C Library: Shared libraries and Timezone data
 libc6-amd64 - GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg - GNU C Library: Libraries with debugging symbols
 libc6-dev - GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - GNU C Library: 64bit Development Libraries for AMD64
 libc...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.