--- Begin Message ---
- To: 390555-close@bugs.debian.org
- Subject: CVE-2006-5050: Directory traversal vulnerability in httpd in busybox
- From: Roland Stigge <stigge@antcom.de>
- Date: Tue, 10 Oct 2006 15:11:39 +0200
- Message-id: <452B9C0B.2030300@antcom.de>
Hi,
I looked into this issue and discovered the following: Since I couldn't
reproduce this problem (neither with current busybox 1.1.3-3 in Debian
nor with historical 1.01 where the original report refers to), I looked
at the respective networking/httpd.c:
=======================================================================
[... decoding things like %2e ...]
/* algorithm stolen from libbb bb_simplify_path(),
but don`t strdup and reducing trailing slash and protect out
root */
purl = test = url;
do {
if (*purl == '/') {
if (*test == '/') { /* skip duplicate (or initial) slash */
continue;
} else if (*test == '.') {
if (test[1] == '/' || test[1] == 0) { /*skip extra '.'*/
continue;
} else if ((test[1] == '.') && (test[2] == '/' ||
test[2] == 0)) {
++test;
if (purl == url) {
/* protect out root */
goto BAD_REQUEST;
}
while (*--purl != '/'); /* omit previous dir */
continue;
}
}
}
*++purl = *test;
} while (*++test);
[...]
=======================================================================
Looks correct, works fine.
Closing bug report.
bye,
Roland
--- End Message ---