diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2019-02-04 08:55:52 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2019-02-04 10:27:37 -0800 |
commit | 04e767b59b16befce93c6086362acbc1fae63f4e (patch) | |
tree | 4a2834237cb3079e8ba7770a0b46747e3ca7cbba /sysdeps/x86_64/x32/Makefile | |
parent | dc968f557398565d416dab69224f722c1d2beb9b (diff) | |
download | glibc-04e767b59b16befce93c6086362acbc1fae63f4e.tar.gz glibc-04e767b59b16befce93c6086362acbc1fae63f4e.tar.xz glibc-04e767b59b16befce93c6086362acbc1fae63f4e.zip |
x86-64 memcmp: Use unsigned Jcc instructions on size [BZ #24155]
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. (cherry picked from commit 3f635fb43389b54f682fc9ed2acc0b2aaf4a923d)
Diffstat (limited to 'sysdeps/x86_64/x32/Makefile')
-rw-r--r-- | sysdeps/x86_64/x32/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/x86_64/x32/Makefile b/sysdeps/x86_64/x32/Makefile index 1557724b0c..8748956563 100644 --- a/sysdeps/x86_64/x32/Makefile +++ b/sysdeps/x86_64/x32/Makefile @@ -8,7 +8,8 @@ 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-strncmp tst-size_t-strncpy tst-size_t-strnlen \ + tst-size_t-memcmp-2 endif ifeq ($(subdir),wcsmbs) |