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

Bug#637767: marked as done ([davem@davemloft.net: [PATCH] Serious glibc sparc rlimits bug])

Your message dated Tue, 23 Aug 2011 05:18:23 +0000
with message-id <E1QvjNX-00022R-9r@franck.debian.org>
and subject line Bug#637767: fixed in eglibc 2.13-17
has caused the Debian Bug report #637767,
regarding [davem@davemloft.net: [PATCH] Serious glibc sparc rlimits bug]
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

637767: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637767
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6-dev
Version: 2.13-16
Severity: important
----- Forwarded message from David Miller <davem@davemloft.net> -----

Date: Sun, 14 Aug 2011 00:29:18 -0700 (PDT)
From: David Miller <davem@davemloft.net>
To: jurij@wooyd.org
CC: debian-sparc@lists.debian.org
Subject: [PATCH] Serious glibc sparc rlimits bug
X-Mailer: Mew version 6.3 on Emacs 23.2 / Mule 6.0 (HANACHIRUSATO)

Unfortunately, the sparc32 definition of the 64-bit RLIM_INFINITY
value is wrong, and it's been wrong for a while.

This causes serious problems, the worst of which is that no 64-bit
pthread program executing as a child of 'make' can succeed.

GLIBC's pthread_create() uses the current RLIMIT_STACK value as a hint
for sizing thread stacks.  It handles RLIM_INFINITY specially instead
of trying to allocate an enormous stack.

But if RLIM_INFINITY is wrong... right, nothing works.

How this happens is that libpam corrupts the kernel default rlimits
when it creates a login session, because even if you have no explicit
settings in /etc/security/limits.conf it still reads every rlimit
then sets it right back to the same value.  It even has some pre-cooked
defaults, and the default for RLIMIT_STACK is cur=8MB max=RLIM_INFINITY

So if RLIM_INFINITY is wrong (for 32-bit binaries it's too small), the
values will all get truncated down to this incorrect RLIM_INFINITY

Next, make sets the current RLIMIT_STACK 'cur' value to the maximum,
so now the current RLIMIT_STACK has this wrong RLIM_INFINITY value

Then 64-bit glibc doesn't recognize this value as RLIM_INFINITY during
pthread_create() and it tries to allocate a thread stack of size
0x8000000000000000 bytes.  This, of course, fails.

A bunch of binaries are going to need to be rebuilt because of this issue
once the glibc build goes through, I would prioritize libpam0g, make,
and emacs23.

I'll be committing this soon to glibc GIT.  I tested this by doing a
glibc deb rebuild with this patch applied, installing, then rebuilding
libpam0g and make.

2011-08-14  David S. Miller  <davem@davemloft.net>

	* sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIM_INFINITY,
	RLIM64_INFINITY): Fix 64-bit values for 32-bit sparc.

diff --git a/sysdeps/unix/sysv/linux/sparc/bits/resource.h b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
index 04d33e4..5c00b8f 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/resource.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/resource.h
@@ -130,11 +130,11 @@ enum __rlimit_resource
 #ifndef __USE_FILE_OFFSET64
 # define RLIM_INFINITY ((long int)(~0UL >> 1))
-# define RLIM_INFINITY 0x7fffffffffffffffLL
+# define RLIM_INFINITY 0xffffffffffffffffLL
 #ifdef __USE_LARGEFILE64
-# define RLIM64_INFINITY 0x7fffffffffffffffLL
+# define RLIM64_INFINITY 0xffffffffffffffffLL

----- End forwarded message -----

Jurij Smakov                                           jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC

--- End Message ---
--- Begin Message ---
Source: eglibc
Source-Version: 2.13-17

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

  to main/e/eglibc/eglibc-source_2.13-17_all.deb
  to main/e/eglibc/eglibc_2.13-17.diff.gz
  to main/e/eglibc/eglibc_2.13-17.dsc
  to main/e/eglibc/glibc-doc_2.13-17_all.deb
  to main/e/eglibc/libc-bin_2.13-17_amd64.deb
  to main/e/eglibc/libc-dev-bin_2.13-17_amd64.deb
  to main/e/eglibc/libc6-dbg_2.13-17_amd64.deb
  to main/e/eglibc/libc6-dev-i386_2.13-17_amd64.deb
  to main/e/eglibc/libc6-dev_2.13-17_amd64.deb
  to main/e/eglibc/libc6-i386_2.13-17_amd64.deb
  to main/e/eglibc/libc6-pic_2.13-17_amd64.deb
  to main/e/eglibc/libc6-prof_2.13-17_amd64.deb
  to main/e/eglibc/libc6-udeb_2.13-17_amd64.udeb
  to main/e/eglibc/libc6_2.13-17_amd64.deb
  to main/e/eglibc/libnss-dns-udeb_2.13-17_amd64.udeb
  to main/e/eglibc/libnss-files-udeb_2.13-17_amd64.udeb
  to main/e/eglibc/locales-all_2.13-17_amd64.deb
  to main/e/eglibc/locales_2.13-17_all.deb
  to main/e/eglibc/multiarch-support_2.13-17_amd64.deb
  to main/e/eglibc/nscd_2.13-17_amd64.deb

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 637767@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Aurelien Jarno <aurel32@debian.org> (supplier of updated eglibc 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@debian.org)

