* [PATCH 0/1 v2] openssh: two fixes @ 2013-06-13 3:11 rongqing.li 2013-06-13 3:11 ` [PATCH] " rongqing.li 0 siblings, 1 reply; 3+ messages in thread From: rongqing.li @ 2013-06-13 3:11 UTC (permalink / raw) To: openembedded-core From: "Roy.Li" <rongqing.li@windriver.com> The following changes since commit 74158c2e99c6d8631800ae80025d1cc9f19336d2: tune-cortexa*.inc: fix tunings for cortex a5, a7, a8, a9, a15 machines. (2013-06-12 17:54:28 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib roy/openssh-1 http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=roy/openssh-1 Roy.Li (1): openssh: two fixes .../openssh/openssh-6.2p2/mac.patch | 76 ++++++++++++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 4 ++ 2 files changed, 80 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch -- 1.7.10.4 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] openssh: two fixes 2013-06-13 3:11 [PATCH 0/1 v2] openssh: two fixes rongqing.li @ 2013-06-13 3:11 ` rongqing.li 2013-06-13 17:44 ` Saul Wold 0 siblings, 1 reply; 3+ messages in thread From: rongqing.li @ 2013-06-13 3:11 UTC (permalink / raw) To: openembedded-core From: "Roy.Li" <rongqing.li@windriver.com> Backport patch to fix segment fault due to unaligned memory access Enable tcp-wrappers by default Signed-off-by: Roy.Li <rongqing.li@windriver.com> --- .../openssh/openssh-6.2p2/mac.patch | 76 ++++++++++++++++++++ meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 4 ++ 2 files changed, 80 insertions(+) create mode 100644 meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch b/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch new file mode 100644 index 0000000..69fb69d --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch @@ -0,0 +1,76 @@ +[PATCH] force the MAC output to be 64-bit aligned + +Upstream-Status: Backport[anoncvs.mindrot.org/index.cgi/openssh/mac.c?r1=1.27&r2=1.28] + +Backport patch to fix segment fault due to unaligned memory access + +Wed Jun 5 22:12:37 2013 UTC (7 days, 3 hours ago) by dtucker +Branch: MAIN +CVS Tags: HEAD +Changes since 1.27: +11 -8 lines +Diff to previous 1.27 + + - dtucker@cvs.openbsd.org 2013/06/03 00:03:18 + [mac.c] + force the MAC output to be 64-bit aligned so umac won't see +unaligned + accesses on strict-alignment architectures. bz#2101, patch from + tomas.kuthan at oracle.com, ok djm@ +--- + mac.c | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +diff --git a/mac.c b/mac.c +index 3f2dc6f..a5a80d3 100644 +--- a/mac.c ++++ b/mac.c +@@ -152,12 +152,16 @@ mac_init(Mac *mac) + u_char * + mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) + { +- static u_char m[EVP_MAX_MD_SIZE]; ++ static union { ++ u_char m[EVP_MAX_MD_SIZE]; ++ u_int64_t for_align; ++ } u; ++ + u_char b[4], nonce[8]; + +- if (mac->mac_len > sizeof(m)) ++ if (mac->mac_len > sizeof(u)) + fatal("mac_compute: mac too long %u %lu", +- mac->mac_len, (u_long)sizeof(m)); ++ mac->mac_len, (u_long)sizeof(u)); + + switch (mac->type) { + case SSH_EVP: +@@ -166,22 +170,22 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) + HMAC_Init(&mac->evp_ctx, NULL, 0, NULL); + HMAC_Update(&mac->evp_ctx, b, sizeof(b)); + HMAC_Update(&mac->evp_ctx, data, datalen); +- HMAC_Final(&mac->evp_ctx, m, NULL); ++ HMAC_Final(&mac->evp_ctx, u.m, NULL); + break; + case SSH_UMAC: + put_u64(nonce, seqno); + umac_update(mac->umac_ctx, data, datalen); +- umac_final(mac->umac_ctx, m, nonce); ++ umac_final(mac->umac_ctx, u.m, nonce); + break; + case SSH_UMAC128: + put_u64(nonce, seqno); + umac128_update(mac->umac_ctx, data, datalen); +- umac128_final(mac->umac_ctx, m, nonce); ++ umac128_final(mac->umac_ctx, u.m, nonce); + break; + default: + fatal("mac_compute: unknown MAC type"); + } +- return (m); ++ return (u.m); + } + + void +-- +1.7.9.5 + diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb index 06297da..3ae4c27 100644 --- a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb +++ b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb @@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. file://ssh_config \ file://init \ file://openssh-CVE-2011-4327.patch \ + file://mac.patch \ ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" PAM_SRC_URI = "file://sshd" @@ -46,6 +47,9 @@ inherit autotools CFLAGS += "-D__FILE_OFFSET_BITS=64" export LD = "${CC}" +PACKAGECONFIG ??= "tcp-wrappers" +PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers" + EXTRA_OECONF = "--with-rand-helper=no \ ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ --without-zlib-version-check \ -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] openssh: two fixes 2013-06-13 3:11 ` [PATCH] " rongqing.li @ 2013-06-13 17:44 ` Saul Wold 0 siblings, 0 replies; 3+ messages in thread From: Saul Wold @ 2013-06-13 17:44 UTC (permalink / raw) To: rongqing.li; +Cc: openembedded-core On 06/12/2013 08:11 PM, rongqing.li@windriver.com wrote: > From: "Roy.Li" <rongqing.li@windriver.com> > > Backport patch to fix segment fault due to unaligned memory access > Enable tcp-wrappers by default > This should really be in 2 independent patches. Sau! > Signed-off-by: Roy.Li <rongqing.li@windriver.com> > --- > .../openssh/openssh-6.2p2/mac.patch | 76 ++++++++++++++++++++ > meta/recipes-connectivity/openssh/openssh_6.2p2.bb | 4 ++ > 2 files changed, 80 insertions(+) > create mode 100644 meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch > > diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch b/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch > new file mode 100644 > index 0000000..69fb69d > --- /dev/null > +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/mac.patch > @@ -0,0 +1,76 @@ > +[PATCH] force the MAC output to be 64-bit aligned > + > +Upstream-Status: Backport[anoncvs.mindrot.org/index.cgi/openssh/mac.c?r1=1.27&r2=1.28] > + > +Backport patch to fix segment fault due to unaligned memory access > + > +Wed Jun 5 22:12:37 2013 UTC (7 days, 3 hours ago) by dtucker > +Branch: MAIN > +CVS Tags: HEAD > +Changes since 1.27: +11 -8 lines > +Diff to previous 1.27 > + > + - dtucker@cvs.openbsd.org 2013/06/03 00:03:18 > + [mac.c] > + force the MAC output to be 64-bit aligned so umac won't see > +unaligned > + accesses on strict-alignment architectures. bz#2101, patch from > + tomas.kuthan at oracle.com, ok djm@ > +--- > + mac.c | 18 +++++++++++------- > + 1 file changed, 11 insertions(+), 7 deletions(-) > + > +diff --git a/mac.c b/mac.c > +index 3f2dc6f..a5a80d3 100644 > +--- a/mac.c > ++++ b/mac.c > +@@ -152,12 +152,16 @@ mac_init(Mac *mac) > + u_char * > + mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) > + { > +- static u_char m[EVP_MAX_MD_SIZE]; > ++ static union { > ++ u_char m[EVP_MAX_MD_SIZE]; > ++ u_int64_t for_align; > ++ } u; > ++ > + u_char b[4], nonce[8]; > + > +- if (mac->mac_len > sizeof(m)) > ++ if (mac->mac_len > sizeof(u)) > + fatal("mac_compute: mac too long %u %lu", > +- mac->mac_len, (u_long)sizeof(m)); > ++ mac->mac_len, (u_long)sizeof(u)); > + > + switch (mac->type) { > + case SSH_EVP: > +@@ -166,22 +170,22 @@ mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen) > + HMAC_Init(&mac->evp_ctx, NULL, 0, NULL); > + HMAC_Update(&mac->evp_ctx, b, sizeof(b)); > + HMAC_Update(&mac->evp_ctx, data, datalen); > +- HMAC_Final(&mac->evp_ctx, m, NULL); > ++ HMAC_Final(&mac->evp_ctx, u.m, NULL); > + break; > + case SSH_UMAC: > + put_u64(nonce, seqno); > + umac_update(mac->umac_ctx, data, datalen); > +- umac_final(mac->umac_ctx, m, nonce); > ++ umac_final(mac->umac_ctx, u.m, nonce); > + break; > + case SSH_UMAC128: > + put_u64(nonce, seqno); > + umac128_update(mac->umac_ctx, data, datalen); > +- umac128_final(mac->umac_ctx, m, nonce); > ++ umac128_final(mac->umac_ctx, u.m, nonce); > + break; > + default: > + fatal("mac_compute: unknown MAC type"); > + } > +- return (m); > ++ return (u.m); > + } > + > + void > +-- > +1.7.9.5 > + > diff --git a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > index 06297da..3ae4c27 100644 > --- a/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > +++ b/meta/recipes-connectivity/openssh/openssh_6.2p2.bb > @@ -25,6 +25,7 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. > file://ssh_config \ > file://init \ > file://openssh-CVE-2011-4327.patch \ > + file://mac.patch \ > ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" > > PAM_SRC_URI = "file://sshd" > @@ -46,6 +47,9 @@ inherit autotools > CFLAGS += "-D__FILE_OFFSET_BITS=64" > export LD = "${CC}" > > +PACKAGECONFIG ??= "tcp-wrappers" > +PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,,tcp-wrappers" > + > EXTRA_OECONF = "--with-rand-helper=no \ > ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ > --without-zlib-version-check \ > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-13 17:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-06-13 3:11 [PATCH 0/1 v2] openssh: two fixes rongqing.li 2013-06-13 3:11 ` [PATCH] " rongqing.li 2013-06-13 17:44 ` Saul Wold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox