Kernel version: Linux 6.1.2
GCC version: Gentoo Hardened 12.2.1_p20221231 p8
Shadow version: 4.13-r1
I have tried the following...
* Rebuild util-linux, shadow, attr, pam.
* Try an older kernel version (because of the gdb output)
* Rebuilt the same packages above for the older Linux 6.0.19 kernel.
The gdb output...
Code: Select all
# gdb --args useradd -m -G users test1298
GNU gdb (Gentoo 12.1 vanilla) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from useradd...
Reading symbols from /usr/lib/debug//usr/sbin/useradd.debug...
(gdb) run
Starting program: /usr/sbin/useradd -m -G users test1298
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00006441cfa84319 in __sgr_dup (sgent=0x1000) at sgroupio.c:36
36 sgroupio.c: No such file or directory.
(gdb) bt
#0 0x00006441cfa84319 in __sgr_dup (sgent=0x1000) at sgroupio.c:36
#1 0x00006441cfa85c29 in commonio_open (db=db@entry=0x6441cfa92ca0 <gshadow_db>, mode=2, mode@entry=66)
at commonio.c:694
#2 0x00006441cfa846ce in sgr_open (mode=mode@entry=66) at sgroupio.c:246
#3 0x00006441cfa7856e in open_group_files () at useradd.c:1856
#4 0x00006441cfa790fd in get_groups (list=0x7ffff616ef6d "users") at useradd.c:766
#5 process_flags (argc=argc@entry=5, argv=argv@entry=0x7ffff616ddb8) at useradd.c:1354
#6 0x00006441cfa73e46 in main (argc=5, argv=0x7ffff616ddb8) at useradd.c:2499
(gdb) p *sgent
Cannot access memory at address 0x1000




