Vulnerabilities > CVE-2009-1476 - Buffer Errors vulnerability in Darren Reed Ipfilter 4.1.31

047910
CVSS 7.2 - HIGH
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
local
low complexity
darren-reed
CWE-119

Summary

Buffer overflow in lib/load_http.c in ippool in Darren Reed IPFilter (aka IP Filter) 4.1.31 allows local users to gain privileges via vectors involving a long hostname in a URL.

Vulnerable Configurations

Part Description Count
Application
Darren_Reed
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 35076 CVE(CAN) ID: CVE-2009-1476 IPFilter是一款免费的开放源代码的防火墙程序,由Darren Reed编写,可使用在多种Unix和Linux操作系统平台下。 Ippool用于管理IPFilter的IP池子系统中所储存的信息。在IPFilter的lib/load_http.c文件中(char buffer[1024]): - --- ... alist_t * load_http(char *url) { int fd, len, left, port, endhdr, removed; char *s, *t, *u, buffer[1024], *myurl; alist_t *a, *rtop, *rbot; struct sockaddr_in sin; struct hostent *host; /* * More than this would just be absurd. */ if (strlen(url) &gt; 512) { fprintf(stderr, &quot;load_http has a URL &gt; 512 bytes?!\n&quot;); return NULL; } fd = -1; rtop = NULL; rbot = NULL; sprintf(buffer, &quot;GET %s HTTP/1.0\r\n&quot;, url); myurl = strdup(url); if (myurl == NULL) goto done; s = myurl + 7; /* http:// */ t = strchr(s, '/'); if (t == NULL) { fprintf(stderr, &quot;load_http has a malformed URL '%s'\n&quot;, url); free(myurl); return NULL; } *t++ = '\0'; u = strchr(s, '@'); if (u != NULL) s = u + 1; /* AUTH */ sprintf(buffer + strlen(buffer), &quot;Host: %s\r\n\r\n&quot;, s); ... - --- 0. buffer[]仅有1024字节 1. url不能大于512字节 2. url会被拷贝到以下缓冲区: sprintf(buffer, &quot;GET %s HTTP/1.0\r\n&quot;, url); 在这里(s是主机): sprintf(buffer + strlen(buffer), &quot;Host: %s\r\n\r\n&quot;, s); 如果url包含有: 512 = strlen(http:// A x504 /) 则在缓冲区中: strlen(GET HTTP/1.0\r\n) = 15 strlen(url) = 512 strlen(Host: \r\n\r\n)= 10 strlen(A x504) = 504 总计为1041字节,因此使用这个功能可能会触发缓冲区溢出。 Darren Reed IPFilter 4.1.31 厂商补丁: Darren Reed ----------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href="http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/ipf/lib/load_http.c?rev=1.2&amp;content-type=text/x-cvsweb-markup&amp;only_with_tag=MAIN" target="_blank" rel=external nofollow>http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/ipf/lib/load_http.c?rev=1.2&amp;content-type=text/x-cvsweb-markup&amp;only_with_tag=MAIN</a>
idSSV:11416
last seen2017-11-19
modified2009-05-25
published2009-05-25
reporterRoot
titleIPFilter lib/load_http.c文件缓冲区溢出漏洞