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.
Yep, thanks for filing the bug on this side. We're just waiting until it's committed first. It's still in review.
Committed upstream to master today but not yet on their backport branches.
In patchsets gentoo/glibc-2.36-10 and gentoo/glibc-2.37-4
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(-)
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.
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.
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).
OK then please test and stabilize it now.
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
amd64 done
hppa done
ping
arm done
arm64 done
ppc done
ppc64 done
sparc done
x86 done all arches done