bash-4.2-033.patch 1.6 KB

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