about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* S390: Do not use direct socket syscalls if build on kernels >= 4.3. [BZ #19682]Stefan Liebler2016-03-033-20/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beginning with Linux 4.3, the kernel headers contain direct system call numbers __NR_socket etc. on s390x. On older kernels, the socket-multiplexer syscall __NR_socketcall was used. To enable these new syscalls, the patch "S390: Call direct system calls for socket operations." (https://sourceware.org/git/?p=glibc.git;a=commit;h=016495b818cb61df7d0d10e6db54074271b3e3a5) was applied upstream. If glibc 2.23 is configured with --enable-kernel=4.3 and newer, the direct socket syscalls are used. For older kernels, the socket-multiplexer syscall is used instead. In glibc 2.22 and earlier, this patch is not applied. If you build glibc on a kernel < 4.3, the socket-multiplexer syscall is used. But if you build glibc on kernel >= 4.3, the direct socket-syscalls are used. If you install this glibc on a kernel < 4.3, all socket operations will fail. See "Bug 19682 - s390x: Incorrect syscall definitions cause breakage with Linux 4.3 headers" (https://sourceware.org/bugzilla/show_bug.cgi?id=19682) The configure switch --enable-kernel does not influence this behaviour on older glibc-releases. The solution is to remove the direct socket-syscalls in sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list (this patch) on older glibc-releases as it was done by the upstream patch, too. These entries were never used on s390x, but the c-files in sysdeps/unix/sysv/linux/. After this removal, the behaviour of the socket functions are not changed compared to the original glibc release version and the socket-multiplexer-syscall is always used.
* CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).Carlos O'Donell2016-02-255-63/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | * A stack-based buffer overflow was found in libresolv when invoked from libnss_dns, allowing specially crafted DNS responses to seize control of execution flow in the DNS client. The buffer overflow occurs in the functions send_dg (send datagram) and send_vc (send TCP) for the NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC family. The use of AF_UNSPEC triggers the low-level resolver code to send out two parallel queries for A and AAAA. A mismanagement of the buffers used for those queries could result in the response of a query writing beyond the alloca allocated buffer created by _nss_dns_gethostbyname4_r. Buffer management is simplified to remove the overflow. Thanks to the Google Security Team and Red Hat for reporting the security impact of this issue, and Robert Holiday of Ciena for reporting the related bug 18665. (CVE-2015-7547) See also: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html (cherry picked from commit 16d0a0ce7613552301786bf05d7eba8784b5732c) Conflicts: NEWS resolv/res_send.c
* Fix read past end of pattern in fnmatch (bug 18032)Andreas Schwab2016-02-254-7/+15
| | | | | | | (cherry picked from commit 4a28f4d55a6cc33474c0792fe93b5942d81bf185) Conflicts: NEWS
* Fix BZ #17269 -- _IO_wstr_overflow integer overflowPaul Pluzhnikov2016-02-253-3/+15
| | | | | | | (cherry picked from commit bdf1ff052a8e23d637f2c838fa5642d78fcedc33) Conflicts: NEWS
* Harden tls_dtor_list with pointer mangling [BZ #19018]Florian Weimer2016-02-253-3/+18
| | | | | | | | (cherry picked from commit f586e1328681b400078c995a0bb6ad301ef73549) Conflicts: NEWS stdlib/cxa_thread_atexit_impl.c
* Always enable pointer guard [BZ #18928]Florian Weimer2016-02-254-15/+18
| | | | | | | | | | | | | | | | | | | Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode has security implications. This commit enables pointer guard unconditionally, and the environment variable is now ignored. [BZ #18928] * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove _dl_pointer_guard member. * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard initializer. (security_init): Always set up pointer guard. (process_envvars): Do not process LD_POINTER_GUARD. (cherry picked from commit a014cecd82b71b70a6a843e250e06b541ad524f7) Conflicts: NEWS
* sparc: fix sigaction for 32bit builds [BZ #18694]Mike Frysinger2015-07-203-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)
* CVE-2015-1472: wscanf allocates too little memoryPaul Pluzhnikov2015-02-164-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
* Use AVX unaligned memcpy only if AVX2 is availableH.J. Lu2015-02-1610-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
* Fix memory handling in strxfrm_l [BZ #16009]Leonhard Holz2015-02-165-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
* Move findidx nested functions to top-level.Roland McGrath2015-02-1610-34/+91
| | | | | | | | | Needed in order to backport strxfrm_l security fix cleanly. (cherry picked from commit 8c0ab919f63dc03a420751172602a52d2bea59a8) Conflicts: ChangeLog
* Avoid infinite loop in nss_dns getnetbyname [BZ #17630]Florian Weimer2014-12-183-4/+14
| | | | | | | | (cherry picked from commit 11e3417af6e354f1942c68a271ae51e892b2814d) (cherry picked from commit e54db0ea6a49affac43fa305fd134f3020c41382) Conflicts: NEWS
* CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]Jeff Law2014-12-167-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
* Make __extern_always_inline usable on clang++ againSiddhesh Poyarekar2014-11-242-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)
* CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.Carlos O'Donell2014-11-194-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)
* [AArch64] End frame record chain correctly.Renlin Li2014-11-113-2/+6
|
* MIPS: Avoid a dangling `vfork@GLIBC_2.0' referenceMaciej W. Rozycki2014-10-223-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
* BZ#17460: Fix buffer overrun in nscd --help.Roland McGrath2014-10-094-25/+33
| | | | | | | (cherry picked from commit c763c5d27112be055920c46f3be8d05bc8b669da) Conflicts: NEWS
* Update French translationAllan McRae2014-10-092-2/+6
| | | | (cherry picked from commit b6dcfe8c2408958be246dd61f1c5415ed7667a2a)
* Fix memory leak in error path of do_ftell_wide (BZ #17370)Siddhesh Poyarekar2014-09-162-1/+9
| | | | (cherry picked from commit 545583d664b64ff234b99aca0d85e99c8a55808f)
* Fix memory leak in libio/wfileops.c do_ftell_wide [BZ #17370]Tim Lammens2014-09-163-1/+7
| | | | | | | (cherry picked from commit 984c0ea97f649c869130a1ff099098e2b6f70aad) Conflicts: NEWS
* Revert to defining __extern_inline only for gcc-4.3+ (BZ #17266)Siddhesh Poyarekar2014-09-165-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.
* Handle zero prefix length in getifaddrs (BZ #17371)Andreas Schwab2014-09-163-7/+16
| | | | | | | (cherry picked from commit a7b872687073decdcc7effc2289877d69058aca9) Conflicts: NEWS
* Add new Linux 3.16 constants to netinet/udp.h.Joseph Myers2014-09-132-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)
* Update Russian translationAllan McRae2014-09-132-5/+9
| | | | (cherry picked from commit d8f879ee3e4131542c2ac3d1d9db4cf12cb86729)
* Update version.h and include/features.h for 2.20 release glibc-2.20Allan McRae2014-09-073-3/+7
|
* Update contrib.texiAllan McRae2014-09-072-0/+9
| | | | Add entries for Wilco Dijkstra and Stefan Liebler.
* Update Korean translationAllan McRae2014-09-072-827/+889
|
* [BZ #17354] tile: Fix up corner cases with signed relocationsChris Metcalf2014-09-063-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.
* CVE-2014-6040: Crashes on invalid input in IBM gconv modules [BZ #17325]Florian Weimer2014-09-0311-10/+54
| | | | | These changes are based on the fix for BZ #14134 in commit 6e230d11837f3ae7b375ea69d7905f0d18eb79e5.
* Define __GI_fegetenv for e500 libmKhem Raj2014-09-022-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.
* Update Esperanto translationAllan McRae2014-09-012-530/+548
|
* Update Catalan translationAllan McRae2014-09-012-478/+498
|
* Fix hang on forkSamuel Thibault2014-08-282-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>
* i386 TLS_INIT_TP might produce bogus asm changing stack pointer [BZ #17319]Mark Wielaard2014-08-283-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.
* Simplify atomicity of socket creation in bind.Samuel Thibault2014-08-282-22/+25
|
* NEWS: Typo fix: s/wil /will /gCarlos O'Donell2014-08-271-1/+1
|
* Update x86 ULPsAllan McRae2014-08-272-4/+8
| | | | Using gcc-4.9, i7-2620M, i686 Linux.
* Fix typo in CVE IDFlorian Weimer2014-08-261-1/+1
|
* __gconv_translit_find: Disable function [BZ #17187]Florian Weimer2014-08-263-174/+19
| | | | | This functionality has never worked correctly, and the implementation contained a security vulnerability (CVE-2014-5119).
* Update Vietnamese translationAllan McRae2014-08-262-525/+554
|
* Update Ukrainian translationAllan McRae2014-08-262-478/+507
|
* Update French translationAllan McRae2014-08-262-526/+500
|
* Update Russian translationAllan McRae2014-08-262-479/+508
|
* Update Polish translationAllan McRae2014-08-262-479/+496
|
* Update Czech translationAllan McRae2014-08-262-478/+507
|
* Update German translationAllan McRae2014-08-262-478/+495
|
* Update Bulgarian translationAllan McRae2014-08-262-488/+517
|
* Update Sweedish translationAllan McRae2014-08-262-499/+516
|
* Update Dutch translationAllan McRae2014-08-262-481/+510
|