Bug 712158
Summary: | uid/gid overflow in ipcs | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Mike Gahagan <mgahagan> |
Component: | util-linux-ng | Assignee: | Karel Zak <kzak> |
Status: | CLOSED ERRATA | QA Contact: | qe-baseos-daemons |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | azelinka, jburke, jmarko, jstancek, kvolny, rvokal |
Target Milestone: | rc | ||
Target Release: | 6.2 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-12-06 17:11:04 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: |
Description
Mike Gahagan
2011-06-09 16:08:59 UTC
After further investigation, this looks to be a bug in ipcs. If a user with an id > 2147483647 exists in /etc/passwd then we print the user name as expected. If however the user that creates the segment/semaphore/message queue is later deleted from /etc/passwd then we overflow and print a negative value. [root@test1239 iknowthis]# adduser -u 4294967293 biggeruid [root@test1239 iknowthis]# su biggeruid -c 'ipcmk -M 1023' Shared memory id: 3145800 [root@test1239 iknowthis]# ipcs | grep 3145 0x4e8fb57b 3145800 biggeruid 644 1023 0 0x808648a4 3145824 nobody 255 0 0 [root@test1239 iknowthis]# userdel biggeruid [root@test1239 iknowthis]# ipcs | grep 3145 0x4e8fb57b 3145800 -3 644 1023 0 0x808648a4 3145824 nobody 255 0 0 [root@test1239 iknowthis]# adduser -u 2147483646 biguser32 [root@test1239 iknowthis]# su biguser32 -c 'ipcmk -M 1023' Shared memory id: 3178569 [root@test1239 iknowthis]# ipcs | grep 3178569 0x5d9692ae 3178569 biguser32 644 1023 0 [root@test1239 iknowthis]# userdel biguser32 [root@test1239 iknowthis]# ipcs | grep 3178569 0x5d9692ae 3178569 2147483646 644 1023 0 [root@test1239 iknowthis]# adduser -u 2147483648 biggeruser32 [root@test1239 iknowthis]# su biggeruser32 -c 'ipcmk -M 1023' Shared memory id: 3211338 [root@test1239 iknowthis]# ipcs | grep 3211338 0x703d3943 3211338 biggeruser 644 1023 0 [root@test1239 iknowthis]# userdel biggeruser32 [root@test1239 iknowthis]# ipcs | grep 3211338 0x703d3943 3211338 -2147483648 644 1023 0 [root@test1239 iknowthis]# adduser -u 4294967297 overflowbiguser32 adduser: invalid user ID '4294967297' uid_t and gid_t are unsigned types -- unfortunately, ipcs(1) uses %d for the types... Fixed by upstream commit 344f73442d3a45db5927c049eef1ed8cf5d13934. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1691.html |