Skip to contentSkip to conversation

nettle: The variable named p in the patch file was incorrectly named.

PATCH Superseded ngutzmann 2 participants 3 messages Mar 8, 2016 – Mar 9, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

ngutzmann

author
#0 lore raw

PATCH 1/1 nettle: The variable named p in the patch file was incorrectly named.

The variable in question should have been called ecc->p. The patch has been updated so that the compilation of the nettle recipe would complete successfully.

---
 meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch +1 -1
index 1c4b9a9..a956f42 100644
@@ -40,7 +40,7 @@ Index: nettle-2.7.1/ecc-256.c
        u1 -= cy;
 -      u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
 +
-+      cy = cnd_add_n (t, rp + n - 4, p->m, 2);
++      cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
 +      u0 += cy;
 +      u1 += (u0 < cy);
        u1 -= (-t) & 0xffffffff;
Signature · 1 line
2.1.0
#1 lore raw

Hello Nathan,

Quoted 14 lines · ngutzmann

The variable in question should have been called ecc->p. The patch has been updated so that the compilation of the nettle recipe would complete successfully.

---
 meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch +0 -0
index 1c4b9a9..a956f42 100644

meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch Index: nettle-2.7.1/ecc-256.c · line 46

Quoted 8 lines
meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch +1 -1
@@ -40,7 +40,7 @@ Index: nettle-2.7.1/ecc-256.c
        u1 -= cy;
 -      u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
 +
-+      cy = cnd_add_n (t, rp + n - 4, p->m, 2);
++      cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
 +      u0 += cy;
 +      u1 += (u0 < cy);
        u1 -= (-t) & 0xffffffff;

looks good to me. However, I needed to lookup the commit where the backport originated from, because the reason for exchanging m and p isn't obvious at all without knowing the original commit. Maybe you could include it in your commit message.

https://git.lysator.liu.se/nettle/nettle/commit/c71d2c9d20eeebb985e3872e4550137209e3ce4d

Regards,
Andreas

#2 lore raw

Thanks for the advice Andreas, will do!

Nathan

Quoted 45 lines · On Tue, 8 Mar 2016 at 18:09 Andreas Oberritter <[email protected]> wrote:

Hello Nathan,

Quoted 1 line · ngutzmann

The variable in question should have been called ecc->p. The patch has

been updated

Quoted 8 lines

so that the compilation of the nettle recipe would complete successfully.

---
 meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git

a/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch b/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch

meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch Index: nettle-2.7.1/ecc-256.c · line 46

Quoted 13 lines

index 1c4b9a9..a956f42 100644

meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch +1 -1
@@ -40,7 +40,7 @@ Index: nettle-2.7.1/ecc-256.c
        u1 -= cy;
 -      u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
 +
-+      cy = cnd_add_n (t, rp + n - 4, p->m, 2);
++      cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
 +      u0 += cy;
 +      u1 += (u0 < cy);
        u1 -= (-t) & 0xffffffff;

looks good to me. However, I needed to lookup the commit where the backport originated from, because the reason for exchanging m and p isn't obvious at all without knowing the original commit. Maybe you could include it in your commit message.

https://git.lysator.liu.se/nettle/nettle/commit/c71d2c9d20eeebb985e3872e4550137209e3ce4d

Regards,
Andreas
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core