Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895784 - sys-libs/glibc-2.36-r8 stabilization
Summary: sys-libs/glibc-2.36-r8 stabilization
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://github.com/shadow-maint/shado...
Whiteboard: was: sys-libs/glibc: Bug in error han...
Keywords: CC-ARCHES
Depends on:
Blocks: 907241
  Show dependency tree
 
Reported: 2023-02-22 06:58 UTC by Hanno Böck
Modified: 2023-06-26 11:28 UTC (History)
4 users (show)

See Also:
Package list:
sys-libs/glibc-2.36-r8
Runtime testing required: ---
nattka: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2023-02-22 06:58:27 UTC
There is a bug in glibc that causes crashes in several tools from the shadow package that parse the gshadow file. This bug happens if gshadow contains lines 1024 chars or longer (i.e. if one has groups with a large number of users in them).

Test:
touch 1
for x in {1..1024}; do echo -n a; done > 2
grpck 1 2
Segmentation fault

(grpck is just one example tool where it is easy to demonstrate, other tools like useradd can also crash)

This did not show up in earlier versions of shadow due to another bug that causes the configure script not to detect the gshadow parsing functionality in glibc. However Gentoo contains now a patch (shadow-4.13-configure-clang16.patch - also upstream) that exposes this bug. See discussion here:
https://github.com/shadow-maint/shadow/issues/628

Florian Weimer figured out that underlying is a glibc bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=30151
https://sourceware.org/pipermail/libc-alpha/2023-February/145752.html

Given that this can render basic system tools unusable on some systems, I think it'd be good to backport that patch to Gentoo's glibc package.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-02-22 07:00:04 UTC
Yep, thanks for filing the bug on this side.

We're just waiting until it's committed first. It's still in review.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-07 11:10:28 UTC
Committed upstream to master today but not yet on their backport branches.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2023-04-10 23:08:11 UTC
In patchsets gentoo/glibc-2.36-10 and gentoo/glibc-2.37-4
Comment 4 Larry the Git Cow gentoo-dev 2023-04-13 22:58:05 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d92b93c9a238d7ee31ab24a7be1a4d4a1ad1bdb2

commit d92b93c9a238d7ee31ab24a7be1a4d4a1ad1bdb2
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2023-04-13 22:57:07 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2023-04-13 22:57:53 +0000

    sys-libs/glibc: rekeyword 2.36-r8 and 2.37-r2
    
    Bug: https://bugs.gentoo.org/895784
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sys-libs/glibc/glibc-2.36-r8.ebuild | 2 +-
 sys-libs/glibc/glibc-2.37-r2.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2023-05-07 21:18:06 UTC
I have no real feeling for how urgent this is... unless someone shouts I'll try to collect some more fixes in the 2.36 branch before stabilizing a new version there.
Comment 6 Josh G 2023-05-08 18:36:05 UTC
Given the removal of shadow-4.12.3-r1 from portage, this is urgent-ish for me

I've had to mask shadow 4.13 until glibc-2.36.r8 is marked stable

-Josh 

(In reply to Andreas K. Hüttel from comment #5)
> I have no real feeling for how urgent this is... unless someone shouts I'll
> try to collect some more fixes in the 2.36 branch before stabilizing a new
> version there.
Comment 7 Hanno Böck gentoo-dev 2023-05-08 18:42:09 UTC
I also feel given that this breaks some basic tools in util-linux this should not wait much longer. I'm kinda surprised there aren't more people showing up here with breakage (yet maybe people see the segfaults and don't really know where to look for the cause).
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2023-05-08 21:05:14 UTC
OK then please test and stabilize it now.
Comment 9 Josh G 2023-05-11 05:54:25 UTC
Updated to sys-libs/glibc-2.36-r8, and adding users works fine with sys-apps/shadow-4.13-r3

No bugs or oddness so far.

-J
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-12 01:14:19 UTC
amd64 done
Comment 11 Rolf Eike Beer archtester 2023-05-16 20:04:37 UTC
hppa done
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-17 05:17:42 UTC
ping
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:12 UTC
arm done
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:13 UTC
arm64 done
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:15 UTC
ppc done
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:16 UTC
ppc64 done
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:18 UTC
sparc done
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 11:28:19 UTC
x86 done

all arches done