From patchwork Tue Dec 16 10:27:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 9372 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4dVtS25jVcz3wpj for ; Tue, 16 Dec 2025 10:28:18 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "E8" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4dVtRz6WNpz75W for ; Tue, 16 Dec 2025 10:28:15 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4dVtRy5fvdz336s for ; Tue, 16 Dec 2025 10:28:14 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4dVtRv26G6z332M for ; Tue, 16 Dec 2025 10:28:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4dVtRs5gRcz2lc; Tue, 16 Dec 2025 10:28:09 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1765880889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gOoAiLVXHtEe7dWzyrbgK9lR66TD3yNMoJFCKvIYO/c=; b=AVkelhXBS54PLsrKbUzRQKuRYOaD+y4KGfelMcW+uoCyqgXXel8mbxZgOzAg/Tb7qfzhTm c3pT7YBOzRTnSFCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1765880889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gOoAiLVXHtEe7dWzyrbgK9lR66TD3yNMoJFCKvIYO/c=; b=DQFvXO4cp/zQSQ3iMhRCgwHSMj6XICFB7bGjtWUDhgmr+7dNujVfBpgEj5JwlTZ0DQ9ICY uggQd+ELMzYTOFtPJuClGNaOuodVYXwrsHWacl13o6Ysrq3VKfOVWJJOpEax3Q97noy9CA e/3+35hObEsWg/6QR146unY28hTbX4yneOO3G0nABWA47mziArU017Rb25p7F3hXBDkunA tPf9VY+sPmon1fueUx7/eeTlkBUZE8sIxLFJC539l/pS0nvWuNFsTZq/qF41TVdRN1FTSi SPXPuKtLdAhO7oA173QF0FGKdc1jh+B+7uOO1c3H3mZ0VqPRkHikAEDvhx5Neg== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] bash: Update to version 5.3 patch 9 Date: Tue, 16 Dec 2025 11:27:55 +0100 Message-ID: <20251216102805.3606194-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Update from version 5.3 patch 8 to 5.3 patch 9 - No change to rootfile - Changelog 5.3-009 A SIGINT during a reverse i-search can cause a segmentation fault due to accessing data freed by a signal handler. Signed-off-by: Adolf Belka --- lfs/bash | 2 +- src/patches/bash/bash53-009 | 82 +++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 src/patches/bash/bash53-009 diff --git a/lfs/bash b/lfs/bash index adfbd35d1..fd68e8805 100644 --- a/lfs/bash +++ b/lfs/bash @@ -25,7 +25,7 @@ include Config VER = 5.3 -PATCHVER = 8 +PATCHVER = 9 THISAPP = bash-$(VER) DL_FILE = $(THISAPP).tar.gz diff --git a/src/patches/bash/bash53-009 b/src/patches/bash/bash53-009 new file mode 100644 index 000000000..4b53b4145 --- /dev/null +++ b/src/patches/bash/bash53-009 @@ -0,0 +1,82 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 5.3 +Patch-ID: bash53-009 + +Bug-Reported-by: penguin p +Bug-Reference-ID: +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_ */