Hash: SHA1

Format: 1.8
Date: Mon, 22 Aug 2011 21:51:07 +0200
Source: eglibc
Binary: libc-bin libc-dev-bin glibc-doc eglibc-source locales locales-all nscd multiarch-support libc6 libc6-dev libc6-dbg libc6-prof libc6-pic libc6-udeb libc6.1 libc6.1-dev libc6.1-dbg libc6.1-prof libc6.1-pic libc6.1-udeb libc0.3 libc0.3-dev libc0.3-dbg libc0.3-prof libc0.3-pic libc0.3-udeb libc0.1 libc0.1-dev libc0.1-dbg libc0.1-prof libc0.1-pic libc0.1-udeb libc6-i386 libc6-dev-i386 libc6-sparc64 libc6-dev-sparc64 libc6-s390 libc6-dev-s390 libc6-s390x libc6-dev-s390x libc6-amd64 libc6-dev-amd64 libc6-powerpc libc6-dev-powerpc libc6-ppc64 libc6-dev-ppc64 libc6-mipsn32 libc6-dev-mipsn32 libc6-mips64 libc6-dev-mips64 libc0.1-i386 libc0.1-dev-i386 libc6-i686 libc6-xen libc0.1-i686 libc0.3-i686 libc0.3-xen libc6.1-alphaev67 libc6-loongson2f libnss-dns-udeb libnss-files-udeb
Architecture: source all amd64
Version: 2.13-17
Distribution: unstable
Urgency: low
Maintainer: Aurelien Jarno <aurel32@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
 eglibc-source - Embedded GNU C Library: sources
 glibc-doc  - Embedded GNU C Library: Documentation
 libc-bin   - Embedded GNU C Library: Binaries
 libc-dev-bin - Embedded GNU C Library: Development binaries
 libc0.1    - Embedded GNU C Library: Shared libraries
 libc0.1-dbg - Embedded GNU C Library: detached debugging symbols
 libc0.1-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc0.1-dev-i386 - Embedded GNU C Library: 32bit development libraries for AMD64
 libc0.1-i386 - Embedded GNU C Library: 32bit shared libraries for AMD64
 libc0.1-i686 - Embedded GNU C Library: Shared libraries [i686 optimized]
 libc0.1-pic - Embedded GNU C Library: PIC archive library
 libc0.1-prof - Embedded GNU C Library: Profiling Libraries
 libc0.1-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc0.3    - Embedded GNU C Library: Shared libraries
 libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
 libc0.3-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc0.3-i686 - Embedded GNU C Library: Shared libraries [i686 optimized]
 libc0.3-pic - Embedded GNU C Library: PIC archive library
 libc0.3-prof - Embedded GNU C Library: Profiling Libraries
 libc0.3-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc0.3-xen - Embedded GNU C Library: Shared libraries [Xen version]
 libc6      - Embedded GNU C Library: Shared libraries
 libc6-amd64 - Embedded GNU C Library: 64bit Shared libraries for AMD64
 libc6-dbg  - Embedded GNU C Library: detached debugging symbols
 libc6-dev  - Embedded GNU C Library: Development Libraries and Header Files
 libc6-dev-amd64 - Embedded GNU C Library: 64bit Development Libraries for AMD64
 libc6-dev-i386 - Embedded GNU C Library: 32-bit development libraries for AMD64
 libc6-dev-mips64 - Embedded GNU C Library: 64bit Development Libraries for MIPS64
 libc6-dev-mipsn32 - Embedded GNU C Library: n32 Development Libraries for MIPS64
 libc6-dev-powerpc - Embedded GNU C Library: 32bit powerpc development libraries for p
 libc6-dev-ppc64 - Embedded GNU C Library: 64bit Development Libraries for PowerPC64
 libc6-dev-s390 - Embedded GNU C Library: 32bit Development Libraries for IBM zSeri
 libc6-dev-s390x - Embedded GNU C Library: 64bit Development Libraries for IBM zSeri
 libc6-dev-sparc64 - Embedded GNU C Library: 64bit Development Libraries for UltraSPAR
 libc6-i386 - Embedded GNU C Library: 32-bit shared libraries for AMD64
 libc6-i686 - Embedded GNU C Library: Shared libraries [i686 optimized]
 libc6-loongson2f - Embedded GNU C Library: Shared libraries (Loongson 2F optimized)
 libc6-mips64 - Embedded GNU C Library: 64bit Shared libraries for MIPS64
 libc6-mipsn32 - Embedded GNU C Library: n32 Shared libraries for MIPS64
 libc6-pic  - Embedded GNU C Library: PIC archive library
 libc6-powerpc - Embedded GNU C Library: 32bit powerpc shared libraries for ppc64
 libc6-ppc64 - Embedded GNU C Library: 64bit Shared libraries for PowerPC64
 libc6-prof - Embedded GNU C Library: Profiling Libraries
 libc6-s390 - Embedded GNU C Library: 32bit Shared libraries for IBM zSeries
 libc6-s390x - Embedded GNU C Library: 64bit Shared libraries for IBM zSeries
 libc6-sparc64 - Embedded GNU C Library: 64bit Shared libraries for UltraSPARC
 libc6-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libc6-xen  - Embedded GNU C Library: Shared libraries [Xen version]
 libc6.1    - Embedded GNU C Library: Shared libraries
 libc6.1-alphaev67 - Embedded GNU C Library: Shared libraries (EV67 optimized)
 libc6.1-dbg - Embedded GNU C Library: detached debugging symbols
 libc6.1-dev - Embedded GNU C Library: Development Libraries and Header Files
 libc6.1-pic - Embedded GNU C Library: PIC archive library
 libc6.1-prof - Embedded GNU C Library: Profiling Libraries
 libc6.1-udeb - Embedded GNU C Library: Shared libraries - udeb (udeb)
 libnss-dns-udeb - Embedded GNU C Library: NSS helper for DNS - udeb (udeb)
 libnss-files-udeb - Embedded GNU C Library: NSS helper for files - udeb (udeb)
 locales    - Embedded GNU C Library: National Language (locale) data [support]
 locales-all - Embedded GNU C Library: Precompiled locale data
 multiarch-support - Transitional package to ensure multiarch compatibility
 nscd       - Embedded GNU C Library: Name Service Cache Daemon
Closes: 537743 617759 632682 636694 637239 637767 638173
 eglibc (2.13-17) unstable; urgency=low
   [ Aurelien Jarno ]
   * Improve libc.NEWS to also include headers.
   * Add debian/patches/cvs-dlopen-tls.diff to fix handling of static TLS in
     dlopen'ed objects.  Closes: #637239.
   * Provide locales in locales-all as separated files instead of adding them
     to locale-archive. Use symlinks between identical files to limit the
     unpacked size.  Closes: #537743, #636694, #638173.
   * Compress libc*-dbg and locales-all to using xz.
   * Add patches/localedata/cvs-rupee.diff from upstream to add support for
     Rupee symbol (U20B9).
   * Add patches/sparc/cvs-rlimits.diff from upstream to fix issues with
     rlimits on sparc.  Closes: #637767.
   * Add patches/amd64/cvs-pthread-stack-alignment.diff from upstream to fix
     stack alignment issues on amd64.
   * Add patches/s390/cvs-vsyscalls.diff from upstream to fix wrong register
     usage in the INTERNAL_VSYSCALL_NCS macro.
   * Add patches/arm/cvs-clone-cantunwind.diff from upstream to fix unwinding
     issues with openjdk on armhf.
   * Add patches arm/cvs-align-constant-pool.diff from upstream to fix
     alignement issues on armhf.
   * debian/control.in/libc: add Breaks: lsb-core (<= 3.2-27) to make sure the
     lsb symlink is still valid.
   * Remove patches/any/cvs-dl-missing-deps.diff, the original problem has
     been solved through other ways, so it is not needed any more. Fixes
     symbols resolution with issues with icedove/iceweasel/iceape.  Closes:
   [ Samuel Thibault ]
   * debian/patches/hurd-i386/submitted-ioctl-unsigned-size_t.diff: Add
     u?int{8,16,32,64} ioctl types.
   * debian/patches/hurd-i386/submitted-init-first.diff: Fix stack switching
     compilation with newer gcc.
   [ Steve Langasek ]
   * Install ld*.so to RTLDDIR (/lib64 or /lib), as appropriate, and convert
     /lib64 from a symlink to a directory on upgrade (with appropriate
     downgrade and error-unwind handling), so that multiarch and biarch
     packages will play nicely together on the filesystem..  Thanks to
     Sven Joachim <svenjoac@gmx.de> for preliminary patches.  Closes: #632682.
   * Restore multiarch support on all architectures.
   * Bump the multiarch-support minimum dependency for armhf, which settled
     its triplet only at the time i386 did.
   [ Petr Salinger ]
   * kfreebsd/local-sysdeps.diff: update to revision 3689 (from glibc-bsd).
 c4a1d8992d9e385a8e44e76c7ea58fb8ab961d31 2637 eglibc_2.13-17.dsc
 2db91f7ff108357cf1ed8a7088389c953940ac16 930177 eglibc_2.13-17.diff.gz
 451c6abbcc470003128f4d935b0cc1f18974b305 1886882 glibc-doc_2.13-17_all.deb
 df799f1242bedf8477e95e1d36df1974cb2de4d1 12221666 eglibc-source_2.13-17_all.deb
 e0ecaca8fe7321b394c1a6bc220e42a1bdcc1542 4857284 locales_2.13-17_all.deb
 556162bb516245e4427e3cfa7e6f35a4c0a1b587 4323692 libc6_2.13-17_amd64.deb
 4267c57ec96ad6a8fcfc8e708fe61e56b1f4f638 2636686 libc6-dev_2.13-17_amd64.deb
 685cf8c3c9e4706874d4b2f11048f83854119a6c 2077956 libc6-prof_2.13-17_amd64.deb
 3c8b0d3b48396b4786d4685d59499e406ac69f17 1584092 libc6-pic_2.13-17_amd64.deb
 4c4f96eac93c355283210f9371711348f102bf08 1085010 libc-bin_2.13-17_amd64.deb
 7a6a44e548938fad307086798a92bdd72d896ab3 216680 libc-dev-bin_2.13-17_amd64.deb
 be3b4b1b98b7d7a269b15cc287eb8d16f88ecc47 3273952 locales-all_2.13-17_amd64.deb
 3b5ddf303779b2bb0786e65c026a140346b90166 140478 multiarch-support_2.13-17_amd64.deb
 553c47da473c4cf04df7d6c563c83a420b34785a 3845754 libc6-i386_2.13-17_amd64.deb
 00e7f40df13dd8110d8fd8a06edb5ce158be08bb 1561580 libc6-dev-i386_2.13-17_amd64.deb
 1f9d8b2a3c68ca43a88d86244c9a123d69709b9f 203798 nscd_2.13-17_amd64.deb
 45dc4d7137efe2f67b90d027ddf712a96dcba18a 5685714 libc6-dbg_2.13-17_amd64.deb
 270a724ea0c5262e80ce6cedee7047d2d7c244ab 1179704 libc6-udeb_2.13-17_amd64.udeb
 fa42d6da5b18caa1bfed046cf0babf034c4bb00e 11144 libnss-dns-udeb_2.13-17_amd64.udeb
 75698b85d1d38d7805f9d156cc628c2cf219c7f9 19318 libnss-files-udeb_2.13-17_amd64.udeb
 08d82a115eae9a77e5dd0b454e0a246503294868271251fb1735c67ff90a42d1 2637 eglibc_2.13-17.dsc
 1e1ba3af4267b67cc9f476f3431e134da68dc0ae0170684112be5817a3bceb7c 930177 eglibc_2.13-17.diff.gz
 c0cd43e0d13ec95607d0fc41d0e02d6c8714fa1d9e5d1510b03b7afe036ac872 1886882 glibc-doc_2.13-17_all.deb
 629c8ca8aa40777355ad8d0df183c631ee97cb9da842a2cfd286890c3f7c2c04 12221666 eglibc-source_2.13-17_all.deb
 ea910bbace6e8a6c28f1e92b5d1a4e64c16f7101d5e6770aa269a3257828f8fa 4857284 locales_2.13-17_all.deb
 b2629d4d4f834eac9ef282754e1b93e6c5d2749d9fc49f001fe6f89140928875 4323692 libc6_2.13-17_amd64.deb
 0fcffd1b0ac020a1f51452f7aa646cc3e8151aba3fa9971f4924c376a1d0d24d 2636686 libc6-dev_2.13-17_amd64.deb
 ad35ff902edb17f12ae01f79252dce836da97e8672a9c1bd775bce094a227fcc 2077956 libc6-prof_2.13-17_amd64.deb
 54b164b0ed896cf593bf794f4a4eb9b55d346a63b510291f909165df1244343f 1584092 libc6-pic_2.13-17_amd64.deb
 da6ce577f7f3d8d290b47de1c7290deccfb322e7c4a0dc993a4b3905818c870a 1085010 libc-bin_2.13-17_amd64.deb
 b0b0419a0f421bb74c7231b96f240f4109796c596792214b2f6193024c60b495 216680 libc-dev-bin_2.13-17_amd64.deb
 80bf72ed28f83767bb9c6dcb998114e97162e88a4becf874f289327c9915ae1e 3273952 locales-all_2.13-17_amd64.deb
 2b803f896a5a9db62310e4d7142b19a8f2e1e4647c0a60afad8fd5612f09fa68 140478 multiarch-support_2.13-17_amd64.deb
 3c4b93843a015ad0c0ae923629f649b3473da56e07c0c9dcf458e4ae93de3a8b 3845754 libc6-i386_2.13-17_amd64.deb
 80f18cef14451e36fc895d1c607f15b911a824ecd320e8ddfe98b52b854ea7a8 1561580 libc6-dev-i386_2.13-17_amd64.deb
 c3e93de0863115091afeeebc8c708425afa56e2ec4b7b45deed7e7cb82e886d1 203798 nscd_2.13-17_amd64.deb
 4934685aab6c9642e15119ee813353d4024bc5d3de91793029b73b48990261cd 5685714 libc6-dbg_2.13-17_amd64.deb
 61254f98f632d4cbf63535285103cec23733a367f25c02e97658b4ea070859ae 1179704 libc6-udeb_2.13-17_amd64.udeb
 907170bca35c4bafbff0b09cc7d7e65e697862a30146ce4a19ade721361d2c5f 11144 libnss-dns-udeb_2.13-17_amd64.udeb
 da12b514afce054c70e2cbbc0a328fe6d369efd3a2ab3b567e758e7b459fa254 19318 libnss-files-udeb_2.13-17_amd64.udeb
 256b7845041050bf616bae3f217ff2df 2637 libs required eglibc_2.13-17.dsc
 b3420807e5f9f6bd909f514191477048 930177 libs required eglibc_2.13-17.diff.gz
 36331a70d3e98eb1604632ccf702a677 1886882 doc optional glibc-doc_2.13-17_all.deb
 65a2bfdc8d21eef7af3db4f911a6ef0f 12221666 devel optional eglibc-source_2.13-17_all.deb
 7053b6a953fadae6ec4febf9c02c571d 4857284 localization standard locales_2.13-17_all.deb
 1e364b076f9f8fee01beb8a74788e61f 4323692 libs required libc6_2.13-17_amd64.deb
 334f299f9c835643f38549e99ff3227f 2636686 libdevel optional libc6-dev_2.13-17_amd64.deb
 c542c42dba51cc0bc5c4a8b2a70cf936 2077956 libdevel extra libc6-prof_2.13-17_amd64.deb
 ab48be1ace945c53e1ea3b1f87224338 1584092 libdevel optional libc6-pic_2.13-17_amd64.deb
 ddb862660d9eeb4b3ce5700e858c80ea 1085010 libs required libc-bin_2.13-17_amd64.deb
 6ec273eb9424e5b85ae1e8159efb12eb 216680 libdevel optional libc-dev-bin_2.13-17_amd64.deb
 eefb90caefad51ccb3066a2f957887fe 3273952 localization extra locales-all_2.13-17_amd64.deb
 15807ec10ca9b2af29be86c46fc2289b 140478 libs standard multiarch-support_2.13-17_amd64.deb
 203673141ce646ec3d05b40cffe1cddd 3845754 libs optional libc6-i386_2.13-17_amd64.deb
 b61fc0e31bf13c8770fda33aad598905 1561580 libdevel optional libc6-dev-i386_2.13-17_amd64.deb
 9a914a3fb18630924f83d4d3dd406fdc 203798 admin optional nscd_2.13-17_amd64.deb
 2e72c06006c5a97622df800f7aac5aca 5685714 debug extra libc6-dbg_2.13-17_amd64.deb
 835b23efad2d98950195e6697ae4867a 1179704 debian-installer extra libc6-udeb_2.13-17_amd64.udeb
 4d4a65dc15ae67c82e66cf915adaaf88 11144 debian-installer extra libnss-dns-udeb_2.13-17_amd64.udeb
 b356020210086a767b771c4ccbcf6c91 19318 debian-installer extra libnss-files-udeb_2.13-17_amd64.udeb
Package-Type: udeb

Version: GnuPG v1.4.11 (GNU/Linux)


--- End Message ---

Reply to: