Hello community, here is the log from the commit of package glibc for openSUSE:Factory checked in at 2015-09-11 09:00:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/glibc (Old) and /work/SRC/openSUSE:Factory/.glibc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc" Changes: -------- --- /work/SRC/openSUSE:Factory/glibc/glibc-testsuite.changes 2015-08-21 07:37:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.glibc.new/glibc-testsuite.changes 2015-09-11 09:00:11.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Sep 7 13:27:58 UTC 2015 - sch...@suse.de + +- opendir-o-directory-check.patch: Fix opendir inverted o_directory_works + test +- static-dlopen.patch: Static dlopen default library search path fix + (bsc#937853) + +------------------------------------------------------------------- +Mon Aug 31 12:21:29 UTC 2015 - sch...@suse.de + +- mntent-blank-line.patch: Fix memory corruption w/blank lines + +------------------------------------------------------------------- glibc-utils.changes: same change glibc.changes: same change New: ---- mntent-blank-line.patch opendir-o-directory-check.patch static-dlopen.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ glibc-testsuite.spec ++++++ --- /var/tmp/diff_new_pack.swxJpH/_old 2015-09-11 09:00:14.000000000 +0200 +++ /var/tmp/diff_new_pack.swxJpH/_new 2015-09-11 09:00:14.000000000 +0200 @@ -230,6 +230,14 @@ ### # Patches from upstream ### +# PATCH-FIX-UPSTREAM Clear DF_1_NODELETE flag only for failed to load library (BZ #18778) +Patch1000: dont-remove-nodelete-flag.patch +# PATCH-FIX-UPSTREAM Readd O_LARGEFILE flag for openat64 (BZ #18781) +Patch1001: openat64-readd-o-largefile.patch +# PATCH-FIX-UPSTREAM getmntent: fix memory corruption w/blank lines (BZ #18887) +Patch1002: mntent-blank-line.patch +# PATCH-FIX-UPSTREAM Fix opendir inverted o_directory_works test (BZ #18921) +Patch1003: opendir-o-directory-check.patch ### # Patches awaiting upstream approval @@ -244,10 +252,8 @@ Patch2005: glibc-memset-nontemporal.diff # PATCH-FIX-UPSTREAM Avoid redundant shift character in iconv output at block boundary (BZ #17197) Patch2006: ibm93x-redundant-shift-si.patch -# BZ #18778 -Patch2007: dont-remove-nodelete-flag.patch -# BZ #18781 -Patch2008: openat64-readd-o-largefile.patch +# PATCH-FIX-UPSTREAM Static dlopen default library search path fix (BZ #17250) +Patch2007: static-dlopen.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -447,13 +453,17 @@ %patch304 -p1 %patch306 -p1 +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 + %patch2000 -p1 %patch2002 -p1 %patch2003 -p1 %patch2005 -p1 %patch2006 -p1 %patch2007 -p1 -%patch2008 -p1 %patch3000 glibc-utils.spec: same change ++++++ glibc.spec ++++++ --- /var/tmp/diff_new_pack.swxJpH/_old 2015-09-11 09:00:14.000000000 +0200 +++ /var/tmp/diff_new_pack.swxJpH/_new 2015-09-11 09:00:14.000000000 +0200 @@ -230,6 +230,14 @@ ### # Patches from upstream ### +# PATCH-FIX-UPSTREAM Clear DF_1_NODELETE flag only for failed to load library (BZ #18778) +Patch1000: dont-remove-nodelete-flag.patch +# PATCH-FIX-UPSTREAM Readd O_LARGEFILE flag for openat64 (BZ #18781) +Patch1001: openat64-readd-o-largefile.patch +# PATCH-FIX-UPSTREAM getmntent: fix memory corruption w/blank lines (BZ #18887) +Patch1002: mntent-blank-line.patch +# PATCH-FIX-UPSTREAM Fix opendir inverted o_directory_works test (BZ #18921) +Patch1003: opendir-o-directory-check.patch ### # Patches awaiting upstream approval @@ -244,10 +252,8 @@ Patch2005: glibc-memset-nontemporal.diff # PATCH-FIX-UPSTREAM Avoid redundant shift character in iconv output at block boundary (BZ #17197) Patch2006: ibm93x-redundant-shift-si.patch -# BZ #18778 -Patch2007: dont-remove-nodelete-flag.patch -# BZ #18781 -Patch2008: openat64-readd-o-largefile.patch +# PATCH-FIX-UPSTREAM Static dlopen default library search path fix (BZ #17250) +Patch2007: static-dlopen.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -447,13 +453,17 @@ %patch304 -p1 %patch306 -p1 +%patch1000 -p1 +%patch1001 -p1 +%patch1002 -p1 +%patch1003 -p1 + %patch2000 -p1 %patch2002 -p1 %patch2003 -p1 %patch2005 -p1 %patch2006 -p1 %patch2007 -p1 -%patch2008 -p1 %patch3000 ++++++ mntent-blank-line.patch ++++++ 2015-08-28 Mike Frysinger <vap...@gentoo.org> [BZ #18887] * misc/Makefile (tests): Add tst-mntent-blank-corrupt and tst-mntent-blank-passno. * misc/mntent_r.c (__getmntent_r): Do not read past buffer[0]. * misc/tst-mntent-blank-corrupt.c: New test. * misc/tst-mntent-blank-passno.c: New test ripped from ... * misc/tst-mntent.c (do_test): ... here. diff --git a/misc/Makefile b/misc/Makefile index aecb0da..2f5edf6 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -76,7 +76,8 @@ install-lib := libg.a gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ - tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 + tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \ + tst-mntent-blank-corrupt tst-mntent-blank-passno ifeq ($(run-built-tests),yes) tests-special += $(objpfx)tst-error1-mem.out endif diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 6159873..4f26998 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -136,7 +136,9 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) end_ptr = strchr (buffer, '\n'); if (end_ptr != NULL) /* chop newline */ { - while (end_ptr[-1] == ' ' || end_ptr[-1] == '\t') + /* Do not walk past the start of buffer if it's all whitespace. */ + while (end_ptr != buffer + && (end_ptr[-1] == ' ' || end_ptr[-1] == '\t')) end_ptr--; *end_ptr = '\0'; } diff --git a/misc/tst-mntent-blank-corrupt.c b/misc/tst-mntent-blank-corrupt.c new file mode 100644 index 0000000..92266a3 --- /dev/null +++ b/misc/tst-mntent-blank-corrupt.c @@ -0,0 +1,45 @@ +/* Make sure blank lines does not cause memory corruption BZ #18887. + + Copyright (C) 2009-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <mntent.h> +#include <stdio.h> +#include <string.h> + +/* Make sure blank lines don't trigger memory corruption. This doesn't happen + for all targets though, so it's a best effort test BZ #18887. */ +static int +do_test (void) +{ + FILE *fp; + + fp = tmpfile (); + fputs ("\n \n/foo\\040dir /bar\\040dir auto bind \t \n", fp); + rewind (fp); + + /* The corruption happens here ... */ + getmntent (fp); + /* ... but trigers here. */ + endmntent (fp); + + /* If the test failed, we would crash, and not hit this point. */ + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-mntent-blank-passno.c b/misc/tst-mntent-blank-passno.c new file mode 100644 index 0000000..fc04291 --- /dev/null +++ b/misc/tst-mntent-blank-passno.c @@ -0,0 +1,53 @@ +/* Make sure trailing whitespace is handled properly BZ #17273. + + Copyright (C) 2009-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <mntent.h> +#include <stdio.h> +#include <string.h> + +/* Check entries to make sure trailing whitespace is ignored and we return the + correct passno value BZ #17273. */ +static int +do_test (void) +{ + int result = 0; + FILE *fp; + struct mntent *mnt; + + fp = tmpfile (); + fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp); + rewind (fp); + + mnt = getmntent (fp); + if (strcmp (mnt->mnt_fsname, "/foo dir") != 0 + || strcmp (mnt->mnt_dir, "/bar dir") != 0 + || strcmp (mnt->mnt_type, "auto") != 0 + || strcmp (mnt->mnt_opts, "bind") != 0 + || mnt->mnt_freq != 0 + || mnt->mnt_passno != 0) + { + puts ("Error while reading entry with trailing whitespaces"); + result = 1; + } + + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/misc/tst-mntent.c b/misc/tst-mntent.c index 932fd3f..b6ad8af 100644 --- a/misc/tst-mntent.c +++ b/misc/tst-mntent.c @@ -73,26 +73,6 @@ do_test (void) puts ("Error while reading written entry back in"); result = 1; } - - /* Part III: Entry with whitespaces at the end of a line. */ - rewind (fp); - - fputs ("/foo\\040dir /bar\\040dir auto bind \t \n", fp); - - rewind (fp); - - mnt = getmntent (fp); - - if (strcmp (mnt->mnt_fsname, "/foo dir") != 0 - || strcmp (mnt->mnt_dir, "/bar dir") != 0 - || strcmp (mnt->mnt_type, "auto") != 0 - || strcmp (mnt->mnt_opts, "bind") != 0 - || mnt->mnt_freq != 0 - || mnt->mnt_passno != 0) - { - puts ("Error while reading entry with trailing whitespaces"); - result = 1; - } } return result; -- 2.5.1 ++++++ opendir-o-directory-check.patch ++++++ 2015-09-04 Roland McGrath <rol...@hack.frob.com> [BZ #18921] * sysdeps/posix/opendir.c (need_isdir_precheck) [O_DIRECTORY]: Fix inverted sense of test of 'o_directory_works' value. Reported by Pádraig Brady <p...@draigbrady.com>, diagnosed by Bernhard Voelker <m...@bernhard-voelker.de>. Index: glibc-2.22/sysdeps/posix/opendir.c =================================================================== --- glibc-2.22.orig/sysdeps/posix/opendir.c +++ glibc-2.22/sysdeps/posix/opendir.c @@ -105,7 +105,7 @@ need_isdir_precheck (void) tryopen_o_directory (); /* We can skip the expensive `stat' call if O_DIRECTORY works. */ - return o_directory_works > 0; + return o_directory_works < 0; #endif return true; } ++++++ static-dlopen.patch ++++++ 2015-08-04 Maciej W. Rozycki <ma...@linux-mips.org> [BZ #17250] * elf/dl-support.c (_dl_main_map): Don't initialize l_flags_1 member. Index: glibc-2.22/elf/dl-support.c =================================================================== --- glibc-2.22.orig/elf/dl-support.c +++ glibc-2.22/elf/dl-support.c @@ -91,7 +91,6 @@ static struct link_map _dl_main_map = .l_scope = _dl_main_map.l_scope_mem, .l_local_scope = { &_dl_main_map.l_searchlist }, .l_used = 1, - .l_flags_1 = DF_1_NODEFLIB, .l_tls_offset = NO_TLS_OFFSET, .l_serial = 1, };