usr/src/cmd/bash/Patches-4.0/bash40-043
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
permissions -rw-r--r--
Bash patch catchup including shellshock
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
254
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     1
			     BASH PATCH REPORT
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     2
			     =================
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     3
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     4
Bash-Release:	4.0
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     5
Patch-ID:	bash40-043
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     6
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     7
Bug-Reported-by:	Michal Zalewski <[email protected]>
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     8
Bug-Reference-ID:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
     9
Bug-Reference-URL:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    10
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    11
Bug-Description:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    12
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    13
When bash is parsing a function definition that contains a here-document
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    14
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    15
uninitialized.  This can result in an invalid memory access when the parsed
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    16
function is later copied.
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    17
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    18
Patch (apply with `patch -p0'):
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    19
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    20
*** ../bash-4.0.42/make_cmd.c	2009-01-04 14:32:38.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    21
--- make_cmd.c	2014-10-02 11:36:55.000000000 -0400
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    22
***************
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    23
*** 681,684 ****
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    24
--- 681,685 ----
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    25
    temp->redirector = source;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    26
    temp->redirectee = dest_and_filename;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    27
+   temp->here_doc_eof = 0;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    28
    temp->instruction = instruction;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    29
    temp->flags = 0;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    30
*** ../bash-4.0.42/copy_cmd.c	2009-01-04 14:32:23.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    31
--- copy_cmd.c	2014-10-02 11:36:55.000000000 -0400
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    32
***************
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    33
*** 119,123 ****
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    34
      case r_reading_until:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    35
      case r_deblank_reading_until:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    36
!       new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    37
        /*FALLTHROUGH*/
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    38
      case r_reading_string:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    39
--- 119,123 ----
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    40
      case r_reading_until:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    41
      case r_deblank_reading_until:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    42
!       new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    43
        /*FALLTHROUGH*/
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    44
      case r_reading_string:
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    45
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    46
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    47
***************
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    48
*** 26,30 ****
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    49
     looks for to find the patch level (for the sccs version string). */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    50
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    51
! #define PATCHLEVEL 42
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    52
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    53
  #endif /* _PATCHLEVEL_H_ */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    54
--- 26,30 ----
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    55
     looks for to find the patch level (for the sccs version string). */
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    56
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    57
! #define PATCHLEVEL 43
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    58
  
9c2a4ac793f0 Bash patch catchup including shellshock
Jon Tibble <meths@btinternet.com>
parents:
diff changeset
    59
  #endif /* _PATCHLEVEL_H_ */