aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>2020-12-15 15:22:57 +0800
committerKhem Raj <raj.khem@gmail.com>2020-12-15 00:52:55 -0800
commitaff8a1fefb9a1a311e5ba14ad69871514270803a (patch)
treee8902bb8a2a50f21514b2157eaa7f6bf9e92125f
parentbaee1ebeafce5d6a99dafc30b91e6fb760197686 (diff)
downloadmeta-openembedded-contrib-aff8a1fefb9a1a311e5ba14ad69871514270803a.tar.gz
meta-openembedded-contrib-aff8a1fefb9a1a311e5ba14ad69871514270803a.tar.bz2
meta-openembedded-contrib-aff8a1fefb9a1a311e5ba14ad69871514270803a.zip
php: CVE-2020-7070
Security Advisory References https://nvd.nist.gov/vuln/detail/CVE-2020-7070 https://bugs.php.net/patch-display.php?bug=79699&patch=fix-urldecode&revision=1600650364 https://github.com/php/php-src/blob/master/main/php_variables.c Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2020-7070.patch24
-rw-r--r--meta-oe/recipes-devtools/php/php_7.4.9.bb1
2 files changed, 25 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2020-7070.patch b/meta-oe/recipes-devtools/php/php/CVE-2020-7070.patch
new file mode 100644
index 0000000000..e5b527f989
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/CVE-2020-7070.patch
@@ -0,0 +1,24 @@
+Subject: Patch fix-urldecode for HTTP related Bug #79699
+
+---
+ main/php_variables.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/main/php_variables.c b/main/php_variables.c
+index 1a40c2a1..cbdc7cf1 100644
+--- a/main/php_variables.c
++++ b/main/php_variables.c
+@@ -514,7 +514,9 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data)
+ }
+
+ val = estrndup(val, val_len);
+- php_url_decode(var, strlen(var));
++ if (arg != PARSE_COOKIE) {
++ php_url_decode(var, strlen(var));
++ }
+ if (sapi_module.input_filter(arg, var, &val, val_len, &new_val_len)) {
+ php_register_variable_safe(var, val, new_val_len, &array);
+ }
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php_7.4.9.bb b/meta-oe/recipes-devtools/php/php_7.4.9.bb
index 1da5607835..bc58b5792e 100644
--- a/meta-oe/recipes-devtools/php/php_7.4.9.bb
+++ b/meta-oe/recipes-devtools/php/php_7.4.9.bb
@@ -30,6 +30,7 @@ SRC_URI_append_class-target = " \
file://phar-makefile.patch \
file://0001-opcache-config.m4-enable-opcache.patch \
file://xfail_two_bug_tests.patch \
+ file://CVE-2020-7070.patch \
"
S = "${WORKDIR}/php-${PV}"