Bug 86490

Summary: useradd crashes while adding user
Product: [Retired] Red Hat Linux Reporter: Per Steinar Iversen <persteinar.iversen>
Component: shadow-utilsAssignee: Peter Vrabec <pvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.12-5.FC4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-09 10:35:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
A small shell-script that illustrates the problem none

Description Per Steinar Iversen 2003-03-24 08:47:38 UTC
Description of problem:

useradd segfaults while adding user when a large group already exists.

Version-Release number of selected component (if applicable):

shadow-utils-4.0.3-6

How reproducible:

Always.

Steps to Reproduce:
1. Make a very large group.
2. Add users, also adding them to the large group.
3. useradd eventually dies when there are too many member of the group.
    
Actual results:

# /usr/sbin/useradd -u 1440072 -g 1440072 -d /dev/null -s /bin/false aluit32
Segmentation fault

The end of a trace done with "strace -f":
read(8, ",s116518,s116519,s116520,s116521"..., 4096) = 4096
read(8, ",s117249,s117250,s117252,s117253"..., 4096) = 4096
read(8, "s100673,s100681,s100683,s100687,"..., 4096) = 4096
brk(0)                                  = 0x8440000
brk(0x8444000)                          = 0x8444000
read(8, "s109058,s109060,s109061,s109064,"..., 4096) = 4096
brk(0)                                  = 0x8444000
brk(0x8449000)                          = 0x8449000
read(8, "s116530,s116531,s116533,s116534,"..., 4096) = 4096
read(8, "s117270,s117271,s117272,s117273,"..., 4096) = 4096
brk(0)                                  = 0x8449000
brk(0x844c000)                          = 0x844c000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++



Expected results:

The user should have been created.

Additional info:

The machine is to be a Samba PDC for a large student network.

Comment 1 Per Steinar Iversen 2003-04-04 13:29:25 UTC
Created attachment 90895 [details]
A small shell-script that illustrates the problem

On a freshly installed test machine running RH 9 and shadow-utils-4.0.3-6 the
output of this script crashes groupadd/groupdel after adding 2057 users. The
only way to recover is to edit passwd, shadow, group, gshadow by hand,
shadow-utils does not handle this case at all.