nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash42-033

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