glibc/sysdeps
H.J. Lu b304fc201d x86-64 memcmp/wmemcmp: Properly handle the length parameter [BZ# 24097]
On x32, the size_t parameter may be passed in the lower 32 bits of a
64-bit register with the non-zero upper 32 bits.  The string/memory
functions written in assembly can only use the lower 32 bits of a
64-bit register as length or must clear the upper 32 bits before using
the full 64-bit register for length.

This pach fixes memcmp/wmemcmp for x32.  Tested on x86-64 and x32.  On
x86-64, libc.so is the same with and withou the fix.

	[BZ# 24097]
	CVE-2019-6488
	* sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S: Use RDX_LP for
	length.  Clear the upper 32 bits of RDX register.
	* sysdeps/x86_64/multiarch/memcmp-sse4.S: Likewise.
	* sysdeps/x86_64/multiarch/memcmp-ssse3.S: Likewise.
	* sysdeps/x86_64/x32/Makefile (tests): Add tst-size_t-memcmp and
	tst-size_t-wmemcmp.
	* sysdeps/x86_64/x32/tst-size_t-memcmp.c: New file.
	* sysdeps/x86_64/x32/tst-size_t-wmemcmp.c: Likewise.
2019-01-21 11:26:07 -08:00
..
aarch64 [AArch64] Add ifunc support for Ares 2019-01-09 10:35:34 +00:00
alpha soft-fp: Properly check _FP_W_TYPE_SIZE [BZ #24066] 2019-01-07 09:04:39 -08:00
arm Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
csky Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
generic nptl: Remove tst-cancel-wrappers test and related macros 2019-01-03 18:38:08 -02:00
gnu Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
hppa Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
htl hurd: advertise *_setpshared as not supported 2019-01-02 22:21:34 +01:00
hurd Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
i386 i386: Remove bogus THREAD_ATOMIC_* macros 2019-01-03 18:38:15 -02:00
ia64 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
ieee754 Fix a few typos in comments 2019-01-12 13:44:51 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
m68k Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mach nptl: Remove tst-cancel-wrappers test and related macros 2019-01-03 18:38:08 -02:00
microblaze Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
mips Update MIPS libm-test-ulps. 2019-01-02 17:25:33 +00:00
nios2 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
nptl nptl: Cleanup cancellation macros 2019-01-03 18:38:16 -02:00
posix nptl: Cleanup cancellation macros 2019-01-03 18:38:16 -02:00
powerpc powerpc: Fix tiny bug in strncmp.c 2019-01-16 12:18:58 -02:00
pthread Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
riscv RISC-V: Update LP64D libm-test-ulps. 2019-01-09 13:48:26 -08:00
s390 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sh Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
sparc soft-fp: Properly check _FP_W_TYPE_SIZE [BZ #24066] 2019-01-07 09:04:39 -08:00
unix Fix a few typos in comments 2019-01-12 13:44:51 +00:00
wordsize-32 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
wordsize-64 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86 Update copyright dates with scripts/update-copyrights. 2019-01-01 00:11:28 +00:00
x86_64 x86-64 memcmp/wmemcmp: Properly handle the length parameter [BZ# 24097] 2019-01-21 11:26:07 -08:00