Bug 85346

Summary: invalid uids cause overflow in getUname
Product: [Retired] Red Hat Linux Reporter: Denys Duchier <duchier>
Component: rpm-buildAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-04-17 15:14:58 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:
Bug Depends On:    
Bug Blocks: 84648    

Description Denys Duchier 2003-02-28 13:10:26 UTC
when a source rpm somehow contains a non-portable uid (instead of root), 
getUname is invoked repeatedly, each time increments uid_used, but then 
getpwuid returns a NULL pointer.  The code correctly checks for the NULL 
pointer, but does not redecrement uid_used in that case.  Thus, if there 
are more than 1024 calls to getUname with this same non-portable uid, the 
unames cache overflows eventhough none of its entries are used. 
 
I have no idea how the non-portable uid gets into the src rpm in the first 
place, perhaps this is an issue of login vs non-login root shell when creating 
the src rpm.

Comment 1 Jeff Johnson 2003-04-17 15:14:58 UTC
Ah yes, that was borken. Thanks for the analysis.

Fixed in CVS, will be in rpm-4.3 when built.