public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18043] New: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param
@ 2015-02-26 23:10 konstantin.s.serebryany at gmail dot com
  2015-02-28  3:49 ` [Bug libc/18043] " ppluzhnikov at google dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: konstantin.s.serebryany at gmail dot com @ 2015-02-26 23:10 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18043

            Bug ID: 18043
           Summary: buffer-overflow (read past the end) in
                    wordexp/parse_dollars/parse_param
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: konstantin.s.serebryany at gmail dot com
                CC: drepper.fsp at gmail dot com
             Flags: security+

#include <wordexp.h>
#include <string.h>
int main() {
  char *p = strdup("${");
  wordexp_t w;
  wordexp(p, &w, 0);
}

==15405== Invalid read of size 1
==15405==    at 0x4F1DE5C: parse_param (wordexp.c:1428)
==15405==    by 0x4F1DE5C: parse_dollars (wordexp.c:2102)
==15405==    by 0x4F1FFEB: wordexp (wordexp.c:2348)
==15405==    by 0x4005AA: main
==15405==  Address 0x51fb043 is 0 bytes after a block of size 3 alloc'd
==15405==    at 0x4C2ABBD: malloc (vg_replace_malloc.c:296)
==15405==    by 0x4EBE839: strdup (strdup.c:42)
==15405==    by 0x40058E: main

This time it's unclear to me how bad this bug is because 
the man page explicitly says that 
"there must not be any unescaped newline or |, &, ;, <, >, (, ), {, }
characters"
OTOH, buffer overflow is still a bit too much. 

2.19 and fresh trunk are affected.
Same fuzzer, see https://sourceware.org/glibc/wiki/FuzzingLibc

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2015-03-19 14:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 23:10 [Bug libc/18043] New: buffer-overflow (read past the end) in wordexp/parse_dollars/parse_param konstantin.s.serebryany at gmail dot com
2015-02-28  3:49 ` [Bug libc/18043] " ppluzhnikov at google dot com
2015-03-06 17:14 ` cvs-commit at gcc dot gnu.org
2015-03-06 17:16 ` ppluzhnikov at google dot com
2015-03-09  4:39 ` cvs-commit at gcc dot gnu.org
2015-03-09  6:21 ` konstantin.s.serebryany at gmail dot com
2015-03-09 14:25 ` cvs-commit at gcc dot gnu.org
2015-03-09 14:28 ` ppluzhnikov at google dot com
2015-03-09 16:42 ` konstantin.s.serebryany at gmail dot com
2015-03-09 17:55 ` konstantin.s.serebryany at gmail dot com
2015-03-09 18:20 ` ppluzhnikov at google dot com
2015-03-09 18:39 ` konstantin.s.serebryany at gmail dot com
2015-03-09 18:47 ` konstantin.s.serebryany at gmail dot com
2015-03-09 18:51 ` ppluzhnikov at google dot com
2015-03-09 19:09 ` konstantin.s.serebryany at gmail dot com
2015-03-09 19:10 ` konstantin.s.serebryany at gmail dot com
2015-03-09 19:22 ` ppluzhnikov at google dot com
2015-03-09 19:28 ` konstantin.s.serebryany at gmail dot com
2015-03-09 22:25 ` ppluzhnikov at google dot com
2015-03-09 22:35 ` konstantin.s.serebryany at gmail dot com
2015-03-09 23:16 ` ppluzhnikov at google dot com
2015-03-11 15:57 ` cvs-commit at gcc dot gnu.org
2015-03-11 16:01 ` ppluzhnikov at google dot com
2015-03-19 14:55 ` 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).