[UNIX] SWS Web Server Multiple Vulnerabilities
From: support@securiteam.comDate: 09/12/02
- Previous message: support@securiteam.com: "[UNIX] XBreaky Symlink Security Vulnerability"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: Thu, 12 Sep 2002 09:00:33 +0200 (CEST)
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -
SWS Web Server Multiple Vulnerabilities
------------------------------------------------------------------------
SUMMARY
<http://www.linuxprogramlama.com> SWS Web server is a 160 lines of .c web
server for Linux. The product has been found to contain multiple security
vulnerabilities.
DETAILS
Vulnerable systems:
* SWS Web Server version 0.1.1 and version 0.1.2
Bug description:
Multiple vulnerabilities exist in the SWS Web server:
1. Server does not drop root privileges.
2. Server does not check directory traversal (../) allowing access to any
file with root privileges.
3. Server has buffer overflow when it tries to read files that are longer
than 4050 bytes
char buffer[4050];
..
while((i=fread(buffer,1,4096, f)) > 0)
This has the potential of allowing code execution with root privileges.
4. If a 404-error message is configured on SWS server, a vulnerability in
the code causes the file descriptor for 404 messages to no close, allowing
a DoS against whole system.
if ( (f=fopen(hatasayfasi,"r") )==NULL)
{
write_err_log ("Uyar+ hatasayfas+ bulunamad+.");
// write_err_log ("Warning hatasayfasi not found, edit
/etc/sws.conf ");
return 0;
}
}
5. Server is limited to one connection in time and never checks any
timeouts allowing a DoS against the server.
6. If recv() fails
i = recv(sock, recvBuffer, 4000, 0);
if (i == -1) write_err_log("Okuma hatal+...");
//write_err_log("Reading wrong...");
recvBuffer[i] = '\0';
..
cp = buf + 5;
cp2 = strstr(cp, " HTTP");
1 byte before the dynamically allocated buffer is overwritten with zero
and strstr() is called to access that un-initialized data.
ADDITIONAL INFORMATION
The information has been provided by <mailto:3APA3A@SECURITY.NNOV.RU>
3APA3A.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: support@securiteam.com: "[UNIX] XBreaky Symlink Security Vulnerability"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|