summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch')
-rw-r--r--meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch b/meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch
new file mode 100644
index 0000000000..ed63916669
--- /dev/null
+++ b/meta/recipes-extended/bash/bash-3.2.48/cve-2014-6277.patch
@@ -0,0 +1,44 @@
1bash: Fix CVE-2014-6277 (shellshock)
2
3Upstream-status: backport
4
5Downloaded from:
6ftp://ftp.gnu.org/pub/bash/bash-3.2-patches/bash32-056
7
8Author: Chet Ramey <chet.ramey@case.edu>
9Signed-off-by: Catalin Popeanga <catalin.popeanga@enea.com>
10
11 BASH PATCH REPORT
12 =================
13
14Bash-Release: 3.2
15Patch-ID: bash32-056
16
17Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
18Bug-Reference-ID:
19Bug-Reference-URL:
20
21Bug-Description:
22
23When bash is parsing a function definition that contains a here-document
24delimited by end-of-file (or end-of-string), it leaves the closing delimiter
25uninitialized. This can result in an invalid memory access when the parsed
26function is later copied.
27---
28--- a/make_cmd.c 2006-09-12 09:21:22.000000000 -0400
29+++ b/make_cmd.c 2014-10-02 11:41:40.000000000 -0400
30@@ -677,4 +677,5 @@
31 temp->redirector = source;
32 temp->redirectee = dest_and_filename;
33+ temp->here_doc_eof = 0;
34 temp->instruction = instruction;
35 temp->flags = 0;
36--- a/copy_cmd.c 2003-10-07 11:43:44.000000000 -0400
37+++ b/copy_cmd.c 2014-10-02 11:41:40.000000000 -0400
38@@ -117,5 +117,5 @@
39 case r_reading_until:
40 case r_deblank_reading_until:
41- new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
42+ new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
43 /*FALLTHROUGH*/
44 case r_reading_string: