From 0146e3dbe4b242334cc70943e39ec42d820dac7f Mon Sep 17 00:00:00 2001 From: Rmys Date: Sat, 13 Jun 2026 21:37:25 +0300 Subject: [PATCH] bash ver. bump --- .../base/bash/files/official/bash53-013.patch | 54 +++++++++++++ .../base/bash/files/official/bash53-014.patch | 68 ++++++++++++++++ .../base/bash/files/official/bash53-015.patch | 79 +++++++++++++++++++ system/base/bash/pspec.xml | 10 +++ 4 files changed, 211 insertions(+) create mode 100644 system/base/bash/files/official/bash53-013.patch create mode 100644 system/base/bash/files/official/bash53-014.patch create mode 100644 system/base/bash/files/official/bash53-015.patch diff --git a/system/base/bash/files/official/bash53-013.patch b/system/base/bash/files/official/bash53-013.patch new file mode 100644 index 00000000..16ff707c --- /dev/null +++ b/system/base/bash/files/official/bash53-013.patch @@ -0,0 +1,54 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-013 + +Bug-Reported-by: Florian Schmaus +Bug-Reference-ID: +Bug-Reference-URL: https://savannah.gnu.org/bugs/?67586 + +Bug-Description: + +Comparing the value of a pointer returned from realloc/xrealloc to the +original pointer passed is technically undefined behavior, which matters +under some circumstances. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/builtins/read.def Wed Jun 25 15:50:18 2025 +--- builtins/read.def Thu Nov 20 15:10:20 2025 +*************** +*** 789,794 **** + x = (char *)xrealloc (input_string, size += 128); + +! /* Only need to change unwind-protect if input_string changes */ + if (x != input_string) + { + input_string = x; +--- 816,824 ---- + x = (char *)xrealloc (input_string, size += 128); + +! #if 0 +! /* This is, in theory, undefined behavior, since input_string may +! have been freed. */ + if (x != input_string) ++ #endif + { + input_string = x; + +*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 12 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/system/base/bash/files/official/bash53-014.patch b/system/base/bash/files/official/bash53-014.patch new file mode 100644 index 00000000..d52d34d2 --- /dev/null +++ b/system/base/bash/files/official/bash53-014.patch @@ -0,0 +1,68 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-014 + +Bug-Reported-by: Grisha Levit +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-06/msg00022.html + +Bug-Description: + +Bash-5.3 patch 11 included an inadvertent extra line, which this patch +removes. This also takes the opportunity to improve that patch, by looking +up the variable each time through the line-reading loop only if there is +a callback and it is invoked. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/builtins/mapfile.def Sat Jun 6 13:31:02 2026 +--- builtins/mapfile.def Sat Jun 6 13:51:55 2026 +*************** +*** 198,211 **** + + run_callback (callback, array_index, line); +- } + +! /* Bad things can happen if the callback modifies ENTRY, e.g., +! unsetting it or changing it to a non-indexed-array type, so we +! look it up again every time we need to assign something */ +! entry = bind_array_variable (array_name, array_index, line, 0); +! if (entry == 0 || ASSIGN_DISALLOWED (entry, 0)) +! return EXECUTION_FAILURE; +! +! bind_array_element (entry, array_index, line, 0); + + /* Have we exceeded # of lines to store? */ +--- 198,211 ---- + + run_callback (callback, array_index, line); + +! /* Bad things can happen if the callback modifies ENTRY, e.g., +! unsetting it or changing it to a non-indexed-array type, so we +! look it up again every time we need to assign something */ +! entry = bind_array_variable (array_name, array_index, line, 0); +! if (entry == 0 || ASSIGN_DISALLOWED (entry, 0)) +! return EXECUTION_FAILURE; +! } +! else +! bind_array_element (entry, array_index, line, 0); + + /* Have we exceeded # of lines to store? */ + +*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 13 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/system/base/bash/files/official/bash53-015.patch b/system/base/bash/files/official/bash53-015.patch new file mode 100644 index 00000000..861b3cac --- /dev/null +++ b/system/base/bash/files/official/bash53-015.patch @@ -0,0 +1,79 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-015 + +Bug-Reported-by: Duncan Roe + Grisha Levit +Bug-Reference-ID: +Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-09/msg00162.html + https://lists.gnu.org/archive/html/bug-bash/2025-10/msg00013.html + +Bug-Description: + +There are circumstances under which index -1 is used to reference into +the input buffer used by the `read' builtin. + +Patch (apply with `patch -p0'): + +*** ../bash-5.3-patched/builtins/read.def Wed Jun 25 15:50:18 2025 +--- builtins/read.def Thu Nov 6 16:51:14 2025 +*************** +*** 539,543 **** + protects, then restore input_string so we can use it later */ + orig_input_string = 0; +! input_string[i] = '\0'; /* make sure it's terminated */ + if (i == 0) + { +--- 568,573 ---- + protects, then restore input_string so we can use it later */ + orig_input_string = 0; +! if (i >= 0) +! input_string[i] = '\0'; /* make sure it's terminated */ + if (i == 0) + { +*************** +*** 593,598 **** + + ttset = ttattrs; +! i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset); +! if (i < 0) + sh_ttyerror (1); + tty_modified = 1; +--- 623,627 ---- + + ttset = ttattrs; +! if ((silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset)) < 0) + sh_ttyerror (1); + tty_modified = 1; +*************** +*** 610,615 **** + + ttset = ttattrs; +! i = ttfd_noecho (fd, &ttset); /* ttnoecho (); */ +! if (i < 0) + sh_ttyerror (1); + +--- 639,643 ---- + + ttset = ttattrs; +! if (ttfd_noecho (fd, &ttset) < 0) + sh_ttyerror (1); + + +*** ../bash-5.3/patchlevel.h 2020-06-22 14:51:03.000000000 -0400 +--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 14 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 15 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/system/base/bash/pspec.xml b/system/base/bash/pspec.xml index 9b2c671b..468db7e7 100755 --- a/system/base/bash/pspec.xml +++ b/system/base/bash/pspec.xml @@ -31,6 +31,9 @@ official/bash53-010.patch official/bash53-011.patch official/bash53-012.patch + official/bash53-013.patch + official/bash53-014.patch + official/bash53-015.patch @@ -79,6 +82,13 @@ + + 2026-06-13 + 5.3.15 + Version bump. + Pisi Linux Community + admin@pisilinux.org + 2026-06-06 5.3.12