mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 16:50:07 +00:00
3f635fb433
Since the size argument is unsigned. we should use unsigned Jcc instructions, instead of signed, to check size. Tested on x86-64 and x32, with and without --disable-multi-arch. [BZ #24155] CVE-2019-7309 * NEWS: Updated for CVE-2019-7309. * sysdeps/x86_64/memcmp.S: Use RDX_LP for size. Clear the upper 32 bits of RDX register for x32. Use unsigned Jcc instructions, instead of signed. * sysdeps/x86_64/x32/Makefile (tests): Add tst-size_t-memcmp-2. * sysdeps/x86_64/x32/tst-size_t-memcmp-2.c: New test.
19 lines
655 B
Makefile
19 lines
655 B
Makefile
ifeq ($(subdir),math)
|
|
# Since x32 returns 32-bit long int and 64-bit long long int in the
|
|
# same 64-bit register, we make the 32b-bit lround an alias of the
|
|
# 64-bit llround. Add -fno-builtin-lround to silence the compiler.
|
|
CFLAGS-s_llround.c += -fno-builtin-lround
|
|
endif
|
|
|
|
ifeq ($(subdir),string)
|
|
tests += tst-size_t-memchr tst-size_t-memcmp tst-size_t-memcpy \
|
|
tst-size_t-memrchr tst-size_t-memset tst-size_t-strncasecmp \
|
|
tst-size_t-strncmp tst-size_t-strncpy tst-size_t-strnlen \
|
|
tst-size_t-memcmp-2
|
|
endif
|
|
|
|
ifeq ($(subdir),wcsmbs)
|
|
tests += tst-size_t-wmemchr tst-size_t-wmemcmp tst-size_t-wmemset \
|
|
tst-size_t-wcsncmp tst-size_t-wcsnlen
|
|
endif
|