Hello community,
here is the log from the commit of package bash for openSUSE:Factory
checked in at Tue Apr 13 21:20:09 CEST 2010.
--------
--- bash/bash.changes 2010-03-09 15:35:19.000000000 +0100
+++ /mounts/work_src_done/STABLE/bash/bash.changes 2010-04-12 11:37:37.000000000 +0200
@@ -1,0 +2,21 @@
+Mon Apr 12 11:36:30 CEST 2010 - werner@suse.de
+
+- Add fix for memory double free in array handling
+
+-------------------------------------------------------------------
+Tue Apr 6 15:27:24 CEST 2010 - werner@suse.de
+
+- Update bash 4.1 to patch level 5 (related to bnc#522351)
+ * If command completion is attempted on a word with a quoted globbing
+ character (e.g., `*' or `?'), bash can reference a NULL pointer and
+ dump core.
+ * When running in Posix mode and executing a shell function without local
+ variables, bash will not propagate a variable in a special builtin's temporary
+ environment to have global scope.
+ * When the `read' builtin times out after the timeout specified with -t is
+ exceeded, it does not reset the flags that tell signal handlers to process
+ signals immediately instead of deferring their handling. This can result
+ in unsafe functions being called from signal handlers, which can cause bash
+ to hang or dump core.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
bash-4.1-array.dif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bash.spec ++++++
--- /var/tmp/diff_new_pack.M5KvtX/_old 2010-04-13 21:19:27.000000000 +0200
+++ /var/tmp/diff_new_pack.M5KvtX/_new 2010-04-13 21:19:27.000000000 +0200
@@ -28,7 +28,7 @@
Suggests: command-not-found
AutoReqProv: on
Version: 4.1
-Release: 4
+Release: 5
Summary: The GNU Bourne-Again Shell
Url: http://www.gnu.org/software/bash/bash.html
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2
@@ -65,6 +65,7 @@
Patch40: bash-4.1-bash.bashrc.dif
Patch41: bash-4.1-intr.dif
Patch42: bash-4.1-non_void.patch
+Patch43: bash-4.1-array.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc
%global _incdir %{_includedir}
@@ -93,7 +94,7 @@
Provides: bash:%{_infodir}/bash.info.gz
PreReq: %install_info_prereq
Version: 4.1
-Release: 4
+Release: 5
AutoReqProv: on
%if %suse_version > 1120
BuildArch: noarch
@@ -116,7 +117,7 @@
Summary: Include Files mandatory for Development of bash loadable builtins
Group: Development/Languages/C and C++
Version: 4.1
-Release: 4
+Release: 5
AutoReqProv: on
%description -n bash-devel
@@ -136,7 +137,7 @@
Summary: Loadable bash builtins
Group: System/Shells
Version: 4.1
-Release: 4
+Release: 5
AutoReqProv: on
%description -n bash-loadables
@@ -205,7 +206,7 @@
Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Version: 6.1
-Release: 4
+Release: 5
Recommends: readline-doc = %{version}
# bug437293
%ifarch ppc64
@@ -234,7 +235,7 @@
Group: Development/Libraries/C and C++
Provides: bash:%{_libdir}/libreadline.a
Version: 6.1
-Release: 4
+Release: 5
Requires: libreadline6 = %{version}
Requires: ncurses-devel
Recommends: readline-doc = %{version}
@@ -263,7 +264,7 @@
Provides: readline:%{_infodir}/readline.info.gz
PreReq: %install_info_prereq
Version: 6.1
-Release: 4
+Release: 5
AutoReqProv: on
%if %suse_version > 1120
BuildArch: noarch
@@ -310,6 +311,7 @@
%patch40 -p0 -b .bashrc
%patch41 -p0 -b .intr
%patch42 -p0 -b .non_void
+%patch43 -p0 -b .array
%patch0 -p0
cd ../readline-%{rl_vers}
for p in ../readline-%{rl_vers}-patches/*; do
++++++ bash-4.1-array.dif ++++++
Andreas Schwab writes:
$ declare -A a=b; unset a
*** glibc detected *** /bin/bash: free(): invalid pointer: 0x10091644 ***
And the obvious patch:
--- builtins/declare.def
+++ builtins/declare.def 2010-04-09 17:20:51.000000000 +0000
@@ -512,7 +512,7 @@ declare_internal (list, local_var)
{
/* let bind_{array,assoc}_variable take care of this. */
if (assoc_p (var))
- bind_assoc_variable (var, name, "0", value, aflags);
+ bind_assoc_variable (var, name, savestring ("0"), value, aflags);
else
bind_array_variable (name, 0, value, aflags);
}
++++++ bash-4.1-intr.dif ++++++
--- /var/tmp/diff_new_pack.M5KvtX/_old 2010-04-13 21:19:27.000000000 +0200
+++ /var/tmp/diff_new_pack.M5KvtX/_new 2010-04-13 21:19:27.000000000 +0200
@@ -14,145 +14,3 @@
}
#if 0
---- xmalloc.c
-+++ xmalloc.c 2010-02-24 08:32:51.452626384 +0000
-@@ -35,6 +35,11 @@
- # include "ansi_stdlib.h"
- #endif /* HAVE_STDLIB_H */
-
-+/* Determine which kind of system this is. */
-+#include
-+extern int interrupt_immediately;
-+extern int signal_is_trapped __P((int));
-+
- #include "error.h"
-
- #include "bashintl.h"
-@@ -94,6 +99,34 @@ allocerr (func, bytes)
- #endif /* !HAVE_SBRK */
- }
-
-+static void
-+block_signals (setp, osetp)
-+ sigset_t *setp, *osetp;
-+{
-+#ifdef HAVE_POSIX_SIGNALS
-+ sigfillset (setp);
-+ sigemptyset (osetp);
-+ sigprocmask (SIG_BLOCK, setp, osetp);
-+#else
-+# if defined (HAVE_BSD_SIGNALS)
-+ *osetp = sigsetmask (-1);
-+# endif
-+#endif
-+}
-+
-+static void
-+unblock_signals (setp, osetp)
-+ sigset_t *setp, *osetp;
-+{
-+#ifdef HAVE_POSIX_SIGNALS
-+ sigprocmask (SIG_SETMASK, osetp, (sigset_t *)NULL);
-+#else
-+# if defined (HAVE_BSD_SIGNALS)
-+ sigsetmask (*osetp);
-+# endif
-+#endif
-+}
-+
- /* Return a pointer to free()able block of memory large enough
- to hold BYTES number of bytes. If the memory cannot be allocated,
- print an error message and abort. */
-@@ -102,15 +135,28 @@ xmalloc (bytes)
- size_t bytes;
- {
- PTR_T temp;
-+ sigset_t set, oset;
-+ int blocked_sigs;
-
- #if defined (DEBUG)
- if (bytes == 0)
- internal_warning("xmalloc: size argument is 0");
- #endif
-
-+ /* Block all signals in case we are executed from a signal handler. */
-+ blocked_sigs = 0;
-+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
-+ {
-+ block_signals (&set, &oset);
-+ blocked_sigs = 1;
-+ }
-+
- FINDBRK();
- temp = malloc (bytes);
-
-+ if (blocked_sigs)
-+ unblock_signals (&set, &oset);
-+
- if (temp == 0)
- allocerr ("xmalloc", bytes);
-
-@@ -123,15 +169,28 @@ xrealloc (pointer, bytes)
- size_t bytes;
- {
- PTR_T temp;
-+ sigset_t set, oset;
-+ int blocked_sigs;
-
- #if defined (DEBUG)
- if (bytes == 0)
- internal_warning("xrealloc: size argument is 0");
- #endif
-
-+ /* Block all signals in case we are executed from a signal handler. */
-+ blocked_sigs = 0;
-+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
-+ {
-+ block_signals (&set, &oset);
-+ blocked_sigs = 1;
-+ }
-+
- FINDBRK();
- temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
-
-+ if (blocked_sigs)
-+ unblock_signals (&set, &oset);
-+
- if (temp == 0)
- allocerr ("xrealloc", bytes);
-
-@@ -145,7 +204,22 @@ xfree (string)
- PTR_T string;
- {
- if (string)
-- free (string);
-+ {
-+ sigset_t set, oset;
-+ int blocked_sigs = 0;
-+
-+ /* Block all signals in case we are executed from a signal handler. */
-+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
-+ {
-+ block_signals (&set, &oset);
-+ blocked_sigs = 1;
-+ }
-+
-+ free (string);
-+
-+ if (blocked_sigs)
-+ unblock_signals (&set, &oset);
-+ }
- }
-
- #ifdef USING_BASH_MALLOC
---- builtins/read.def
-+++ builtins/read.def 2010-03-02 16:24:59.070362886 +0000
-@@ -387,6 +387,8 @@ read_builtin (list)
- input_string. We want to run all the rest and use input_string,
- so we have to remove it from the stack. */
- remove_unwind_protect ();
-+ interrupt_immediately--;
-+ terminate_immediately = 0;
- run_unwind_frame ("read_builtin");
- input_string[i] = '\0'; /* make sure it's terminated */
- retval = 128+SIGALRM;
++++++ bash-4.1-patches.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.1-patches/bash41-003 new/bash-4.1-patches/bash41-003
--- old/bash-4.1-patches/bash41-003 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.1-patches/bash41-003 2010-03-26 17:21:40.000000000 +0100
@@ -0,0 +1,48 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.1
+Patch-ID: bash41-003
+
+Bug-Reported-by: coyote@wariat.org.pl
+Bug-Reference-ID: <4b64a1f8.06e2660a.60af.4bfb@mx.google.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00135.html
+
+Bug-Description:
+
+If command completion is attempted on a word with a quoted globbing
+character (e.g., `*' or `?'), bash can reference a NULL pointer and
+dump core.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.1-patched/bashline.c 2009-10-24 14:10:19.000000000 -0400
+--- bashline.c 2010-01-30 21:53:49.000000000 -0500
+***************
+*** 1681,1685 ****
+ characters in the common prefix are bad) will ever be returned on
+ regular completion. */
+! if (glob_pattern_p (hint))
+ {
+ if (state == 0)
+--- 1681,1685 ----
+ characters in the common prefix are bad) will ever be returned on
+ regular completion. */
+! if (globpat)
+ {
+ if (state == 0)
+*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
+--- patchlevel.h 2010-01-14 09:38:08.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.1-patches/bash41-004 new/bash-4.1-patches/bash41-004
--- old/bash-4.1-patches/bash41-004 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.1-patches/bash41-004 2010-03-26 17:21:52.000000000 +0100
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.1
+Patch-ID: bash41-004
+
+Bug-Reported-by: Crestez Dan Leonard
+Bug-Reference-ID: <1265592839.30682.21.camel@deskbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00034.html
+
+Bug-Description:
+
+When running in Posix mode and executing a shell function without local
+variables, bash will not propagate a variable in a special builtin's temporary
+environment to have global scope.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.1-patched/variables.c 2009-11-03 14:13:58.000000000 -0500
+--- variables.c 2010-02-08 17:36:18.000000000 -0500
+***************
+*** 3809,3812 ****
+--- 3809,3817 ----
+ if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
+ {
++ /* Make sure we have a hash table to store the variable in while it is
++ being propagated down to the global variables table. Create one if
++ we have to */
++ if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
++ shell_variables->table = hash_create (0);
+ /* XXX - should we set v->context here? */
+ v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
+*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
+--- patchlevel.h 2010-01-14 09:38:08.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bash-4.1-patches/bash41-005 new/bash-4.1-patches/bash41-005
--- old/bash-4.1-patches/bash41-005 1970-01-01 01:00:00.000000000 +0100
+++ new/bash-4.1-patches/bash41-005 2010-03-26 17:22:07.000000000 +0100
@@ -0,0 +1,56 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.1
+Patch-ID: bash41-005
+
+Bug-Reported-by: werner@suse.de
+Bug-Reference-ID: <201002251238.o1PCcYcg016893@boole.suse.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-02/msg00132.html
+
+Bug-Description:
+
+When the `read' builtin times out after the timeout specified with -t is
+exceeded, it does not reset the flags that tell signal handlers to process
+signals immediately instead of deferring their handling. This can result
+in unsafe functions being called from signal handlers, which can cause bash
+to hang or dump core.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.1-patched/builtins/read.def 2009-10-08 11:35:46.000000000 -0400
+--- builtins/read.def 2010-03-17 17:35:39.000000000 -0400
+***************
+*** 616,621 ****
+ zsyncfd (fd);
+
+- interrupt_immediately--;
+- terminate_immediately--;
+ discard_unwind_frame ("read_builtin");
+
+--- 616,619 ----
+***************
+*** 624,627 ****
+--- 622,628 ----
+ assign_vars:
+
++ interrupt_immediately--;
++ terminate_immediately--;
++
+ #if defined (ARRAY_VARS)
+ /* If -a was given, take the string read, break it into a list of words,
+*** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
+--- patchlevel.h 2010-01-14 09:38:08.000000000 -0500
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org