Bug 85346 - invalid uids cause overflow in getUname
invalid uids cause overflow in getUname
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks: 84648
  Show dependency treegraph
 
Reported: 2003-02-28 08:10 EST by Denys Duchier
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-17 11:14:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Denys Duchier 2003-02-28 08:10:26 EST
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 11:14:58 EDT
Ah yes, that was borken. Thanks for the analysis.

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

Note You need to log in before you can comment on or make changes to this bug.