* [PATCH][pyro] libgcrypt: fix CVE-2017-9526 @ 2017-07-13 17:48 Ross Burton 2017-07-13 18:38 ` ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) Patchwork 0 siblings, 1 reply; 4+ messages in thread From: Ross Burton @ 2017-07-13 17:48 UTC (permalink / raw) To: openembedded-core In libgcrypt before 1.7.7, an attacker who learns the EdDSA session key (from side-channel observation during the signing process) can easily recover the long-term secret key. 1.7.7 makes a cipher/ecc-eddsa.c change to store this session key in secure memory, to ensure that constant-time point operations are used in the MPI library. Signed-off-by: Ross Burton <ross.burton@intel.com> --- ...-Store-EdDSA-session-key-in-secure-memory.patch | 39 ++++++++++++++++++++++ meta/recipes-support/libgcrypt/libgcrypt.inc | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta/recipes-support/libgcrypt/files/0001-ecc-Store-EdDSA-session-key-in-secure-memory.patch diff --git a/meta/recipes-support/libgcrypt/files/0001-ecc-Store-EdDSA-session-key-in-secure-memory.patch b/meta/recipes-support/libgcrypt/files/0001-ecc-Store-EdDSA-session-key-in-secure-memory.patch new file mode 100644 index 00000000000..0a4dfe67737 --- /dev/null +++ b/meta/recipes-support/libgcrypt/files/0001-ecc-Store-EdDSA-session-key-in-secure-memory.patch @@ -0,0 +1,39 @@ +CVE: CVE-2017-9526 +Upstream-Status: Backport +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 4a1768d683f6572ad86d833508c70e6b3dc1efdc Mon Sep 17 00:00:00 2001 +From: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be> +Date: Thu, 19 Jan 2017 17:00:15 +0100 +Subject: [PATCH] ecc: Store EdDSA session key in secure memory. + +* cipher/ecc-eddsa.c (_gcry_ecc_eddsa_sign): use mpi_snew to allocate +session key. +-- + +An attacker who learns the EdDSA session key from side-channel +observation during the signing process, can easily revover the long- +term secret key. Storing the session key in secure memory ensures that +constant time point operations are used in the MPI library. + +Signed-off-by: Jo Van Bulck <jo.vanbulck@cs.kuleuven.be> +--- + cipher/ecc-eddsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cipher/ecc-eddsa.c b/cipher/ecc-eddsa.c +index f91f8489..813e030d 100644 +--- a/cipher/ecc-eddsa.c ++++ b/cipher/ecc-eddsa.c +@@ -603,7 +603,7 @@ _gcry_ecc_eddsa_sign (gcry_mpi_t input, ECC_secret_key *skey, + a = mpi_snew (0); + x = mpi_new (0); + y = mpi_new (0); +- r = mpi_new (0); ++ r = mpi_snew (0); + ctx = _gcry_mpi_ec_p_internal_new (skey->E.model, skey->E.dialect, 0, + skey->E.p, skey->E.a, skey->E.b); + b = (ctx->nbits+7)/8; +-- +2.11.0 + diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc index 84c1cc018b3..e95c059c875 100644 --- a/meta/recipes-support/libgcrypt/libgcrypt.inc +++ b/meta/recipes-support/libgcrypt/libgcrypt.inc @@ -20,6 +20,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \ file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \ file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \ file://fix-undefined-reference-to-pthread.patch \ + file://0001-ecc-Store-EdDSA-session-key-in-secure-memory.patch \ " BINCONFIG = "${bindir}/libgcrypt-config" -- 2.11.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) 2017-07-13 17:48 [PATCH][pyro] libgcrypt: fix CVE-2017-9526 Ross Burton @ 2017-07-13 18:38 ` Patchwork 2017-07-14 7:57 ` Jussi Kukkonen 0 siblings, 1 reply; 4+ messages in thread From: Patchwork @ 2017-07-13 18:38 UTC (permalink / raw) To: Ross Burton; +Cc: openembedded-core == Series Details == Series: libgcrypt: fix CVE-2017-9526 (rev2) Revision: 2 URL : https://patchwork.openembedded.org/series/7732/ State : failure == Summary == Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures: * Patch [pyro] libgcrypt: fix CVE-2017-9526 Issue Missing or incorrectly formatted CVE tag in commit message [test_cve_presence_in_commit_message] Suggested fix Include a "CVE-xxxx-xxxx" tag in the commit message If you believe any of these test results are incorrect, please reply to the mailing list (openembedded-core@lists.openembedded.org) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...). --- Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) 2017-07-13 18:38 ` ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) Patchwork @ 2017-07-14 7:57 ` Jussi Kukkonen 2017-07-14 13:12 ` Jose Lamego 0 siblings, 1 reply; 4+ messages in thread From: Jussi Kukkonen @ 2017-07-14 7:57 UTC (permalink / raw) To: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 1749 bytes --] On 13 July 2017 at 21:38, Patchwork <patchwork@patchwork.openembedded.org> wrote: > == Series Details == > > Series: libgcrypt: fix CVE-2017-9526 (rev2) > Revision: 2 > Not sure if this should be a patchwork bug or not? This patch is showing up as a revision 2 of the other patch when in reality they are patches for two separate branches. - Jussi > URL : https://patchwork.openembedded.org/series/7732/ > State : failure > > == Summary == > > > Thank you for submitting this patch series to OpenEmbedded Core. This is > an automated response. Several tests have been executed on the proposed > series by patchtest resulting in the following failures: > > > > * Patch [pyro] libgcrypt: fix CVE-2017-9526 > Issue Missing or incorrectly formatted CVE tag in commit > message [test_cve_presence_in_commit_message] > Suggested fix Include a "CVE-xxxx-xxxx" tag in the commit message > > > > If you believe any of these test results are incorrect, please reply to the > mailing list (openembedded-core@lists.openembedded.org) raising your > concerns. > Otherwise we would appreciate you correcting the issues and submitting a > new > version of the patchset if applicable. Please ensure you add/increment the > version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> > [PATCH v3] -> ...). > > --- > Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest > Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > [-- Attachment #2: Type: text/html, Size: 2983 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) 2017-07-14 7:57 ` Jussi Kukkonen @ 2017-07-14 13:12 ` Jose Lamego 0 siblings, 0 replies; 4+ messages in thread From: Jose Lamego @ 2017-07-14 13:12 UTC (permalink / raw) To: Jussi Kukkonen, Patches and discussions about the oe-core layer On 07/14/2017 02:57 AM, Jussi Kukkonen wrote: > On 13 July 2017 at 21:38, Patchwork > <patchwork@patchwork.openembedded.org > <mailto:patchwork@patchwork.openembedded.org>> wrote: > > == Series Details == > > Series: libgcrypt: fix CVE-2017-9526 (rev2) > Revision: 2 > > > Not sure if this should be a patchwork bug or not? This patch is > showing up as a revision 2 of the other patch when in reality they are > patches for two separate branches. > > - Jussi There is a request to handle older release patch submissions in Patchwork (bug 10716) planned to be completed in 2.5, however, I may be able to implement the change in the following days. Jose > > > > URL : https://patchwork.openembedded.org/series/7732/ > <https://patchwork.openembedded.org/series/7732/> > State : failure > > == Summary == > > > Thank you for submitting this patch series to OpenEmbedded Core. > This is > an automated response. Several tests have been executed on the > proposed > series by patchtest resulting in the following failures: > > > > * Patch [pyro] libgcrypt: fix CVE-2017-9526 > Issue Missing or incorrectly formatted CVE tag in > commit message [test_cve_presence_in_commit_message] > Suggested fix Include a "CVE-xxxx-xxxx" tag in the commit message > > > > If you believe any of these test results are incorrect, please > reply to the > mailing list (openembedded-core@lists.openembedded.org > <mailto:openembedded-core@lists.openembedded.org>) raising your > concerns. > Otherwise we would appreciate you correcting the issues and > submitting a new > version of the patchset if applicable. Please ensure you > add/increment the > version number when sending the new version (i.e. [PATCH] -> > [PATCH v2] -> > [PATCH v3] -> ...). > > --- > Test framework: > http://git.yoctoproject.org/cgit/cgit.cgi/patchtest > <http://git.yoctoproject.org/cgit/cgit.cgi/patchtest> > Test suite: > http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe > <http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe> > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > <mailto:Openembedded-core@lists.openembedded.org> > http://lists.openembedded.org/mailman/listinfo/openembedded-core > <http://lists.openembedded.org/mailman/listinfo/openembedded-core> > > > > -- Jose Lamego | OTC Embedded Platform & Tools | GDC ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-14 13:12 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-07-13 17:48 [PATCH][pyro] libgcrypt: fix CVE-2017-9526 Ross Burton 2017-07-13 18:38 ` ✗ patchtest: failure for libgcrypt: fix CVE-2017-9526 (rev2) Patchwork 2017-07-14 7:57 ` Jussi Kukkonen 2017-07-14 13:12 ` Jose Lamego
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox