This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18660] Fix overflow in getusershell
- From: "ppluzhnikov at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 10 Aug 2015 04:36:23 +0000
- Subject: [Bug libc/18660] Fix overflow in getusershell
- Auto-submitted: auto-generated
- References: <bug-18660-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18660
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
> This fix has been applied in OpenBSD.
The fix is wrong: it adds 2 bytes to "shells".
Did you intend to add "2 * sizeof (char *)" ?
It seems to me that even adding 2 * sizeof (char *) is insufficient: if
/etc/shells contains 10 two-byte lines "/\n", then "shells" will point to an
array of 20/3 + 2 == 8 pointers, and we'll try to write 11 entries into it.
--
You are receiving this mail because:
You are on the CC list for the bug.