aboutsummaryrefslogtreecommitdiffstats
path: root/main/bash/CVE-2016-9401.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-01-13 10:04:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-13 10:04:40 +0000
commit2399dd2a5a6a24f0f1ac9580ca4683a007cc9d40 (patch)
tree17fa38a3ace979b3f6aae5f80c27ea43de1778de /main/bash/CVE-2016-9401.patch
parent630926c392b8eb520465b96ba0171e7c60b1b26d (diff)
downloadaports-2399dd2a5a6a24f0f1ac9580ca4683a007cc9d40.tar.bz2
aports-2399dd2a5a6a24f0f1ac9580ca4683a007cc9d40.tar.xz
main/bash: fix for CVE-2016-9401
fixes #6654
Diffstat (limited to 'main/bash/CVE-2016-9401.patch')
-rw-r--r--main/bash/CVE-2016-9401.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/bash/CVE-2016-9401.patch b/main/bash/CVE-2016-9401.patch
new file mode 100644
index 0000000000..4237330e6d
--- /dev/null
+++ b/main/bash/CVE-2016-9401.patch
@@ -0,0 +1,27 @@
+*** ../bash-4.4-patched/builtins/pushd.def 2016-01-25 13:31:49.000000000 -0500
+--- builtins/pushd.def 2016-10-28 10:46:49.000000000 -0400
+***************
+*** 366,370 ****
+ }
+
+! if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
+ {
+ pushd_error (directory_list_offset, which_word ? which_word : "");
+--- 366,370 ----
+ }
+
+! if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0))
+ {
+ pushd_error (directory_list_offset, which_word ? which_word : "");
+***************
+*** 388,391 ****
+--- 388,396 ----
+ of the list into place. */
+ i = (direction == '+') ? directory_list_offset - which : which;
++ if (i < 0 || i > directory_list_offset)
++ {
++ pushd_error (directory_list_offset, which_word ? which_word : "");
++ return (EXECUTION_FAILURE);
++ }
+ free (pushd_directory_list[i]);
+ directory_list_offset--;