Subject NCSA HTTP Daemon for UNIX Vulnerability Date 19-feb-95
eb8b96cc5bd46cd14c0aa39b9d7585a82d397afc0ac21620e2cbf0f175bc9189
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
===============================================================================
>> CERT-NL, 01-Mar-2000 <<
>> All CERT-NL information has been moved to http://cert.surfnet.nl. Links <<
>> to CERT-NL information contained in this advisory are therefore outdated. <<
>> <<
>> CERT-NL also has stopped the CERT-CC-Mirror service. Due to this the <<
>> links to the CERT-CC mirror are obsolete. Visit the CERT-CC site for the <<
>> complete CERT-CC advisory texts: http://www.cert.org <<
===============================================================================
===============================================================================
Security Advisory CERT-NL
===============================================================================
Author/Source : CERT-NL (Rene Ritzen) Index : S-95-07
Distribution : World Page : 1
Classification: External Version: Final
Subject : NCSA HTTP Daemon for UNIX Vulnerability Date : 19-feb-95
===============================================================================
By courtesy of CERT/CC we received the following information about a
vulnerability in NCSA HTTP Daemon for UNIX:
===============================================================================
CA-95:04 CERT Advisory
February 17, 1995
NCSA HTTP Daemon for UNIX Vulnerability
- -----------------------------------------------------------------------------
The CERT Coordination Center has received reports that there is a
vulnerability in the NCSA HTTP Daemon V.1.3 for UNIX. Because of this
vulnerability, the daemon can be tricked into executing shell commands.
If you have any questions regarding this vulnerability, please send
e-mail to Beth Frank at the NCSA, efrank@ncsa.uiuc.edu.
- -----------------------------------------------------------------------------
I. Description
A vulnerability in the NCSA HTTP Daemon allows it to be tricked into
executing shell commands.
II. Impact
Remote users may gain unauthorized access to the account (uid) under
which the httpd process is running.
III. Solution
The following solution was provided by the HTTPD Team at SDG at
NCSA.
Step 1:
In the file httpd.h, change the string length definitions
from:
/* The default string lengths */
#define MAX_STRING_LEN 256
#define HUGE_STRING_LEN 8192
to:
/* The default string lengths */
#define HUGE_STRING_LEN 8192
#define MAX_STRING_LEN HUGE_STRING_LEN
Step 2:
Install the following patch, which performs the functionality of
strsubfirst (i.e., copy src followed by dest[start] into dest) without
the use of a temporary buffer.
- ----------------------------------cut here-------------------------------------
*** util.c.bak Sat May 7 21:47:15 1994
- --- util.c Thu Feb 16 04:17:07 1995
***************
*** 158,168 ****
void strsubfirst(int start,char *dest, char *src)
{
! char tmp[MAX_STRING_LEN];
! strcpy(tmp,&dest[start]);
! strcpy(dest,src);
! strcpy(&dest[strlen(src)],tmp);
}
/*
- --- 158,174 ----
void strsubfirst(int start,char *dest, char *src)
{
! int src_len, dest_len, i;
! if ((src_len=strlen(src))<start){ /** src "fits" in dest **/
! for (i=0;dest[i]=src[i];i++);
! for (i=src_len;dest[i]=dest[i-src_len+start];i++);
! }
! else { /** src doesn't fit in dest **/
! for (dest_len=strlen(dest),i=dest_len+src_len-start;i>=src_len;i--)
! dest[i] = dest[i-src_len+start];
! for (i=0;i<src_len;i++) dest[i]=src[i];
! }
}
/*
- ---------------------------------cut here-------------------------------------
After you apply this patch, recompile httpd, kill the current running process,
and restart the new httpd.
- ---------------------------------------------------------------------------
The CERT Coordination Center thanks Steve Weeber, Carlos Varela, and
Beth Frank for their support in responding to this problem.
- ---------------------------------------------------------------------------
==============================================================================
CERT-NL is the Computer Emergency Response Team for SURFnet customers. SURFnet
is the Dutch network for educational, research and related institutes. CERT-NL
is a member of the Forum of Incident Response and Security Teams (FIRST).
All CERT-NL material is available under:
http://cert.surfnet.nl/
In case of computer or network security problems please contact your local
CERT/security-team or CERT-NL (if your institute is NOT a SURFnet customer
please address the appropriate (local) CERT/security-team).
CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer,
i.e. UTC+0100 in winter and UTC+0200 in summer (DST).
Email: cert-nl@surfnet.nl ATTENDED REGULARLY ALL DAYS
Phone: +31 302 305 305 BUSINESS HOURS ONLY
Fax: +31 302 305 329 BUSINESS HOURS ONLY
Snailmail: SURFnet bv
Attn. CERT-NL
P.O. Box 19035
NL - 3501 DA UTRECHT
The Netherlands
NOODGEVALLEN: 06 22 92 35 64 ALTIJD BEREIKBAAR
EMERGENCIES : +31 6 22 92 35 64 ATTENDED AT ALL TIMES
CERT-NL'S EMERGENCY PHONENUMBER IS ONLY TO BE USED IN CASE OF EMERGENCIES:
THE SURFNET HELPDESK OPERATING THE EMERGENCY NUMBER HAS A *FIXED*
PROCEDURE FOR DEALING WITH YOUR ALERT AND WILL IN REGULAR CASES RELAY IT
TO CERT-NL IN AN APPROPRIATE MANNER. CERT-NL WILL THEN CONTACT YOU.
===============================================================================
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1i
iQA/AwUBOL6IDzSYjBqwfc9jEQKKuwCg4UDhOhsuadi+WjWh7uG80IsewucAoPJJ
qRPYZae/t0qHk5m8FJIl0HEC
=JgA+
-----END PGP SIGNATURE-----