diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-04-06 17:33:24 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-04-06 17:35:39 +0200 |
commit | ea1e478c85f6b991aa9031c8ebea5dc5d725200b (patch) | |
tree | f5c54ce33e8fb4ff8a650fa495748a5baec4ea22 /recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch | |
parent | 708ca9c597269eff78941558228fa596378548b7 (diff) |
openssh: update 6.7p1 -> 7.4p1V2.5-next
This is basically a back port of the following commits from the
openembedded-core master branch:
openssh: upgrade to 7.4p1
openssh: fix CVE-2016-8858
openssh: fix potential signed overflow to enable compilation with -ftrapv
openssh: Upgrade 7.2p2 -> 7.3p1
openssh: add ed25519 host key location to read-only sshd config
openssh: conditional compile DES code.
openssh: fix init script restart with read-only-rootfs
openssh: update homepage and summary
openssh: Backport fix for CVE-2015-8325
openssh: Upgrade 7.1p2 -> 7.2p2
openssh: change URI to http:
openssh: Security Fix CVE-2016-3115
openssh: Properly skip ptrace test if tools are missing
openssh: Fix regex that sets sftp-server path for tests
openssh: CVE-2016-1907
openssh: update to 7.1p2
openssh: redesign ssh-agent.sh regression test case
openssh: enable X11Forwarding if distro feature x11 is set
openssh: fix file permission for /etc/pam.d/sshd
openssh: fix sshd key generation when systemd is in use and rootfs is readonly
openssh: Upgrade 7.0p1 -> 7.1p1
openssh: build regression test binaries
openssh: Upgrade 6.9p1 -> 7.0p1
openssh: Upgrade 6.8p1 -> 6.9p1
openssh: fix login fails for ssh -o Batchmode=yes with empty passwords
openssh: Upgrade 6.7 - > 6.8
Revert "openssh: CVE-2015-6563 CVE-2015-6564 CVE-2015-6565"
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch')
-rw-r--r-- | recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch new file mode 100644 index 0000000..df64a14 --- /dev/null +++ b/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch @@ -0,0 +1,99 @@ +From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001 +From: Yuanjie Huang <yuanjie.huang@windriver.com> +Date: Wed, 24 Aug 2016 03:15:43 +0000 +Subject: [PATCH] Fix potential signed overflow in pointer arithmatic + +Pointer arithmatic results in implementation defined signed integer +type, so that 's - src' in strlcpy and others may trigger signed overflow. +In case of compilation by gcc or clang with -ftrapv option, the overflow +would lead to program abort. + +Upstream-status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608] + +Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> +--- + openbsd-compat/strlcat.c | 8 ++++++-- + openbsd-compat/strlcpy.c | 8 ++++++-- + openbsd-compat/strnlen.c | 8 ++++++-- + 3 files changed, 18 insertions(+), 6 deletions(-) + +diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c +index bcc1b61..e758ebf 100644 +--- a/openbsd-compat/strlcat.c ++++ b/openbsd-compat/strlcat.c +@@ -23,6 +23,7 @@ + + #include <sys/types.h> + #include <string.h> ++#include <stdint.h> + + /* + * Appends src to string dst of size siz (unlike strncat, siz is the +@@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz) + s++; + } + *d = '\0'; +- +- return(dlen + (s - src)); /* count does not include NUL */ ++ /* ++ * Cast pointers to unsigned type before calculation, to avoid signed ++ * overflow when the string ends where the MSB has changed. ++ */ ++ return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */ + } + + #endif /* !HAVE_STRLCAT */ +diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c +index b4b1b60..b06f374 100644 +--- a/openbsd-compat/strlcpy.c ++++ b/openbsd-compat/strlcpy.c +@@ -23,6 +23,7 @@ + + #include <sys/types.h> + #include <string.h> ++#include <stdint.h> + + /* + * Copy src to string dst of size siz. At most siz-1 characters +@@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz) + while (*s++) + ; + } +- +- return(s - src - 1); /* count does not include NUL */ ++ /* ++ * Cast pointers to unsigned type before calculation, to avoid signed ++ * overflow when the string ends where the MSB has changed. ++ */ ++ return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */ + } + + #endif /* !HAVE_STRLCPY */ +diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c +index 93d5155..9b8de5d 100644 +--- a/openbsd-compat/strnlen.c ++++ b/openbsd-compat/strnlen.c +@@ -23,6 +23,7 @@ + #include <sys/types.h> + + #include <string.h> ++#include <stdint.h> + + size_t + strnlen(const char *str, size_t maxlen) +@@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen) + + for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--) + ; +- +- return (size_t)(cp - str); ++ /* ++ * Cast pointers to unsigned type before calculation, to avoid signed ++ * overflow when the string ends where the MSB has changed. ++ */ ++ return (size_t)((uintptr_t)cp - (uintptr_t)str); + } + #endif +-- +1.9.1 + |