bash44-006 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.4
  4. Patch-ID: bash44-006
  5. Bug-Reported-by: <fernando@null-life.com>
  6. Bug-Reference-ID: <CAEr-gPFPvqheiAeENmMkEwWRd4U=1iqCsYmR3sLdULOqL++_tQ@mail.gmail.com>
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. Out-of-range negative offsets to popd can cause the shell to crash attempting
  10. to free an invalid memory block.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-4.4-patched/builtins/pushd.def 2016-01-25 13:31:49.000000000 -0500
  13. --- builtins/pushd.def 2016-10-28 10:46:49.000000000 -0400
  14. ***************
  15. *** 366,370 ****
  16. }
  17. ! if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
  18. {
  19. pushd_error (directory_list_offset, which_word ? which_word : "");
  20. --- 366,370 ----
  21. }
  22. ! if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0))
  23. {
  24. pushd_error (directory_list_offset, which_word ? which_word : "");
  25. ***************
  26. *** 388,391 ****
  27. --- 388,396 ----
  28. of the list into place. */
  29. i = (direction == '+') ? directory_list_offset - which : which;
  30. + if (i < 0 || i > directory_list_offset)
  31. + {
  32. + pushd_error (directory_list_offset, which_word ? which_word : "");
  33. + return (EXECUTION_FAILURE);
  34. + }
  35. free (pushd_directory_list[i]);
  36. directory_list_offset--;
  37. *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  38. --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  39. ***************
  40. *** 26,30 ****
  41. looks for to find the patch level (for the sccs version string). */
  42. ! #define PATCHLEVEL 5
  43. #endif /* _PATCHLEVEL_H_ */
  44. --- 26,30 ----
  45. looks for to find the patch level (for the sccs version string). */
  46. ! #define PATCHLEVEL 6
  47. #endif /* _PATCHLEVEL_H_ */