[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MySQL security fix



I'm not on debian-security, so Ray is forwarding this for me :)

Quoting J.H.M. Dassen (Ray) (jhm@cistron.nl):
> There was a small fix provided which I applied to my mysql-server package
> and uploaded it as mysql-server_3.22.30-4_i386.deb.

The author of MySQL made an official fix for this bug. 
The fix was posted to bugtraq, i also attached it to this message.
Monty, the author, announced a new release, incorporating this patch, for
this week.

Greets,
	Robert van der Meulen/Emphyrio
-- 
|      rvdm@cistron.nl - Cistron Internet Services - www.cistron.nl        |  
|          php3/c/perl/html/c++/sed/awk/linux/sql/cgi/security             |
|         My statements are mine, and not necessarily cistron's.           |
*** /my/monty/master/mysql-3.23.10-alpha/sql/sql_parse.cc       Sun Jan 30 10:42:42 2000
--- ./sql_parse.cc      Wed Feb  9 16:05:49 2000
***************
*** 17,22 ****
--- 17,24 ----
  #include <m_ctype.h>
  #include <thr_alarm.h>

+ #define SCRAMBLE_LENGTH 8
+
  extern int yyparse(void);
  extern "C" pthread_mutex_t THR_LOCK_keycache;

***************
*** 188,195 ****
      end=strmov(buff,server_version)+1;
      int4store((uchar*) end,thd->thread_id);
      end+=4;
!     memcpy(end,thd->scramble,9);
!     end+=9;
  #ifdef HAVE_COMPRESS
      client_flags |= CLIENT_COMPRESS;
  #endif /* HAVE_COMPRESS */
--- 190,197 ----
      end=strmov(buff,server_version)+1;
      int4store((uchar*) end,thd->thread_id);
      end+=4;
!     memcpy(end,thd->scramble,SCRAMBLE_LENGTH+1);
!     end+=SCRAMBLE_LENGTH +1;
  #ifdef HAVE_COMPRESS
      client_flags |= CLIENT_COMPRESS;
  #endif /* HAVE_COMPRESS */
***************
*** 268,273 ****
--- 270,277 ----
    char *user=   (char*) net->read_pos+5;
    char *passwd= strend(user)+1;
    char *db=0;
+   if (passwd[0] && strlen(passwd) != SCRAMBLE_LENGTH)
+     return ER_HANDSHAKE_ERROR;
    if (thd->client_capabilities & CLIENT_CONNECT_WITH_DB)
      db=strend(passwd)+1;
    if (thd->client_capabilities & CLIENT_INTERACTIVE)


Reply to: