public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly
@ 2010-11-14 12:50 tron at NetBSD dot org
2010-11-16 3:10 ` [Bug libc/12218] " pasky at suse dot cz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tron at NetBSD dot org @ 2010-11-14 12:50 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12218
Summary: getenv(3) handles variable names with equal signs
incorrectly
Product: glibc
Version: 2.11
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: tron@NetBSD.org
Created attachment 5121
--> http://sourceware.org/bugzilla/attachment.cgi?id=5121
Program which demonstrates the bug in getenv(3)
getenv(3) doesn't check whether the variable name contains an equal sign (which
it shouldn't) and will therefore return an incorrect result as demonstrated by
the attached program:
getenv: getenv.c:11: main: Assertion `getenv("EVIL=VERY") == ((void *)0)'
failed.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12218] getenv(3) handles variable names with equal signs incorrectly
2010-11-14 12:50 [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly tron at NetBSD dot org
@ 2010-11-16 3:10 ` pasky at suse dot cz
2010-11-16 8:58 ` tron at NetBSD dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pasky at suse dot cz @ 2010-11-16 3:10 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12218
Petr Baudis <pasky at suse dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
CC| |pasky at suse dot cz
--- Comment #1 from Petr Baudis <pasky at suse dot cz> 2010-11-16 03:10:20 UTC ---
I'd say garbage in - garbage out. Why do you think it's worthwhile adding a
test for such a special case, slowing down all users?
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12218] getenv(3) handles variable names with equal signs incorrectly
2010-11-14 12:50 [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly tron at NetBSD dot org
2010-11-16 3:10 ` [Bug libc/12218] " pasky at suse dot cz
@ 2010-11-16 8:58 ` tron at NetBSD dot org
2010-11-16 13:51 ` drepper.fsp at gmail dot com
2014-06-30 6:28 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: tron at NetBSD dot org @ 2010-11-16 8:58 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12218
--- Comment #2 from Matthias Scheler <tron at NetBSD dot org> 2010-11-16 08:57:54 UTC ---
Argument validation is always a good thing.
And you can avoid the performance hit by looking for the equal sign while you
determine the length of the supplied name.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12218] getenv(3) handles variable names with equal signs incorrectly
2010-11-14 12:50 [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly tron at NetBSD dot org
2010-11-16 3:10 ` [Bug libc/12218] " pasky at suse dot cz
2010-11-16 8:58 ` tron at NetBSD dot org
@ 2010-11-16 13:51 ` drepper.fsp at gmail dot com
2014-06-30 6:28 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: drepper.fsp at gmail dot com @ 2010-11-16 13:51 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=12218
Ulrich Drepper <drepper.fsp at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WONTFIX
--- Comment #3 from Ulrich Drepper <drepper.fsp at gmail dot com> 2010-11-16 13:51:37 UTC ---
There is no reason to change anything. GIGO is exactly the right answer.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libc/12218] getenv(3) handles variable names with equal signs incorrectly
2010-11-14 12:50 [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly tron at NetBSD dot org
` (2 preceding siblings ...)
2010-11-16 13:51 ` drepper.fsp at gmail dot com
@ 2014-06-30 6:28 ` fweimer at redhat dot com
3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 6:28 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=12218
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-30 6:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-14 12:50 [Bug libc/12218] New: getenv(3) handles variable names with equal signs incorrectly tron at NetBSD dot org
2010-11-16 3:10 ` [Bug libc/12218] " pasky at suse dot cz
2010-11-16 8:58 ` tron at NetBSD dot org
2010-11-16 13:51 ` drepper.fsp at gmail dot com
2014-06-30 6:28 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).