Description of problem: Added my account (which is configured through SSSD) to group wheel, and then calling newgrp triggered the sigsegv. Version-Release number of selected component: shadow-utils-2:4.9-3.fc35 Additional info: reporter: libreport-2.15.2 backtrace_rating: 4 cgroup: 0::/user.slice/user-4202930.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-f7b5869c-82f3-4f72-986f-15653b5d0667.scope cmdline: newgrp wheel crash_function: spw_free executable: /usr/bin/newgrp journald_cursor: s=d9599decfbf44dfbba374eb07f3bb98e;i=12df;b=bba89e2a3dc24be8a0d38b4a9ee7327b;m=6b14647d;t=5cfd36b6e988f;x=ca78ae0ca848010d kernel: 5.14.10-300.fc35.x86_64 rootdir: / runlevel: N 5 type: CCpp uid: 4202930 Truncated backtrace: Thread no. 1 (2 frames) #0 spw_free at ../lib/shadowmem.c:82 #1 check_perms at /usr/src/debug/shadow-utils-4.9-3.fc35.x86_64/src/newgrp.c:167
Created attachment 1839344 [details] File: backtrace
Created attachment 1839345 [details] File: core_backtrace
Created attachment 1839346 [details] File: cpuinfo
Created attachment 1839347 [details] File: dso_list
Created attachment 1839348 [details] File: environ
Created attachment 1839349 [details] File: exploitable
Created attachment 1839350 [details] File: limits
Created attachment 1839351 [details] File: maps
Created attachment 1839352 [details] File: mountinfo
Created attachment 1839353 [details] File: open_fds
Created attachment 1839354 [details] File: proc_pid_status
I followed the steps I have recorded at https://docs.engineering.redhat.com/display/~ctimko/Installing+Fedora+34+or+Fedora+35
I guess this is happening due to this change https://github.com/shadow-maint/shadow/commit/e65cc6aebcb4132fa413f00a905216a5b35b3d57 Would you be willing to test a fix that I could prepare?
I'd be happy to. Let me know when it's ready.
The test build is available in https://copr.fedorainfracloud.org/coprs/ipedrosa/newgrp-segfault/ Steps to test: 1. dnf copr enable ipedrosa/newgrp-segfault 2. dnf update shadow-utils 3. Test
I got a GPG Check Failed when trying to do the update: sudo dnf update shadow-utils Copr repo for newgrp-segfault owned by ipedrosa 14 kB/s | 7.6 kB 00:00 Dependencies resolved. ================================================================================================================================================= Package Architecture Version Repository Size ================================================================================================================================================= Upgrading: shadow-utils x86_64 2:4.9-6test.fc35 copr:copr.fedorainfracloud.org:ipedrosa:newgrp-segfault 1.1 M Transaction Summary ================================================================================================================================================= Upgrade 1 Package Total download size: 1.1 M Is this ok [y/N]: y Downloading Packages: shadow-utils-4.9-6test.fc35.x86_64.rpm 2.6 MB/s | 1.1 MB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.6 MB/s | 1.1 MB 00:00 Copr repo for newgrp-segfault owned by ipedrosa 3.7 kB/s | 1.0 kB 00:00 The GPG keys listed for the "Copr repo for newgrp-segfault owned by ipedrosa" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository.. Failing package is: shadow-utils-2:4.9-6test.fc35.x86_64 GPG Keys are configured as: https://download.copr.fedorainfracloud.org/results/ipedrosa/newgrp-segfault/pubkey.gpg The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: GPG check FAILED I reran it with `sudo dnf update --nogpgcheck shadow-utils` and that installed. [ctimko@ctimko ~]$ sudo groupadd test_group [ctimko@ctimko ~]$ sudo usermod -aG test_group ctimko [ctimko@ctimko ~]$ groups ctimko wheel devel eso-srt [ctimko@ctimko ~]$ newgrp test_group [ctimko@ctimko ~]$ groups test_group wheel devel eso-srt ctimko Seems to work as expected now.
Upstream PR: https://github.com/shadow-maint/shadow/pull/437
master newgrp: fix segmentation fault - 497e90751bc0d95cc998b0f06305040563903948
FEDORA-2021-380251ce99 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-380251ce99
FEDORA-2021-380251ce99 has been pushed to the Fedora 35 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-380251ce99` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-380251ce99 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2021-380251ce99 has been pushed to the Fedora 35 stable repository. If problem still persists, please make note of it in this bug report.