glibc:hjl/release/2.20/master

Last commit made on 2015-01-30
Get this branch:
git clone -b hjl/release/2.20/master https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
hjl/release/2.20/master
Repository:
lp:glibc

Recent commits

328fc20... by "H.J. Lu" <email address hidden>

Use AVX unaligned memcpy only if AVX2 is available

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 56d25c11b64a97255a115901d136d753c86de24e]

f80af76... by Florian Weimer

Avoid infinite loop in nss_dns getnetbyname [BZ #17630]

(cherry picked from commit 11e3417af6e354f1942c68a271ae51e892b2814d)
(cherry picked from commit e54db0ea6a49affac43fa305fd134f3020c41382)

Conflicts:
 NEWS

a3a1f41... by Jeff Law <email address hidden>

CVE-2012-3406: Stack overflow in vfprintf [BZ #16617]

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

d73ac1b... by Siddhesh Poyarekar <email address hidden>

Make __extern_always_inline usable on clang++ again

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)

33ceaf6... by Carlos-0

CVE-2014-7817: wordexp fails to honour WRDE_NOCMD.

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)

e426434... by Renlin Li <email address hidden>

[AArch64] End frame record chain correctly.

c14e752... by "Maciej W. Rozycki" <email address hidden>

MIPS: Avoid a dangling `vfork@GLIBC_2.0' reference

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

1b198b7... by Roland McGrath <email address hidden>

BZ#17460: Fix buffer overrun in nscd --help.

(cherry picked from commit c763c5d27112be055920c46f3be8d05bc8b669da)

Conflicts:
 NEWS

2930c79... by Allan McRae

Update French translation

(cherry picked from commit b6dcfe8c2408958be246dd61f1c5415ed7667a2a)

4adf299... by Siddhesh Poyarekar <email address hidden>

Fix memory leak in error path of do_ftell_wide (BZ #17370)

(cherry picked from commit 545583d664b64ff234b99aca0d85e99c8a55808f)