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 network/13785] New: Add regression test for res_nquerydomain.


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

             Bug #: 13785
           Summary: Add regression test for res_nquerydomain.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: network
        AssignedTo: unassigned@sourceware.org
        ReportedBy: carlos@systemhalted.org
    Classification: Unclassified
              Host: i686-pc-linux-gnu
            Target: i686-pc-linux-gnu
             Build: i686-pc-linux-gnu


Add a regression test for commit:
~~~
commit 8fdceb2efda8cf724cfc4444af86b5f135ad3172
Author: Jeff Law <law@redhat.com>
Date:   Wed Feb 29 11:51:27 2012 -0500

    [network] Avoid out ouf bounds read in __libc_res_nquerydomain

    2012-02-28  Jeff Law  <law@redhat.com>

        * resolv/res_query.c (__libc_res_nquerydomain): Avoid
        out of bounds read.

~~~

Start with something like this:
~~~
#include <stdlib.h>
#include <resolv.h>
main()
{
 char buf[20];
 res_state statp = malloc (sizeof (res_state));
 memset (statp, 0, sizeof (statp));
 res_nquerydomain (statp, "", NULL, 0, 0, buf, 20);
}
~~~

Notes:
* mmap a page, touch first bit.
* try to get code to touch space outside of that first page.

-- 
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.


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