aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-07-20sparc: fix sigaction for 32bit builds [BZ #18694]gentoo/2.20Mike Frysinger3-1/+16
Commit a059d359d86130b5fa74e04a978c8523a0293f77 changed the sigaction struct to pass conform tests, but it ended up also changing the ABI for 32 bit builds. For 64 bit builds, changing the long to two ints works, but for 32 bit builds, it inserts 4 extra bytes. This leads to many packages randomly failing like bash that spews things like: configure: line 471: wait_for: No record of process 0 Bracket the new member by a wordsize check to fix the ABI for 32bit. (cherry picked from commit 7fde904c73c57faea48c9679bbdc0932d81b3a2f) (cherry picked from commit ed99e5f9cc6471745488f269d16ee5b127944a85)
2015-02-17Merge branch 'release/2.20/master' into 'gentoo/2.20'Mike Frysinger43-218/+1074
2015-02-16CVE-2015-1472: wscanf allocates too little memoryPaul Pluzhnikov4-8/+54
BZ #16618 Under certain conditions wscanf can allocate too little memory for the to-be-scanned arguments and overflow the allocated buffer. The implementation now correctly computes the required buffer size when using malloc. A regression test was added to tst-sscanf. (cherry picked from commit 5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06) Conflicts: ChangeLog NEWS
2015-02-16Use AVX unaligned memcpy only if AVX2 is availableH.J. Lu10-9/+37
memcpy with unaligned 256-bit AVX register loads/stores are slow on older processorsl like Sandy Bridge. This patch adds bit_AVX_Fast_Unaligned_Load and sets it only when AVX2 is available. [BZ #17801] * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Set the bit_AVX_Fast_Unaligned_Load bit for AVX2. * sysdeps/x86_64/multiarch/init-arch.h (bit_AVX_Fast_Unaligned_Load): New. (index_AVX_Fast_Unaligned_Load): Likewise. (HAS_AVX_FAST_UNALIGNED_LOAD): Likewise. * sysdeps/x86_64/multiarch/memcpy.S (__new_memcpy): Check the bit_AVX_Fast_Unaligned_Load bit instead of the bit_AVX_Usable bit. * sysdeps/x86_64/multiarch/memcpy_chk.S (__memcpy_chk): Likewise. * sysdeps/x86_64/multiarch/mempcpy.S (__mempcpy): Likewise. * sysdeps/x86_64/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise. * sysdeps/x86_64/multiarch/memmove.c (__libc_memmove): Replace HAS_AVX with HAS_AVX_FAST_UNALIGNED_LOAD. * sysdeps/x86_64/multiarch/memmove_chk.c (__memmove_chk): Likewise. (cherry picked from commit 5f3d0b78e011d2a72f9e88b0e9ef5bc081d18f97) Conflicts: ChangeLog NEWS
2015-02-16Fix memory handling in strxfrm_l [BZ #16009]Leonhard Holz5-101/+464
[Modified from the original email by Siddhesh Poyarekar] This patch solves bug #16009 by implementing an additional path in strxfrm that does not depend on caching the weight and rule indices. In detail the following changed: * The old main loop was factored out of strxfrm_l into the function do_xfrm_cached to be able to alternativly use the non-caching version do_xfrm. * strxfrm_l allocates a a fixed size array on the stack. If this is not sufficiant to store the weight and rule indices, the non-caching path is taken. As the cache size is not dependent on the input there can be no problems with integer overflows or stack allocations greater than __MAX_ALLOCA_CUTOFF. Note that malloc-ing is not possible because the definition of strxfrm does not allow an oom errorhandling. * The uncached path determines the weight and rule index for every char and for every pass again. * Passing all the locale data array by array resulted in very long parameter lists, so I introduced a structure that holds them. * Checking for zero src string has been moved a bit upwards, it is before the locale data initialization now. * To verify that the non-caching path works correct I added a test run to localedata/sort-test.sh & localedata/xfrm-test.c where all strings are patched up with spaces so that they are too large for the caching path. (cherry picked from commit 0f9e585480edcdf1e30dc3d79e24b84aeee516fa) Conflicts: ChangeLog NEWS
2015-02-16Move findidx nested functions to top-level.Roland McGrath10-34/+91
Needed in order to backport strxfrm_l security fix cleanly. (cherry picked from commit 8c0ab919f63dc03a420751172602a52d2bea59a8) Conflicts: ChangeLog
2014-12-18Avoid infinite loop in nss_dns getnetbyname [BZ #17630]Florian Weimer3-4/+14
(cherry picked from commit 11e3417af6e354f1942c68a271ae51e892b2814d) (cherry picked from commit e54db0ea6a49affac43fa305fd134f3020c41382) Conflicts: NEWS
2014-12-16CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]Jeff Law7-4/+202
A larger number of format specifiers coudld cause a stack overflow, potentially allowing to bypass _FORTIFY_SOURCE format string protection. (cherry picked from commit a5357b7ce2a2982c5778435704bcdb55ce3667a0) (cherry picked from commit ae61fc7b33d9d99d2763c16de8275227dc9748ba) Conflicts: NEWS
2014-11-24Make __extern_always_inline usable on clang++ againSiddhesh Poyarekar2-2/+14
The fix for BZ #17266 (884ddc5081278f488ef8cd49951f41cfdbb480ce) removed changes that had gone into cdefs.h to make __extern_always_inline usable with clang++. This patch adds back support for clang to detect if GNU inlining semantics are available, this time without breaking the gcc use case. The check put here is based on the earlier patch and assertion[1] that checking if __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ is defined is sufficient to determine that clang++ suports GNU inlining semantics. Tested with a simple program that builds with __extern_always_inline with the patch and fails compilation without it. #include <stdio.h> #include <sys/cdefs.h> extern void foo_alias (void) __asm ("foo"); __extern_always_inline void foo (void) { puts ("hi oh world!"); return foo_alias (); } void foo_alias (void) { puts ("hell oh world"); } int main () { foo (); } [1] https://sourceware.org/ml/libc-alpha/2012-12/msg00306.html [BZ #17266] * misc/sys/cdefs.h: Define __extern_always_inline for clang 4.2 and newer. (cherry picked from commit 602f80ec8b966cfad3b61914cbe14ee606cedf6e)
2014-11-22arm: drop EABI checkMike Frysinger2-27/+0
GCC marked OABI obsolete in 4.7 and dropped it in 4.8. So the number of people this is catching is shrinking every day. At this point, it's not terribly useful, so just drop it. (cherry picked from commit 34d97d87bb1c08e34d08a9d4be24a3b1d53a4ddb)
2014-11-19CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.Carlos O'Donell4-13/+78
The function wordexp() fails to properly handle the WRDE_NOCMD flag when processing arithmetic inputs in the form of "$((... ``))" where "..." can be anything valid. The backticks in the arithmetic epxression are evaluated by in a shell even if WRDE_NOCMD forbade command substitution. This allows an attacker to attempt to pass dangerous commands via constructs of the above form, and bypass the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD in exec_comm(), the only place that can execute a shell. All other checks for WRDE_NOCMD are superfluous and removed. We expand the testsuite and add 3 new regression tests of roughly the same form but with a couple of nested levels. On top of the 3 new tests we add fork validation to the WRDE_NOCMD testing. If any forks are detected during the execution of a wordexp() call with WRDE_NOCMD, the test is marked as failed. This is slightly heuristic since vfork might be used in the future, but it provides a higher level of assurance that no shells were executed as part of command substitution with WRDE_NOCMD in effect. In addition it doesn't require libpthread or libdl, instead we use the public implementation namespace function __register_atfork (already part of the public ABI for libpthread). Tested on x86_64 with no regressions. (cherry picked from commit a39208bd7fb76c1b01c127b4c61f9bfd915bfe7c)
2014-11-11[AArch64] End frame record chain correctly.Renlin Li3-2/+6
2014-10-22MIPS: Avoid a dangling `vfork@GLIBC_2.0' referenceMaciej W. Rozycki3-1/+7
This satisfies a symbol reference created with: .symver __libc_vfork, vfork@GLIBC_2.0 where `__libc_vfork' has not been defined or referenced. In this case the `vfork@GLIBC_2.0' reference is supposed to be discarded, however a bug present in GAS since forever causes an undefined symbol table entry to be created. This in turn triggers a problem in the linker that can manifest itself by link errors such as: ld: libpthread.so: invalid string offset 2765592330 >= 5154 for section `.dynstr' The GAS and linker bugs need to be resolved, but we can avoid them too by providing a `__libc_vfork' definition just like our other platforms. [BZ #17485] * sysdeps/unix/sysv/linux/mips/vfork.S (__libc_vfork): Define. (cherry picked from commit b5af9297d51a43f96c5be1bafab032184690dd6f) Conflicts: NEWS
2014-10-09BZ#17460: Fix buffer overrun in nscd --help.Roland McGrath4-25/+33
(cherry picked from commit c763c5d27112be055920c46f3be8d05bc8b669da) Conflicts: NEWS
2014-10-09Update French translationAllan McRae2-2/+6
(cherry picked from commit b6dcfe8c2408958be246dd61f1c5415ed7667a2a)
2014-09-16Fix memory leak in error path of do_ftell_wide (BZ #17370)Siddhesh Poyarekar2-1/+9
(cherry picked from commit 545583d664b64ff234b99aca0d85e99c8a55808f)
2014-09-16Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]Tim Lammens3-1/+7
(cherry picked from commit 984c0ea97f649c869130a1ff099098e2b6f70aad) Conflicts: NEWS
2014-09-16Revert to defining __extern_inline only for gcc-4.3+ (BZ #17266)Siddhesh Poyarekar5-15/+34
The check for only __GNUC_STDC_INLINE__ and __GNUC_GNU_INLINE__ may not be sufficient since those flags were added during initial support for C99 inlining semantics. There is also a problem with always defining __extern_inline and __extern_always_inline, since it enables inline wrapper functions even when GNU inlining semantics are not guaranteed. This, along with the possibility of such wrappers using redirection (btowc for example) could result in compiler generating an infinitely recusrive call to the function. In fact it was such a recursion that led to this code being written the way it was; see: https://bugzilla.redhat.com/show_bug.cgi?id=186410 The initial change was to fix bugs 14530 and 13741, but they can be resolved by checking if __fortify_function and/or __extern_always_inline are defined, as it has been done in this patch. In addition, I have audited uses of __extern_always_inline to make sure that none of the uses result in compilation errors. There is however a regression in this patch for llvm, since it reverts the llvm expectation that __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ definition imply proper extern inline semantics. 2014-09-16 Siddhesh Poyarekar <siddhesh@redhat.com> Jakub Jelinek <jakub@redhat.com> [BZ #17266] * libio/stdio.h: Check definition of __fortify_function instead of __extern_always_inline to include bits/stdio2.h. * math/bits/math-finite.h [__USE_XOPEN || __USE_ISOC99]: Also check if __extern_always_inline is defined. [__USE_MISC || __USE_XOPEN]: Likewise. [__USE_ISOC99] Likewise. * misc/sys/cdefs.h (__fortify_function): Define only if __extern_always_inline is defined. [!__cplusplus || __GNUC_PREREQ (4,3)]: Revert to defining __extern_always_inline and __extern_inline only for g++-4.3 and newer or a compatible gcc.
2014-09-16Handle zero prefix length in getifaddrs (BZ #17371)Andreas Schwab3-7/+16
(cherry picked from commit a7b872687073decdcc7effc2289877d69058aca9) Conflicts: NEWS
2014-09-13Add new Linux 3.16 constants to netinet/udp.h.Joseph Myers2-0/+9
This patch adds the new constants UDP_NO_CHECK6_TX and UDP_NO_CHECK6_RX from Linux 3.16 to sysdeps/gnu/netinet/udp.h. (I believe the existing constants there are already Linux-specific, possibly with the intention that other OSes should adopt the same values if possible if adopting the features in question.) Tested on x86_64. * sysdeps/gnu/netinet/udp.h (UDP_NO_CHECK6_TX): New macro. (UDP_NO_CHECK6_RX): Likewise. (cherry picked from commit 0bd72468030947254e7de183cac1014dac884475)
2014-09-13Update Russian translationAllan McRae2-5/+9
(cherry picked from commit d8f879ee3e4131542c2ac3d1d9db4cf12cb86729)
2014-09-09disable PIE when checking for PIC defaultKevin F. Quinn2-2/+2
When the compiler builds PIEs by default, the configure PIC check is confused into thinking PIC code is default. The end result is that we end up with only PIC being produced. Run the configure check with -fno-PIE so that we produce PIC & non-PIC (PIE) objects like normal. 2014-09-09 Kevin F. Quinn <kevquinn@gentoo.org> * configure.ac (libc_cv_pic_default): Pass -fno-PIE. * configure: Regenerated.
2014-09-07Update version.h and include/features.h for 2.20 releaseglibc-2.20Allan McRae3-3/+7
2014-09-07Update contrib.texiAllan McRae2-0/+9
Add entries for Wilco Dijkstra and Stefan Liebler.
2014-09-07Update Korean translationAllan McRae2-827/+889
2014-09-06[BZ #17354] tile: Fix up corner cases with signed relocationsChris Metcalf3-19/+30
Some types of relocations technically need to be signed rather than unsigned: in particular ones that are used with moveli or movei, or for jump and branch. This is almost never a problem. Jump and branch opcodes are pretty much uniformly resolved by the static linker (unless you omit -fpic for a shared library, which is not recommended). The moveli and movei opcodes that need to be sign-extended generally are for positive displacements, like the construction of the address of main() from _start(). However, tst-pie1 ends up with main below _start (in a different module) and the test failed due to signedness issues in relocation handling. This commit treats the value as signed when shifting (to preserve the high bit) and also sign-extends the value generated from the updated bundle when comparing with the desired bundle, which we do to make sure no overflow occurred. As a result, the tst-pie1 test now passes.
2014-09-03CVE-2014-6040: Crashes on invalid input in IBM gconv modules [BZ #17325]Florian Weimer11-10/+54
These changes are based on the fix for BZ #14134 in commit 6e230d11837f3ae7b375ea69d7905f0d18eb79e5.
2014-09-02Define __GI_fegetenv for e500 libmKhem Raj2-0/+6
generic HAVE_RM_CTX implementation which is used for ppc/e500 as well has introduced calls to fegetenv which should be resolved internally with in libm Signed-off-by: Khem Raj <raj.khem@gmail.com> * sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (fegetenv): Add libm_hidden_ver.
2014-09-01Update Esperanto translationAllan McRae2-530/+548
2014-09-01Update Catalan translationAllan McRae2-478/+498
2014-08-28Fix hang on forkSamuel Thibault2-0/+9
If e.g. a signal is being received while we are running fork(), the signal thread may be having our SS lock when we make the space copy, and thus in the child we can not take the SS lock any more. * sysdeps/mach/hurd/fork.c (__fork): Lock SS->lock around __proc_dostop call. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2014-08-28i386 TLS_INIT_TP might produce bogus asm changing stack pointer [BZ #17319]Mark Wielaard3-30/+14
TLS_INIT_TP in sysdeps/i386/nptl/tls.h uses some hand written asm to generate a set_thread_area that might result in exchanging ebx and esp around the syscall causing introspection tools like valgrind to loose track of the user stack. Just use INTERNAL_SYSCALL which makes sure esp isn't changed arbitrarily. Before the patch the code would generate: mov $0xf3,%eax movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %esp,%ebx int $0x80 xchg %esp,%ebx Using INTERNAL_SYSCALL instead will generate: movl $0xfffff,0x8(%esp) movl $0x51,0xc(%esp) xchg %ecx,%ebx mov $0xf3,%eax int $0x80 xchg %ecx,%ebx Thanks to Florian Weimer for analysing why the original code generated the bogus esp usage: _segdescr.desc happens to be at the top of the stack, so its address is in %esp. The asm statement says that %3 is an input, so its value will not change, and GCC can use %esp as the input register for the expression &_segdescr.desc. But the constraints do not fully describe the asm statement because the %3 register is actually modified, albeit only temporarily. [BZ #17319] * sysdeps/i386/nptl/tls.h (TLS_INIT_TP): Use INTERNAL_SYSCALL to call set_thread_area instead of hand written asm. (__NR_set_thread_area): Removed define. (TLS_FLAG_WRITABLE): Likewise. (__ASSUME_SET_THREAD_AREA): Remove check. (TLS_EBX_ARG): Remove define. (TLS_LOAD_EBX): Likewise.
2014-08-28Simplify atomicity of socket creation in bind.Samuel Thibault2-22/+25
2014-08-27NEWS: Typo fix: s/wil /will /gCarlos O'Donell1-1/+1
2014-08-27Update x86 ULPsAllan McRae2-4/+8
Using gcc-4.9, i7-2620M, i686 Linux.
2014-08-26Fix typo in CVE IDFlorian Weimer1-1/+1
2014-08-26__gconv_translit_find: Disable function [BZ #17187]Florian Weimer3-174/+19
This functionality has never worked correctly, and the implementation contained a security vulnerability (CVE-2014-5119).
2014-08-26Update Vietnamese translationAllan McRae2-525/+554
2014-08-26Update Ukrainian translationAllan McRae2-478/+507
2014-08-26Update French translationAllan McRae2-526/+500
2014-08-26Update Russian translationAllan McRae2-479/+508
2014-08-26Update Polish translationAllan McRae2-479/+496
2014-08-26Update Czech translationAllan McRae2-478/+507
2014-08-26Update German translationAllan McRae2-478/+495
2014-08-26Update Bulgarian translationAllan McRae2-488/+517
2014-08-26Update Sweedish translationAllan McRae2-499/+516
2014-08-26Update Dutch translationAllan McRae2-481/+510
2014-08-26Update Spanish translationAllan McRae2-478/+497
2014-08-21Remove NOT_IN_libc definition for pthread_atforkSiddhesh Poyarekar2-2/+2
pthread_atfork is already built in an extra-libs context, which gives it NOT_IN_libc in its CPPFLAGS. Adding the same definition to CFLAGS is pointless. Verified that the code is unchanged on x86_64.
2014-08-21Remove redundant CPPFLAGS for some programsSiddhesh Poyarekar4-6/+5
These programs get the NOT_IN_libc twice, once through the 'other' target and another explicitly. Remove the explicitly added CPFLAG. * catgets/Makefile (CPPFLAGS-gencat): Remove. * iconv/Makefile (CPPFLAGS-iconv_prog): Likewise. (CPPFLAGS-iconvconfig): Likewise. * timezone/Makefile (CPPFLAGS-zic): Likewise.