Merge pull request #2424 from Rmys/master

bash ver. bump
This commit is contained in:
Rmys
2026-06-09 16:51:32 +03:00
committed by GitHub
6 changed files with 304 additions and 1 deletions
@@ -0,0 +1,12 @@
diff --git a/subst.c b/subst.c
--- a/subst.c
+++ b/subst.c
@@ -7962,7 +7962,7 @@ parameter_brace_transform (varname, value, ind, xform, rtype, quoted, pflags, fl
return ((char *)NULL);
}
- if (valid_parameter_transform (xform) == 0)
+ if (xform[0] == 0 || valid_parameter_transform (xform) == 0)
{
this_command_name = oname;
#if 0 /* TAG: bash-5.2 Martin Schulte <gnu@schrader-schulte.de> 10/2020 */
@@ -0,0 +1,82 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-009
Bug-Reported-by: penguin p <tgckpg@gmail.com>
Bug-Reference-ID: <TYYPR01MB14049C63D4635628EE867664BFA37A@TYYPR01MB14049.jpnprd01.prod.outlook.com>
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00080.html
Bug-Description:
A SIGINT during a reverse i-search can cause a segmentation fault due to
accessing data freed by a signal handler.
Patch (apply with `patch -p0'):
*** ../bash-20250807/lib/readline/input.c Tue Jul 8 15:37:13 2025
--- lib/readline/input.c Fri Aug 22 15:04:05 2025
***************
*** 976,984 ****
if (rl_signal_event_hook)
(*rl_signal_event_hook) ();
! #if defined (READLINE_CALLBACKS)
! else if (osig == SIGINT && (ostate & RL_STATE_CALLBACK) && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG)))
/* just these cases for now */
_rl_abort_internal ();
- #endif
}
}
--- 1004,1012 ----
if (rl_signal_event_hook)
(*rl_signal_event_hook) ();
! /* If the application's SIGINT handler returns, make sure we abort out of
! searches and numeric arguments because we've freed necessary state. */
! if (osig == SIGINT && (ostate & (RL_STATE_ISEARCH|RL_STATE_NSEARCH|RL_STATE_NUMERICARG)))
/* just these cases for now */
_rl_abort_internal ();
}
}
*** ../bash-20250807/lib/readline/isearch.c Thu Jun 5 09:22:11 2025
--- lib/readline/isearch.c Tue Aug 19 14:55:55 2025
***************
*** 890,899 ****
_rl_isearch_cleanup (_rl_search_cxt *cxt, int r)
{
if (r >= 0)
_rl_isearch_fini (cxt);
_rl_scxt_dispose (cxt, 0);
- _rl_iscxt = 0;
-
- RL_UNSETSTATE(RL_STATE_ISEARCH);
return (r != 0);
--- 890,901 ----
_rl_isearch_cleanup (_rl_search_cxt *cxt, int r)
{
+ RL_UNSETSTATE(RL_STATE_ISEARCH);
+ if (cxt == 0)
+ return (r != 0);
+
+ _rl_iscxt = 0;
if (r >= 0)
_rl_isearch_fini (cxt);
_rl_scxt_dispose (cxt, 0);
return (r != 0);
*** ../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 8
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 9
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,49 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-010
Bug-Reported-by: Aleksey Covacevice <aleksey.covacevice@gmail.com>
Bug-Reference-ID:
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2026-01/msg00003.html
Bug-Description:
Patch (apply with `patch -p0'):
Under some circumstances, a subshell or asynchronous job with an active
EXIT trap that contains a call to `wait' can loop trying to wait for
processes that are not its children. It usually inherits these jobs from
its parent in the jobs list.
*** ../bash-5.3-patched/jobs.c Fri Jul 25 08:53:22 2025
--- jobs.c Fri Jan 9 10:21:03 2026
***************
*** 2840,2844 ****
ps->status = (r < 0 || r > 256) ? 127 : r;
}
! if (r == -1 && errno == ECHILD)
{
/* If we're mistaken about job state, compensate. */
--- 2842,2846 ----
ps->status = (r < 0 || r > 256) ? 127 : r;
}
! if ((r < 0 || r > 256) && errno == ECHILD)
{
/* If we're mistaken about job state, compensate. */
*** ../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 9
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 10
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,70 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-011
Bug-Reported-by: Philippe Grégoire <git@pgregoire.xyz>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
If a `mapfile' callback unsets the array variable `mapfile' is using to save
the lines it reads, `mapfile' can try to reference freed memory, which can
cause corruption or shell crashes.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/builtins/mapfile.def Mon May 6 11:58:48 2024
--- builtins/mapfile.def Mon May 25 16:23:50 2026
***************
*** 154,160 ****
unbuffered_read = 0;
! /* The following check should be done before reading any lines. Doing it
! here allows us to call bind_array_element instead of bind_array_variable
! and skip the variable lookup on every call. */
entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY);
if (entry == 0)
--- 154,158 ----
unbuffered_read = 0;
! /* The following check should be done before reading any lines. */
entry = builtin_find_indexed_array (array_name, flags & MAPF_CLEARARRAY);
if (entry == 0)
***************
*** 202,207 ****
}
! /* XXX - bad things can happen if the callback modifies ENTRY, e.g.,
! unsetting it or changing it to a non-indexed-array type. */
bind_array_element (entry, array_index, line, 0);
--- 200,210 ----
}
! /* 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);
*** ../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 10
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 11
#endif /* _PATCHLEVEL_H_ */
@@ -0,0 +1,80 @@
BASH PATCH REPORT
=================
Bash-Release: 5.3
Patch-ID: bash53-012
Bug-Reported-by: earl_chew@yahoo.com
Bug-Reference-ID:
Bug-Reference-URL: https://savannah.gnu.org/bugs/?67745
Bug-Description:
If a subshell with an inherited EXIT trap receives a fatal signal before
it clears the exit trap, and before it restores its original signal
handlers, it's possible for it to inappropriately run the inherited EXIT
trap.
Patch (apply with `patch -p0'):
*** ../bash-5.3-patched/execute_cmd.c Thu Jun 5 11:02:01 2025
--- execute_cmd.c Fri Jan 9 10:21:30 2026
***************
*** 1644,1648 ****
if (user_subshell)
{
! subshell_environment = SUBSHELL_PAREN; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
--- 1681,1685 ----
if (user_subshell)
{
! subshell_environment = SUBSHELL_PAREN|SUBSHELL_IGNTRAP; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
***************
*** 1650,1654 ****
else
{
! subshell_environment = 0; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
--- 1687,1691 ----
else
{
! subshell_environment = SUBSHELL_IGNTRAP; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
*** ../bash-5.3-patched/sig.c Wed Dec 18 15:52:06 2024
--- sig.c Fri Jan 9 10:21:43 2026
***************
*** 639,643 ****
comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
! run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
kill_shell (sig);
--- 645,652 ----
comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
! /* Don't run the exit trap if we're supposed to be ignoring traps in a
! subshell environment. */
! if ((subshell_environment & SUBSHELL_IGNTRAP) == 0)
! run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
kill_shell (sig);
*** ../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 11
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 12
#endif /* _PATCHLEVEL_H_ */
+11 -1
View File
@@ -27,6 +27,10 @@
<Patch>official/bash53-006.patch</Patch> <Patch>official/bash53-006.patch</Patch>
<Patch>official/bash53-007.patch</Patch> <Patch>official/bash53-007.patch</Patch>
<Patch>official/bash53-008.patch</Patch> <Patch>official/bash53-008.patch</Patch>
<Patch>official/bash53-009.patch</Patch>
<Patch>official/bash53-010.patch</Patch>
<Patch>official/bash53-011.patch</Patch>
<Patch>official/bash53-012.patch</Patch>
<!-- Fedora patches --> <!-- Fedora patches -->
<!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> --> <!-- <Patch level="1">fedora/bash-2.03-paths.patch</Patch> -->
@@ -51,7 +55,6 @@
<!-- <Patch level="1">fedora/bash-requires.patch</Patch> --> <!-- <Patch level="1">fedora/bash-requires.patch</Patch> -->
<Patch level="1">fedora/bash-setlocale.patch</Patch> <Patch level="1">fedora/bash-setlocale.patch</Patch>
<Patch level="1">fedora/bash-tty-tests.patch</Patch> <Patch level="1">fedora/bash-tty-tests.patch</Patch>
</Patches> </Patches>
</Source> </Source>
@@ -76,6 +79,13 @@
</Package> </Package>
<History> <History>
<Update release="22">
<Date>2026-06-06</Date>
<Version>5.3.12</Version>
<Comment>Version bump.</Comment>
<Name>Pisi Linux Community</Name>
<Email>admin@pisilinux.org</Email>
</Update>
<Update release="21"> <Update release="21">
<Date>2025-12-01</Date> <Date>2025-12-01</Date>
<Version>5.3.3</Version> <Version>5.3.3</Version>