• Bug#248946: acknowledged by developer (Re: python2.2: gethostbyaddr seg

    From Paul Hampson@1:229/2 to Debian Bug Tracking System on Tue Aug 17 09:50:06 2004
    From: [email protected]

    reopen 248946
    Thankyou Mr Bug Control Robot.
    On Mon, Aug 16, 2004 at 07:33:11AM -0700, Debian Bug Tracking System wrote: [trim]
    that was fixed in version 2.2.1-4.3 on Fri, 27 Feb 2004 16:48:22
    -0800.

    No it wasn't. As described in the bug report logs, that patch only
    addresses half the problem, and the supplied code examples still
    generate a segfault.

    The patch which I was sent for testing, but which doesn't appear to
    be in the bug report history causes it to return an exception instead,
    which is a much better behvaiour than segfaulting.

    The working fix was written by Sebastian Schmidt <[email protected]>,
    tested successfully by me, and Matt Zimmerman <[email protected]> said
    he would produce an updated package, in an email CC'd to <[email protected]>.

    However, since this new package hasn't come into Debian yet, this bug
    continues to exist.

    For the record, I've included the finally agreed-on patch below:
    --- python2.2-2.2.1.old/Modules/socketmodule.c Fri May 28 13:06:36 2004
    +++ python2.2-2.2.1/Modules/socketmodule.c Fri May 28 13:40:06 2004
    @@ -569,7 +569,7 @@
    an error occurred; then an exception is raised. */

    static int
    -setipaddr(char* name, struct sockaddr * addr_ret, int af)
    +setipaddr(char* name, struct sockaddr * addr_ret, size_t addr_ret_size, int af)
    {
    struct addrinfo hints, *res;
    int error;
    @@ -607,20 +607,12 @@
    "wildcard resolved to multiple address");
    return -1;
    }
    -#ifndef ENABLE_IPV6
    - /* If IPv6 is not enabled, addr_ret has the size of
    - * a struct sockaddr_in (16 bytes). getaddrinfo() may
    - * return an IPv6 address which is 28 bytes long, so
    - * the subsequent bytes of addr_ret get overwritten.
    - * -- yath
    - */
    - if (res->ai_addrlen > sizeof(struct sockaddr_in)) {
    + if (res->ai_family != af || res->ai_addrlen > addr_ret_size) {
    freeaddrinfo(res);
    PyErr_SetString(PySocket_Error,
    "unsupported address family");
    ret
  • From Matthias Klose@1:229/2 to Paul Hampson on Tue Aug 17 17:50:06 2004
    From: [email protected]

    Paul Hampson writes:
    reopen 248946
    Thankyou Mr Bug Control Robot.
    On Mon, Aug 16, 2004 at 07:33:11AM -0700, Debian Bug Tracking System wrote: [trim]
    that was fixed in version 2.2.1-4.3 on Fri, 27 Feb 2004 16:48:22
    -0800.

    No it wasn't. As described in the bug report logs, that patch only
    addresses half the problem, and the supplied code examples still
    generate a segfault.

    thanks for the update. I'm preparing an update now.

    Matthias


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Martin Schulze@1:229/2 to Matthias Klose on Wed Aug 18 16:00:12 2004
    From: [email protected]

    Matthias Klose wrote:
    Paul Hampson writes:
    reopen 248946
    Thankyou Mr Bug Control Robot.
    On Mon, Aug 16, 2004 at 07:33:11AM -0700, Debian Bug Tracking System wrote: [trim]
    that was fixed in version 2.2.1-4.3 on Fri, 27 Feb 2004 16:48:22
    -0800.

    No it wasn't. As described in the bug report logs, that patch only addresses half the problem, and the supplied code examples still
    generate a segfault.

    thanks for the update. I'm preparing an update now.

    We have received the update.
    Yath has reviewed it.
    It's now in the buildd network.

    Regards,

    Joey

    --
    Everybody talks about it, but nobody does anything about it! -- Mark Twain

    Please always Cc to me when replying to me on the lists.


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)