bash: add upstream security fixes to patch level 12
PATCH 1/1 bash: add upstream security fixes to patch level 12
Fixes CVE-2017-5932 - Shell code execution on tab completion of specially crafted files. For details, see the report:
https://github.com/jheyens/bash_completion_vuln/raw/master/2017-01-17.bash_completion_report.pdf
We unfortunately cannot easily download these because of the file names (not ending in patch) and patch format (p0), so convert to p1 format and include in package/bash with the following script:
for i in 06 07 08 09 10 11 12; do
cat > bash44-0$i.patch << EOF
From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-0$i
EOF
curl https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-0$i | \ sed -e 's|^\*\*\* \.\./|*** |' -e 's|^--- |--- b/|' >> bash44-0$i.patch
done
--- package/bash/bash44-006.patch | 63 ++++++++++++++++ package/bash/bash44-007.patch | 155 +++++++++++++++++++++++++++++++++++++++ package/bash/bash44-008.patch | 88 ++++++++++++++++++++++ package/bash/bash44-009.patch | 111 ++++++++++++++++++++++++++++ package/bash/bash44-010.patch | 53 ++++++++++++++ package/bash/bash44-011.patch | 54 ++++++++++++++ package/bash/bash44-012.patch | 165 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 689 insertions(+) create mode 100644 package/bash/bash44-006.patch create mode 100644 package/bash/bash44-007.patch create mode 100644 package/bash/bash44-008.patch create mode 100644 package/bash/bash44-009.patch create mode 100644 package/bash/bash44-010.patch create mode 100644 package/bash/bash44-011.patch create mode 100644 package/bash/bash44-012.patch
package/bash/bash44-006.patch new file +63 -0
@@ -0,0 +1,63 @@ +From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-006 + +Signed-off-by: Peter Korsgaard <[email protected]> + + BASH PATCH REPORT + ================= + +Bash-Release: 4.4 +Patch-ID: bash44-006 + +Bug-Reported-by: <[email protected]> +Bug-Reference-ID: <CAEr-gPFPvqheiAeENmMkEwWRd4U=1iqCsYmR3sLdULOqL++_tQ@mail.gmail.com> +Bug-Reference-URL: + +Bug-Description: + +Out-of-range negative offsets to popd can cause the shell to crash attempting +to free an invalid memory block. + +Patch (apply with `patch -p0'): + +*** bash-4.4-patched/builtins/pushd.def 2016-01-25 13:31:49.000000000 -0500 +--- b/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 : ""); +--- b/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 **** +--- b/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--; +*** bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400 +--- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 5 + + #endif /* _PATCHLEVEL_H_ */ +--- b/26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 6 + + #endif /* _PATCHLEVEL_H_ */
package/bash/bash44-007.patch new file +155 -0
155 lines not on this page · raw message
package/bash/bash44-008.patch new file +88 -0
88 lines not on this page · raw message
package/bash/bash44-009.patch new file +111 -0
111 lines not on this page · raw message
package/bash/bash44-010.patch new file +53 -0
53 lines not on this page · raw message
package/bash/bash44-011.patch new file +54 -0
54 lines not on this page · raw message
package/bash/bash44-012.patch new file +165 -0
165 lines not on this page · raw message
Signature · 1 line
2.11.0
PATCH 1/1 bash: add upstream security fixes to patch level 12
Quoted 15 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Korsgaard <[email protected]> writes:
Fixes CVE-2017-5932 - Shell code execution on tab completion of specially crafted files. For details, see the report:
https://github.com/jheyens/bash_completion_vuln/raw/master/2017-01-17.bash_completion_report.pdf
We unfortunately cannot easily download these because of the file names (not ending in patch) and patch format (p0), so convert to p1 format and include in package/bash with the following script:
for i in 06 07 08 09 10 11 12; do
cat > bash44-0$i.patch << EOFFrom https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-0$i
Quoted 8 lines
Signed-off-by Peter Korsgaard <[email protected]>EOF
curl https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-0$i | \ sed -e 's|^\*\*\* \.\./|*** |' -e 's|^--- |--- b/|' >> bash44-0$i.patchdone
Signed-off-by Peter Korsgaard <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard