diff options
| -rw-r--r-- | meta-oe/recipes-devtools/php/php/CVE-2019-11043.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/php/php_7.3.9.bb | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2019-11043.patch b/meta-oe/recipes-devtools/php/php/CVE-2019-11043.patch new file mode 100644 index 0000000000..7e20063bd6 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/CVE-2019-11043.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From ab061f95ca966731b1c84cf5b7b20155c0a1c06a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jakub Zelenka <bukka@php.net> | ||
| 3 | Date: Sat, 12 Oct 2019 15:56:16 +0100 | ||
| 4 | Subject: [PATCH] Fix bug #78599 (env_path_info underflow can lead to RCE) | ||
| 5 | |||
| 6 | CVE: CVE-2019-11043 | ||
| 7 | |||
| 8 | Fixed in php version 7.3.11. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://git.php.net/repository/php-src.git] | ||
| 11 | |||
| 12 | Signed-off-by: Joe Slater <joe.slater@windriver.com> | ||
| 13 | --- | ||
| 14 | NEWS | 4 +- | ||
| 15 | sapi/fpm/fpm/fpm_main.c | 4 +- | ||
| 16 | .../tests/bug78599-path-info-underflow.phpt | 61 +++++++++++++++++++ | ||
| 17 | sapi/fpm/tests/tester.inc | 11 +++- | ||
| 18 | 4 files changed, 75 insertions(+), 5 deletions(-) | ||
| 19 | create mode 100644 sapi/fpm/tests/bug78599-path-info-underflow.phpt | ||
| 20 | |||
| 21 | diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c | ||
| 22 | index 24a7e5d56a..50f92981f1 100644 | ||
| 23 | --- a/sapi/fpm/fpm/fpm_main.c | ||
| 24 | +++ b/sapi/fpm/fpm/fpm_main.c | ||
| 25 | @@ -1209,8 +1209,8 @@ static void init_request_info(void) | ||
| 26 | path_info = script_path_translated + ptlen; | ||
| 27 | tflag = (slen != 0 && (!orig_path_info || strcmp(orig_path_info, path_info) != 0)); | ||
| 28 | } else { | ||
| 29 | - path_info = env_path_info ? env_path_info + pilen - slen : NULL; | ||
| 30 | - tflag = (orig_path_info != path_info); | ||
| 31 | + path_info = (env_path_info && pilen > slen) ? env_path_info + pilen - slen : NULL; | ||
| 32 | + tflag = path_info && (orig_path_info != path_info); | ||
| 33 | } | ||
| 34 | |||
| 35 | if (tflag) { | ||
| 36 | -- | ||
| 37 | 2.17.1 | ||
| 38 | |||
diff --git a/meta-oe/recipes-devtools/php/php_7.3.9.bb b/meta-oe/recipes-devtools/php/php_7.3.9.bb index a5c7b9b6ba..e886cb1a23 100644 --- a/meta-oe/recipes-devtools/php/php_7.3.9.bb +++ b/meta-oe/recipes-devtools/php/php_7.3.9.bb | |||
| @@ -8,6 +8,7 @@ SRC_URI += "file://0001-acinclude.m4-don-t-unset-cache-variables.patch \ | |||
| 8 | file://0001-Use-pkg-config-for-libxml2-detection.patch \ | 8 | file://0001-Use-pkg-config-for-libxml2-detection.patch \ |
| 9 | file://debian-php-fixheader.patch \ | 9 | file://debian-php-fixheader.patch \ |
| 10 | file://CVE-2019-6978.patch \ | 10 | file://CVE-2019-6978.patch \ |
| 11 | file://CVE-2019-11043.patch \ | ||
| 11 | " | 12 | " |
| 12 | SRC_URI_append_class-target = " \ | 13 | SRC_URI_append_class-target = " \ |
| 13 | file://pear-makefile.patch \ | 14 | file://pear-makefile.patch \ |
