rcolebaugh / rpms / bash

Forked from rpms/bash 2 years ago
Clone
07a490
			     BASH PATCH REPORT
07a490
			     =================
07a490
07a490
Bash-Release:	4.2
07a490
Patch-ID:	bash42-033
07a490
07a490
Bug-Reported-by:	David Leverton <levertond@googlemail.com>
07a490
Bug-Reference-ID:	<4FCCE737.1060603@googlemail.com>
07a490
Bug-Reference-URL:
07a490
07a490
Bug-Description:
07a490
07a490
Bash uses a static buffer when expanding the /dev/fd prefix for the test
07a490
and conditional commands, among other uses, when it should use a dynamic
07a490
buffer to avoid buffer overflow.
07a490
07a490
Patch (apply with `patch -p0'):
07a490
07a490
*** ../bash-4.2-patched/lib/sh/eaccess.c	2011-01-08 20:50:10.000000000 -0500
07a490
--- lib/sh/eaccess.c	2012-06-04 21:06:43.000000000 -0400
07a490
***************
07a490
*** 83,86 ****
07a490
--- 83,88 ----
07a490
       struct stat *finfo;
07a490
  {
07a490
+   static char *pbuf = 0;
07a490
+ 
07a490
    if (*path == '\0')
07a490
      {
07a490
***************
07a490
*** 107,111 ****
07a490
       On most systems, with the notable exception of linux, this is
07a490
       effectively a no-op. */
07a490
!       char pbuf[32];
07a490
        strcpy (pbuf, DEV_FD_PREFIX);
07a490
        strcat (pbuf, path + 8);
07a490
--- 109,113 ----
07a490
       On most systems, with the notable exception of linux, this is
07a490
       effectively a no-op. */
07a490
!       pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
07a490
        strcpy (pbuf, DEV_FD_PREFIX);
07a490
        strcat (pbuf, path + 8);
07a490
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
07a490
--- patchlevel.h	Thu Feb 24 21:41:34 2011
07a490
***************
07a490
*** 26,30 ****
07a490
     looks for to find the patch level (for the sccs version string). */
07a490
  
07a490
! #define PATCHLEVEL 32
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */
07a490
--- 26,30 ----
07a490
     looks for to find the patch level (for the sccs version string). */
07a490
  
07a490
! #define PATCHLEVEL 33
07a490
  
07a490
  #endif /* _PATCHLEVEL_H_ */