CVE:CVE-2007-5622
CNNVD:CNNVD-200710-486
3Proxy是一款小型的代理软件。
3Proxy在处理连接时存在漏洞，远程攻击者可能利用此漏洞控制服务器。
3Proxy的ftpprchild()函数中存在双重释放漏洞：
...
if (!strncasecmp((char *)buf, "OPEN ", 5)){
    if(param->hostname) myfree(param->hostname); <--first free
    if(parsehostname((char *)buf+5, param, 21)){RETURN(803);}
the parsehostname will free param->hostname again.
int parsehostname(char *hostname, struct clientparam *param, unsigned
short port){
        char *sp;
        if(!hostname || !*hostname)return 1;
        if ( (sp = strchr(hostname, ':')) ) *sp = 0;
        if(param->hostname) myfree(param->hostname); <-- double free
远程攻击者可以通过向FTP代码模块多次发送OPEN命令触发这个漏洞，导致服务不稳定或崩溃。
solution:Upgrade 3proxy 3proxy to a higher version than 0.5,0.5.1,0.5.2,0.5.3g,0.5.3h,0.5.3i,and avoid the version 0.5,0.5.1,0.5.2,0.5.3g,0.5.3h,0.5.3i