Segmentation fault in s390x ld.so while parsing /etc/ld.so.cache using qemu-s390x on x86_64.

Bug #1906250 reported by bugproxy
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLibC
Fix Released
Low
Ubuntu on IBM z Systems
Fix Released
Medium
Skipper Bug Screeners
cross-toolchain-base (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Unassigned
glibc (Debian)
Fix Released
Unknown
glibc (Ubuntu)
Fix Released
Medium
Canonical Foundations Team
Focal
Fix Released
Medium
Balint Reczey
Groovy
Won't Fix
Medium
Unassigned

Bug Description

---Problem Description---
On a x86_64 machine with Ubuntu 20.04, running a s390x (or ppc64) binary with qemu leads to a segmentation fault in ld.so while lookup in /etc/ld.so.cache.

Contact Information = via bugzilla

---uname output---
Linux 5.4.0-54-generic #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

---Steps to Reproduce---
- apt-get install -y --no-install-recommends gcc-s390x-linux-gnu libc6-dev-s390x-cross qemu-user

- apt list --installed "libc6*"
libc6/focal-updates,now 2.31-0ubuntu9.1 amd64 [installed,automatic]
libc6-s390x-cross/focal,focal,now 2.31-0ubuntu7cross1 all [installed,automatic]
...

- echo 'int main(void) { puts("Hello, world!"); }' | s390x-linux-gnu-gcc -o helloworld-s390x -x c -

- qemu-s390x -strace -L /usr/s390x-linux-gnu ./helloworld-s390x
18392 brk(NULL) = 0x0000004000003000
18392 uname(0x4000803402) = 0
18392 access("/etc/ld.so.preload",R_OK) = -1 errno=2 (No such file or directory)
18392 openat(AT_FDCWD,"/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3
18392 fstat(3,0x0000004000802720) = 0
18392 mmap(0x0000004000802648,65784,PROT_READ,MAP_PRIVATE,3,0x82d140) = 0x000000400082e000
18392 close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=1, si_addr=0x0000004300a6e000} ---
Segmentation fault (core dumped)

- qemu-s390x -L /usr/s390x-linux-gnu -g 12345 ./helloword-s390x
- gdb-multiarch ./helloword-s390x
target remote localhost:12345
c
Program received signal SIGSEGV, Segmentation fault.
0x000000400081c572 in ?? ()
Dump of assembler code from 0x400081c500 to 0x400081c600:
...
   0x000000400081c564: l %r4,216(%r11)
   0x000000400081c568: agr %r10,%r1
   0x000000400081c56c: sllg %r10,%r10,3
=> 0x000000400081c572: l %r1,52(%r10,%r6)
   0x000000400081c576: lgdr %r2,%f8
   0x000000400081c57a: algfr %r3,%r1
   0x000000400081c57e: clrjnh %r4,%r1,0x400081c5a0
   0x000000400081c584: brasl %r14,0x400081c290

This happens in <glibc>/elf/dl-cache.c:_dl_load_cache_lookup():
ld.so.cache is mmaped with:
void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize, PROT_READ);

And this check is true:
if (file != MAP_FAILED && cachesize > sizeof *cache_new
    && memcmp (file, CACHEMAGIC_VERSION_NEW,
    sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
{
  cache_new = file;
  cache = file;
}

The segmentation fault happens in SEARCH_CACHE macro which is also defined in elf/dl-cache.c:
if (cache_new != (void *) -1)
{
...
  SEARCH_CACHE (cache_new);
}

#define SEARCH_CACHE(cache)
...
left = 0;
right = cache->nlibs - 1;
middle = (left + right) / 2;
key = cache->libs[middle].key;
...

(gdb) p/x *((struct cache_file_new *) $r6)
$5 = {magic = {0x67, 0x6c, 0x69, 0x62, 0x63, 0x2d, 0x6c, 0x64, 0x2e, 0x73, 0x6f, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65}, version = {0x31, 0x2e,
    0x31}, nlibs = 0x5e000000, len_strings = 0x48130000, unused = {0x0, 0x0, 0x0, 0x0, 0x0}, libs = 0x3fffdf00030}

(gdb) ptype cache_new
type = struct cache_file_new {
    char magic[17];
    char version[3];
    uint32_t nlibs;
    uint32_t len_strings;
    uint32_t unused[5];
    struct file_entry_new libs[0];
} *

As /etc/ld.so.cache is generated by x86_64 (little endian) code, we get a huge number for nlibs on s390x (big endian).

The segfault happens while:
l %r1,52(%r10,%r6)
=> key = cache->libs[middle].key;
(gdb) i r r6
r6 0x3fffdf00000 => cache_new
(gdb) p &(((struct cache_file_new *) $r6)->libs[0])
$17 = (struct file_entry_new *) 0x3fffdf00030
(gdb) p &(((struct cache_file_new *) $r6)->libs[0].key)
$18 = (uint32_t *) 0x3fffdf00034
=> 0x3fffdf00034 - 0x3fffdf00000 = 0x34 = 52

On glibc upstream > glibc-2.31 && < glibc-2.32,
there is the following commit which adds a further check for corruption, avoiding overflow:
"ld.so: Check for new cache format first and enhance corruption check"
https://sourceware.org/git/?p=glibc.git;a=commit;h=e221c512c74ec42fd47b71de2981a475b38110a4

I've recognized that the libc6-2.31-0ubuntu9.1 package contains the patch
debian/patches/any/submitted-ld.so-cache-new-format.diff
which already patches elf/dl-cache.c in _dl_load_cache_lookup().
Therefore the mentioned commit does not apply.

For testing, I've added this patch and just rebuild the libc6-s390x-cross package:
cat glibc-ldsocache-corruption.diff
--- glibc-2.31/elf/dl-cache.c 2020-11-26 15:36:33.963032580 +0100
+++ glibc-2.31/elf/dl-cache.c 2020-11-26 15:39:13.866894100 +0100
@@ -202,13 +202,16 @@
             PROT_READ);

       /* We can handle three different cache file formats here:
+ - only the new format
   - the old libc5/glibc2.0/2.1 format
   - the old format with the new format in it
- - only the new format
   The following checks if the cache contains any of these formats. */
       if (file != MAP_FAILED && cachesize > sizeof *cache_new
- && memcmp (file, CACHEMAGIC_VERSION_NEW,
- sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
+ && memcmp (file, CACHEMAGIC_VERSION_NEW,
+ sizeof CACHEMAGIC_VERSION_NEW - 1) == 0
+ /* Check for corruption, avoiding overflow. */
+ && ((cachesize - sizeof *cache_new) / sizeof (struct file_entry_new)
+ >= ((struct cache_file_new *) file)->nlibs))
  {
    cache_new = file;
    cache = file;

Now the additional check leads to unmapping ld.so.cache and ignoring the content of ld.so.cache.
The hello-world program is now working fine.

Please add this patch to libc6 package and also rebuild the libc6-*cross packages.

Just as reference:
"Debian Bug report logs - #731082 ld.so.cache parsing code does not deal with mixed endianess multiarch, causing segfaults"
Date: Sun, 1 Dec 2013 19:30:01 UTC
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731082

bugproxy (bugproxy)
tags: added: architecture-s39064 bugnameltc-190005 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
affects: ubuntu → linux (Ubuntu)
Frank Heimes (fheimes)
affects: linux (Ubuntu) → glibc (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
importance: Undecided → Medium
assignee: nobody → Skipper Bug Screeners (skipper-screen-team)
Changed in glibc (Ubuntu):
assignee: Skipper Bug Screeners (skipper-screen-team) → Canonical Foundations Team (canonical-foundations)
Changed in ubuntu-z-systems:
status: New → Triaged
Balint Reczey (rbalint)
tags: added: rls-ff-incoming
Steve Langasek (vorlon)
tags: added: fr-974
Balint Reczey (rbalint)
tags: added: rls-ff-tracked
removed: rls-ff-incoming
tags: removed: rls-ff-tracked
Revision history for this message
In , Florian Weimer (fweimer) wrote :

With qemu-user, it's common that a process of the wrong endianness tries to parse ld.so.cache. For performance reasons, the consistency checks are somewhat limited, so crashes can be the result.

Revision history for this message
In , Florian Weimer (fweimer) wrote :
Changed in glibc:
importance: Unknown → Low
status: Unknown → In Progress
Revision history for this message
In , Florian Weimer (fweimer) wrote :

Fixed for glibc 2.33 via:

commit 84ba719b260551918965d0a433914de683087645
Author: Florian Weimer <email address hidden>
Date: Fri Dec 4 09:13:43 2020 +0100

    elf: Add endianness markup to ld.so.cache (bug 27008)

    Use a reserved byte in the new format cache header to indicate whether
    the file is in little endian or big endian format. Eventually, this
    information could be used to provide a unified cache for qemu-user
    and similiar scenarios.

    Reviewed-by: Adhemerval Zanella <email address hidden>

Changed in glibc:
status: In Progress → Fix Released
Balint Reczey (rbalint)
Changed in glibc (Ubuntu):
status: New → In Progress
Changed in glibc (Ubuntu Focal):
status: New → In Progress
assignee: nobody → Balint Reczey (rbalint)
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: Triaged → In Progress
Balint Reczey (rbalint)
Changed in glibc (Ubuntu Groovy):
status: New → Fix Released
Revision history for this message
Balint Reczey (rbalint) wrote :

The problem is not reproducible on Groovy, but the proper fix, i.e. https://sourceware.org/bugzilla/show_bug.cgi?id=27008#c2 is not present either thus I'm working on backporting that to Focal thus the fix is present in the Groovy SRU, too.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted glibc into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.32-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in glibc (Ubuntu Groovy):
status: Fix Released → Fix Committed
tags: added: verification-needed verification-needed-groovy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello bugproxy, or anyone else affected,

Accepted glibc into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.31-0ubuntu9.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in glibc (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Changed in cross-toolchain-base (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello bugproxy, or anyone else affected,

Accepted cross-toolchain-base into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cross-toolchain-base/43ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cross-toolchain-base (Ubuntu Groovy):
status: New → Invalid
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2020-12-17 09:42 EDT-------
The build of the cross-packages is not finished yet:
https://launchpad.net/ubuntu/+source/cross-toolchain-base/43ubuntu3.1
See "Builds"
Focal: (Icon: currently building) amd64

But I had a look into glibc 2.31-0ubuntu9.2 source package
and recognized Florians patch:
debian/ubuntu/git-elf-Add-endianness-markup-to-ld.so.cache-bug-27008.patch

But compared to upstream, elf/dl-cache.c:_dl_load_cache_lookup():
if (file != MAP_FAILED && cachesize > sizeof *cache_new
&& memcmp (file, CACHEMAGIC_VERSION_NEW,
sizeof CACHEMAGIC_VERSION_NEW - 1) == 0)
### Missing the "Check for corruption, avoiding overflow." here. ###
{
if (! cache_file_new_matches_endian (file))
{

This check was introduced in a different patch. See my former comment:
On glibc upstream > glibc-2.31 && < glibc-2.32,
there is the following commit which adds a further check for corruption, avoiding overflow:
"ld.so: Check for new cache format first and enhance corruption check"
https://sourceware.org/git/?p=glibc.git;a=commit;h=e221c512c74ec42fd47b71de2981a475b38110a4

Revision history for this message
Balint Reczey (rbalint) wrote :

Yes this is a different fix in Focal, but it fixes the actual endianness problem rather than improving the corruption check. In my testing that resolved the reported issue, please give a try to the newly build cross packages.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.31-0ubuntu9.2)

All autopkgtests for the newly accepted glibc (2.31-0ubuntu9.2) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

python-llfuse/1.3.6+dfsg-2build1 (ppc64el)
mercurial/5.3.1-1ubuntu1 (amd64)
datefudge/1.23ubuntu1 (ppc64el)
yade/2020.01a-6build2 (s390x)
raspell/1.3-2build1 (s390x)
burp/2.2.18-2 (arm64)
gnudatalanguage/0.9.9-12build1 (amd64)
threadweaver/5.68.0-0ubuntu1 (amd64)
rancid/3.11-1 (s390x)
r-other-x4r/1.0.1+git20150806.c6bd9bd-2build1 (s390x)
libxmlb/0.1.15-2 (amd64)
feersum/1.407-2 (s390x)
libimage-sane-perl/5-1 (arm64)
gnome-photos/3.34.1-1 (ppc64el)
mbedtls/2.16.4-1ubuntu2 (amd64)
libreoffice/1:6.4.6-0ubuntu0.20.04.1 (armhf)
reprotest/0.7.14 (s390x, arm64)
puma/3.12.4-1ubuntu2 (arm64, s390x)
libdbd-mariadb-perl/1.11-3ubuntu2 (armhf, arm64, amd64, s390x, ppc64el)
python3-lxc/1:3.0.4-1ubuntu6 (s390x)
mpi4py/3.0.3-4build2 (amd64)
nut/2.7.4-11ubuntu4 (s390x)
r-cran-processx/3.4.2-1 (amd64)
boost1.71/1.71.0-6ubuntu6 (amd64)
netplan.io/0.100-0ubuntu4~20.04.3 (amd64)
php-luasandbox/3.0.3-2build2 (armhf)
libtext-markdown-discount-perl/0.12-1 (armhf)
mysql-connector-c++/1.1.12-4ubuntu2 (s390x)
xmobar/0.29.4-2build3 (ppc64el)
golang-github-xenolf-lego/3.2.0-1 (armhf, arm64, amd64, s390x, ppc64el)
cffi/1:0.21.0-1 (amd64)
websocketd/0.3.1-3 (armhf)
cmark-gfm/0.29.0.gfm.0-4 (amd64)
ruby2.7/2.7.0-5ubuntu1.2 (arm64)
golang-github-bmatsuo-lmdb-go/1.8.0+git20170215.a14b5a3-2 (amd64)
lazarus/2.0.6+dfsg-3 (armhf)
gnutls28/3.6.13-2ubuntu1.3 (i386, s390x, ppc64el, armhf, arm64, amd64)
dogtag-pki/10.8.3-1ubuntu1 (armhf, arm64, amd64, s390x, ppc64el)
booth/1.0-174-gce9f821-1 (arm64)
apache2/2.4.41-4ubuntu3.1 (armhf)
libpff/20180714-2 (armhf, arm64, amd64, s390x, ppc64el)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.32-0ubuntu3.1)

All autopkgtests for the newly accepted glibc (2.32-0ubuntu3.1) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

snapd-glib/1.58-0ubuntu0.20.10.0 (armhf)
libcompress-raw-bzip2-perl/unknown (armhf)
node-ws/7.3.0+~cs24.0.3-1build1 (s390x, armhf, ppc64el, amd64, arm64)
austin/unknown (armhf)
r-bioc-rhdf5lib/1.10.1+dfsg-1 (armhf)
tup/0.7.8-3 (arm64)
r-cran-seurat/unknown (armhf)
python-pomegranate/unknown (armhf)
ruby-mysql2/0.5.2-1ubuntu3 (armhf)
libdevel-cover-perl/1.36-1build1 (armhf)
undbx/unknown (armhf)
libtime-warp-perl/0.54-1build1 (ppc64el)
statsprocessor/unknown (armhf)
pycurl/7.43.0.2-7 (armhf)
libhash-fieldhash-perl/unknown (armhf)
reprotest/0.7.15 (s390x)
r-cran-httpuv/1.5.4+dfsg-1 (armhf)
libosinfo/unknown (armhf)
r-cran-batchtools/unknown (armhf)
chiark-tcl/1.3.4ubuntu3 (armhf)
libdbd-mariadb-perl/1.11-3ubuntu2 (s390x, ppc64el, amd64, arm64)
firefox/84.0+build3-0ubuntu0.20.10.1 (arm64)
hilive/2.0a-3build2 (amd64)
etcd/3.2.26+dfsg-8 (amd64)
libdbd-mariadb-perl/unknown (armhf)
prometheus/unknown (armhf)
libticonv/unknown (armhf)
notary/0.6.1~ds2-6 (armhf)
firebird3.0/unknown (armhf)
burrow/unknown (armhf)
ruby-stackprof/0.2.15-2 (arm64)
gnutls28/3.6.15-4ubuntu2 (i386, amd64, s390x, arm64, ppc64el, armhf)
postgresql-plproxy/2.9-2 (armhf)
librg-blast-parser-perl/0.03-6build2 (armhf)
binutils/2.35.1-1ubuntu1 (armhf)
clutter-1.0/1.26.4+dfsg-1 (arm64)
transtermhp/2.09-5 (armhf)
genext2fs/1.5.0-1 (s390x)
python-cmarkgfm/unknown (armhf)
libpff/20180714-2 (s390x, armhf, ppc64el, amd64, arm64)
debsig-verify/unknown (armhf)
bosh/unknown (armhf)
casync/2+20190213-1 (amd64)
golang-github-spf13-cobra/unknown (armhf)
tpm2-tools/unknown (armhf)
umockdev/0.14.3-1 (armhf)
crrcsim/unknown (armhf)
postgis/3.0.2+dfsg-2ubuntu2 (amd64)
r-cran-proc/unknown (armhf)
mercurial/5.5.1-1 (armhf)
r-cran-dqrng/unknown (armhf)
frobby/unknown (armhf)
libcrypt-cast5-perl/unknown (armhf)
drumkv1/0.9.17-1 (ppc64el)
nsf/unknown (armhf)
python3-lxc/1:3.0.4-1ubuntu6 (s390x)
hyphy/2.5.1+dfsg-3build1 (amd64)
fatrace/0.16-1 (arm64)
bio-rainbow/unknown (armhf)
python-fabio/0.10.2+dfsg-2 (armhf)
hhsuite/3.2.0-3 (amd64)
libperlio-layers-perl/0.012-1 (armhf)
postgresql-common/unknown (armhf)
menhir/20200624-1 (s390x)
notify-osd/0.9.35+20.04.20191129-0ubuntu1 (ppc64el)
r-cran-xfun/unknown (armhf)
gifsicle/1.92-2 (armhf)
libunix-processors-perl/unknown (armhf)
freebayes/unknown (armhf)
alertmanager-irc-relay/0.1.0-3 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-01-12 05:22 EDT-------
(In reply to comment #13)
> Yes this is a different fix in Focal, but it fixes the actual endianness
> problem rather than improving the corruption check. In my testing that
> resolved the reported issue, please give a try to the newly build cross
> packages.

I've just updated to these packages:
libc-bin/focal-proposed,now 2.31-0ubuntu9.2 amd64 [installed,automatic]
libc6/focal-proposed,now 2.31-0ubuntu9.2 amd64 [installed,automatic]
libc6-s390x-cross/focal-proposed,focal-proposed,now 2.31-0ubuntu9.2cross1 all [installed]

And checked that ldconfig has written /etc/ld.so.cache with flags = cache_file_new_flags_endian_little = 2.

And successfully run a s390x binary:
$ qemu-s390x -L /usr/s390x-linux-gnu ./helloworld-s390x
Hello world

Thanks.

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx for the verification, Stefan - I'm updating the tags accordingly ...

tags: added: verification-done verification-done-focal verification-done-groovy
removed: verification-needed verification-needed-focal verification-needed-groovy
bugproxy (bugproxy)
tags: added: targetmilestone-inin2004 verification-needed verification-needed-focal verification-needed-groovy
removed: targetmilestone-inin--- verification-done verification-done-focal verification-done-groovy
Revision history for this message
Balint Reczey (rbalint) wrote :

To have this update releases we need to verify it for Groovy, too, despite Groovy was not affected. Please check Groovy, too, or I will do it later.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2021-01-13 10:19 EDT-------
I've just installed
libc-bin/groovy-proposed,now 2.32-0ubuntu3.1 amd64 [installed,automatic]
libc6/groovy-proposed,now 2.32-0ubuntu3.1 amd64 [installed,automatic]
and /etc/ld.so.cache contains the flags = cache_file_new_flags_endian_little = 2.

Which libc6-s390x-cross groovy package version is based on libc6-2.32-0ubuntu3.1 ?

Mathew Hodson (mhodson)
Changed in cross-toolchain-base (Ubuntu Focal):
importance: Undecided → Medium
Changed in cross-toolchain-base (Ubuntu):
importance: Undecided → Medium
Changed in glibc (Ubuntu):
importance: Undecided → Medium
Changed in glibc (Ubuntu Focal):
importance: Undecided → Medium
Changed in glibc (Ubuntu Groovy):
importance: Undecided → Medium
Changed in cross-toolchain-base (Ubuntu Groovy):
importance: Undecided → Medium
Changed in glibc (Debian):
status: Unknown → Confirmed
Revision history for this message
Balint Reczey (rbalint) wrote :

@<email address hidden> the cross packages haven't been updated in Groovy, because they are working properly AFAIK. Just run the test with the latest cross packages available, please.

Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2021-01-21 05:06 EDT-------
You are right, I've just successfully run a small helloworld on groovy:
qemu-s390x -L /usr/s390x-linux-gnu ./helloworld-s390x
Hello world

I've used these packages:
libc-bin/groovy-proposed,now 2.32-0ubuntu3.1 amd64 [installed,automatic]
libc6/groovy-proposed,now 2.32-0ubuntu3.1 amd64 [installed,automatic]
libc6-s390x-cross/groovy,now 2.32-0ubuntu3cross2 all [installed]
As far as I understand, this libc6-s390x-cross package is based on older libc6-2.32-0ubuntu3 package.

Note that the used libc6-package writes the endianess marker to ld.so.cache. But the libc6-s390x-cross does not check for this endianess marker (the patch git-elf-Add-endianness-markup-to-ld.so.cache-bug-27008.patch was added with newer libc6-2.32-0ubuntu3.1 package)!

But as glibc-2.32 is used, there is the enhanced corruption check. This time, I haven't debugged it, but I assume that this is the reason, why the helloworld works on groovy):
if (file != MAP_FAILED && cachesize > sizeof *cache_new
&& memcmp (file, CACHEMAGIC_VERSION_NEW,
sizeof CACHEMAGIC_VERSION_NEW - 1) == 0
/* Check for corruption, avoiding overflow. */
&& ((cachesize - sizeof *cache_new) / sizeof (struct file_entry_new)
>= ((struct cache_file_new *) file)->nlibs))
{

Note that the focal libc6/libc6-s390x-cross packages both have the endianess marker patch, but are missing this corruption check. See my previous comment with
### Missing the "Check for corruption, avoiding overflow." here. ###

Frank Heimes (fheimes)
tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Balint Reczey (rbalint) wrote :
tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for glibc has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cross-toolchain-base - 43ubuntu3.1

---------------
cross-toolchain-base (43ubuntu3.1) focal; urgency=medium

  * Build using glibc 2.31-0ubuntu9.2 (LP: #1906250)

 -- Balint Reczey <email address hidden> Wed, 16 Dec 2020 12:08:17 +0100

Changed in cross-toolchain-base (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.31-0ubuntu9.2

---------------
glibc (2.31-0ubuntu9.2) focal; urgency=medium

  * Drop check preventing using float128 which breaks new icc (LP: #1895358)
  * Detect debconf consistently in libc6.preinst and do not crash if it is
    not used (LP: #1902955)
  * Ship libc variant compiled for profiling in libc6-prof (LP: #1908307)
  * elf: Add endianness markup to ld.so.cache (Closes: #731082) (LP: #1906250)

 -- Balint Reczey <email address hidden> Wed, 16 Dec 2020 12:04:55 +0100

Changed in glibc (Ubuntu Focal):
status: Fix Committed → Fix Released
tags: added: block-proposed-groovy
Balint Reczey (rbalint)
Changed in glibc (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-z-systems:
status: In Progress → Fix Committed
Mathew Hodson (mhodson)
Changed in cross-toolchain-base (Ubuntu):
status: New → Fix Released
no longer affects: cross-toolchain-base (Ubuntu Groovy)
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-02-11 03:36 EDT-------
IBM Bugzilla status->closed, Fix Released with all requested distros

Changed in glibc (Debian):
status: Confirmed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello bugproxy, or anyone else affected,

Accepted glibc into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/glibc/2.32-0ubuntu3.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-groovy
removed: verification-done verification-done-groovy
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-04-08 06:13 EDT-------
Already verified on groovy by IBM

Revision history for this message
Frank Heimes (fheimes) wrote :

Thx, adjusting the tags accordingly ...

tags: added: verification-done verification-done-groovy
removed: verification-needed verification-needed-groovy
Balint Reczey (rbalint)
tags: removed: block-proposed-groovy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (glibc/2.32-0ubuntu3.2)

All autopkgtests for the newly accepted glibc (2.32-0ubuntu3.2) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

cyrus-imapd/3.2.3-2ubuntu1 (armhf)
pyqt5/5.15.0+dfsg-1 (s390x)
libsass/3.6.4-3 (s390x)
network-manager/1.26.2-1ubuntu1 (arm64)
reprotest/0.7.15 (s390x)
flatpak/1.8.2-1ubuntu0.1 (arm64)
puma/3.12.4-1ubuntu2 (arm64, s390x)
libtext-charwidth-perl/0.04-10 (ppc64el)
systemd/246.6-1ubuntu1.3 (arm64)
taptempo/1.4.5-1 (arm64)
uftrace/0.9.3-1ubuntu1 (arm64)
libgdata/0.17.12-1 (armhf)
cysignals/1.10.2+ds-4 (amd64)
hyphy/2.5.1+dfsg-3build1 (amd64)
glibc/2.32-0ubuntu3.2 (amd64)
libdate-simple-perl/3.0300-3 (arm64)
netplan.io/0.101-0ubuntu3~20.10.1 (amd64)
libastro-fits-cfitsio-perl/1.14-1 (ppc64el)
fwlogwatch/1.4-2 (arm64)
pandas/1.0.5+dfsg-3 (ppc64el, armhf, s390x, amd64, arm64)
rhonabwy/0.9.12-2build1 (s390x)
jailkit/2.21-2 (ppc64el)
openjdk-lts/11.0.10+9-0ubuntu1~20.10 (s390x)
dbus/1.12.20-1ubuntu1 (arm64)
pymca/5.5.5+dfsg-2build2 (arm64)
euslisp/9.27+dfsg-6 (armhf, amd64)
libflame/5.2.0-2 (amd64)
samtools/1.10-4 (arm64)
syncthing/1.10.0~ds1-1 (amd64, s390x)
endlessh/1.1-4 (armhf)
r-cran-amore/0.2-16-1build1 (ppc64el)
crrcsim/0.9.13-3.2build1 (ppc64el)
samplv1/0.9.17-1 (ppc64el)
hugo/0.74.3-1 (armhf)
libcsfml/2.5-1build1 (ppc64el)
firefox/87.0+build3-0ubuntu0.20.10.1 (armhf)
etcd/3.2.26+dfsg-8 (amd64)
libnxml/0.18.3-8 (s390x)
google-osconfig-agent/20210219.00-0ubuntu1~20.10.0 (armhf)
combblas/1.6.2-5build1 (arm64)
libbio-db-hts-perl/3.01-3 (amd64)
libterm-readkey-perl/2.38-1build1 (s390x)
ruby2.7/2.7.1-3ubuntu1.2 (armhf)
hkl/5.0.0.2620-1build1 (ppc64el)
liblinux-inotify2-perl/1:2.2-2 (ppc64el)
datefudge/1.24 (ppc64el)
libpgplot-perl/1:2.24-1build1 (s390x)
healpy/1.14.0-1 (arm64)
udisks2/2.9.1-2ubuntu1 (amd64)
kopanocore/8.7.0-7ubuntu4 (arm64)
gyoto/1.4.4-3build1 (s390x)
cpdb-libs/1.2.0-0ubuntu8 (armhf)
ruby-concurrent/1.1.6+dfsg-3 (amd64)
postgis/3.0.2+dfsg-2ubuntu2 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#glibc

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Frank Heimes (fheimes) wrote :

Ubuntu 20.10 (Groovy Gorilla) reached its End of Life on July 22 2021, hence I'm updating the groovy entry of this ticket - and with that the overall ticket status.

Changed in glibc (Ubuntu Groovy):
status: Fix Committed → Won't Fix
Changed in ubuntu-z-systems:
status: Fix Committed → Fix Released
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.