This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/9706] New: 32 bits uid/gid overflow
- From: "aurelien at aurel32 dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 4 Jan 2009 10:56:47 -0000
- Subject: [Bug libc/9706] New: 32 bits uid/gid overflow
- Reply-to: sourceware-bugzilla at sourceware dot org
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.