Bug #31419 mysql-proxy abort with assertion failed: (*_off < packet->len)
Submitted: 5 Oct 2007 12:59 Modified: 21 Jan 2009 12:17
Reporter: Carlos Silva e Silva Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S1 (Critical)
Version:SVN Revision 258 OS:Any (Gentoo Linux)
Assigned to: MC Brown CPU Architecture:Any
Tags: assertion failed network-mysqld-proto

[5 Oct 2007 12:59] Carlos Silva e Silva
Description:
mysql-proxy crashes with:

file network-mysqld-proto.c: line 106 (network_mysqld_proto_get_int_len): assertion failed: (*_off < packet->len)
Aborted

My mainly problem is using the mysql-proxy to filter out connections from the development team and having different programs connecting to the server.

No one is using the mysql-3.23 client direct but this client gave me the same error from "Delphi for PHP"

--

Carlos Augusto

How to repeat:
Connect using a mysql 3.23 client
[5 Oct 2007 13:25] Giuseppe Maxia
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at  
http://dev.mysql.com/doc/refman/5.1/en/mysql-proxy-platforms.html

MySQL Proxy, by design, is not compatible with the old client/server protocol. You need at least MySQL 4.1 to use MySQL Proxy.
[5 Oct 2007 13:37] Mark Leith
Actually I disagree with this, crashing is never good - the proxy should simply return an error to the client that is trying to connect, that the client version is not supported (or some other similar error). 

This opens up a denial of service opportunity when using the proxy in production. 

Fix this please.
[5 Oct 2007 14:10] Giuseppe Maxia
Actually, the proxy is not crashing. It is aborting, which is a voluntary action.
Anyway, I agree that it should handle this error more gracefully.
[5 Oct 2007 16:04] Carlos Silva e Silva
This is exactly my problem, I don't use any 3.xx clients but in a number of occasions the proxy is aborting and I don't want to go messing around with the core code.
[20 Oct 2007 10:38] Sveta Smirnova
Similar error if proxy backends 3.23 server:

$mysql-proxy --proxy-backend-addresses=127.0.0.1:3332
file network-mysqld-proto.c: line 136 (network_mysqld_proto_get_string_len): assertion failed: (*_off < packet->len)
[15 Jan 2009 10:24] Sveta Smirnova
Bug #42128 was marked as duplicate of this one.
[15 Jan 2009 22:27] Diego Medina
This has been fixed on the latest revision from launchpad

https://launchpad.net/mysql-proxy/+announcement/1798

See http://forge.mysql.com/wiki/MySQL_Proxy_Compiling  for compiling
help.
[21 Jan 2009 12:17] MC Brown
A note has been added to the 0.7.0 changelog: 

Security Enhancement: Accessing mysql-proxy using a client or backend with a MySQL protocol less than MySQL 5.0 would result in mysql-proxy aborting with an assertion. This is because mysql-proxy only supports MySQL Protocol 5.0 or higher. The proxy will now report a fault