summaryrefslogtreecommitdiffstats
path: root/bug78599.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-06-23 08:29:01 +0200
committerRemi Collet <remi@php.net>2022-06-23 08:29:01 +0200
commit732417045101cb2248891981105c3749d01dba5a (patch)
treed89d105ab19b5c2a6185c772bb47f0caaa4ed8de /bug78599.patch
parentd86fc6e7b23f6fe389b22746f775b93d5d80d0ca (diff)
myqlnd: fix #81719: mysqlnd/pdo password buffer overflow. CVE-2022-31626HEADmaster
Diffstat (limited to 'bug78599.patch')
-rw-r--r--bug78599.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/bug78599.patch b/bug78599.patch
new file mode 100644
index 0000000..b70a56d
--- /dev/null
+++ b/bug78599.patch
@@ -0,0 +1,33 @@
+Backported for 5.4 from:
+
+
+
+From c69bcb212b37900fd61daaf38762e4974cb4dcc9 Mon Sep 17 00:00:00 2001
+From: Jakub Zelenka <bukka@php.net>
+Date: Sat, 12 Oct 2019 15:56:16 +0100
+Subject: [PATCH 1/2] Fix bug #78599 (env_path_info underflow can lead to RCE)
+ (CVE-2019-11043)
+
+cheery-picked from ab061f95ca966731b1c84cf5b7b20155c0a1c06a
+without the test as tester not available
+---
+ sapi/fpm/fpm/fpm_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
+index d12ac01859..22b889c167 100644
+--- a/sapi/fpm/fpm/fpm_main.c
++++ b/sapi/fpm/fpm/fpm_main.c
+@@ -1210,8 +1210,8 @@ static void init_request_info(TSRMLS_D)
+ path_info = script_path_translated + ptlen;
+ tflag = (slen != 0 && (!orig_path_info || strcmp(orig_path_info, path_info) != 0));
+ } else {
+- path_info = env_path_info ? env_path_info + pilen - slen : NULL;
+- tflag = (orig_path_info != path_info);
++ path_info = (env_path_info && pilen > slen) ? env_path_info + pilen - slen : NULL;
++ tflag = path_info && (orig_path_info != path_info);
+ }
+
+ if (tflag) {
+
+