This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/9706] New: 32 bits uid/gid overflow


uid/gid use 32 bits integer and if a uid/gid is set bigger than (2^32)-1 on a 
64-bit system, there is an overflow:

# echo "toto:x:4294967296:4294967296:Fake root:/home/linus:/bin/bash" 
>> /etc/passwd
# id toto
uid=0(root) gid=0(root) groupes=0(root)

This is due to the use of strtoul() to parse the uid/gid value, followed by a 
cast to an int without any check.

-- 
           Summary: 32 bits uid/gid overflow
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=9706

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]