summaryrefslogtreecommitdiff
path: root/www/php3/patches
diff options
context:
space:
mode:
authorjlam <jlam>2002-02-28 15:07:16 +0000
committerjlam <jlam>2002-02-28 15:07:16 +0000
commit7699d00560cecf6750006d7bac1d866a55849439 (patch)
treec951f8a63bb725ec311871eed493e2e9e631db4a /www/php3/patches
parent070222a0c4fb2e882013fb59ab96a0b2ce2cdbf9 (diff)
downloadpkgsrc-7699d00560cecf6750006d7bac1d866a55849439.tar.gz
Update php3 and ap-php3 to 3.0.18nb1. Changes from version 3.0.18 are
a security fix for a file-upload bug. <===> SECURITY NOTE <===> Note that the buffer overflow fix is a major security fix. Quoting from the security advisory at: http://security.e-matters.de/advisories/012002.html "PHP supports multipart/form-data POST requests (as described in RFC1867) known as POST fileuploads. Unfourtunately there are several flaws in the php_mime_split function that could be used by an attacker to execute arbitrary code. During our research we found out that not only PHP4 but also older versions from the PHP3 tree are vulnerable.
Diffstat (limited to 'www/php3/patches')
-rw-r--r--www/php3/patches/patch-ak40
1 files changed, 40 insertions, 0 deletions
diff --git a/www/php3/patches/patch-ak b/www/php3/patches/patch-ak
new file mode 100644
index 00000000000..3ebaa00cf11
--- /dev/null
+++ b/www/php3/patches/patch-ak
@@ -0,0 +1,40 @@
+$NetBSD: patch-ak,v 1.1 2002/02/28 15:07:18 jlam Exp $
+
+--- functions/mime.c.orig Mon Oct 16 21:30:59 2000
++++ functions/mime.c Thu Feb 28 09:20:34 2002
+@@ -1,4 +1,14 @@
+ /*
++ * This file is patched with the security fix for the file-upload bug
++ * taken from:
++ *
++ * http://www.php.net/do_download.php?download_file=mime.c.diff-3.0.gz
++ *
++ * and fixes the security problem noted in
++ *
++ * http://security.e-matters.de/advisories/012002.html
++ */
++/*
+ +----------------------------------------------------------------------+
+ | PHP HTML Embedded Scripting Language Version 3.0 |
+ +----------------------------------------------------------------------+
+@@ -85,7 +95,9 @@
+ SAFE_RETURN;
+ }
+ loc = memchr(ptr, '\n', rem);
++ rem -= loc - ptr;
+ name = strstr(ptr, " name=");
++ ptr = loc;
+ if (name && name < loc) {
+ name += 6;
+ s = memchr(name, '\"', loc - name);
+@@ -138,6 +150,10 @@
+ sprintf(lbuf, "%s_name[]", abuf);
+ sbuf=estrdup(abuf);
+ } else {
++ if (abuf) {
++ efree(abuf);
++ abuf = NULL;
++ }
+ sprintf(lbuf, "%s_name", namebuf);
+ sbuf=estrdup(namebuf);
+ }