From 0c3728bc47ef9dec7437f0f8ab3a508fcde43b05 Mon Sep 17 00:00:00 2001 From: miod <> Date: Fri, 20 Jun 2014 10:40:13 +0000 Subject: Fix incorrect bounds check in amd64 assembly version of bn_mul_mont(); noticed and fix by Fedor Indutny of Joyent ( https://github.com/joyent/node/issues/7704 ) --- src/lib/libcrypto/bn/asm/x86_64-mont.pl | 4 ++-- src/lib/libcrypto/bn/asm/x86_64-mont5.pl | 4 ++-- src/lib/libssl/src/crypto/bn/asm/x86_64-mont.pl | 4 ++-- src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/bn/asm/x86_64-mont.pl b/src/lib/libcrypto/bn/asm/x86_64-mont.pl index 90c717f115..c35493e80a 100755 --- a/src/lib/libcrypto/bn/asm/x86_64-mont.pl +++ b/src/lib/libcrypto/bn/asm/x86_64-mont.pl @@ -138,7 +138,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .L1st + jl .L1st add %rax,$hi1 mov ($ap),%rax # ap[0] @@ -204,7 +204,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .Linner + jl .Linner add %rax,$hi1 mov ($ap),%rax # ap[0] diff --git a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl index dae0fe2453..9c88884d42 100755 --- a/src/lib/libcrypto/bn/asm/x86_64-mont5.pl +++ b/src/lib/libcrypto/bn/asm/x86_64-mont5.pl @@ -181,7 +181,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .L1st + jl .L1st movq %xmm0,$m0 # bp[1] @@ -264,7 +264,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .Linner + jl .Linner movq %xmm0,$m0 # bp[i+1] diff --git a/src/lib/libssl/src/crypto/bn/asm/x86_64-mont.pl b/src/lib/libssl/src/crypto/bn/asm/x86_64-mont.pl index 90c717f115..c35493e80a 100755 --- a/src/lib/libssl/src/crypto/bn/asm/x86_64-mont.pl +++ b/src/lib/libssl/src/crypto/bn/asm/x86_64-mont.pl @@ -138,7 +138,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .L1st + jl .L1st add %rax,$hi1 mov ($ap),%rax # ap[0] @@ -204,7 +204,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .Linner + jl .Linner add %rax,$hi1 mov ($ap),%rax # ap[0] diff --git a/src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl b/src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl index dae0fe2453..9c88884d42 100755 --- a/src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl +++ b/src/lib/libssl/src/crypto/bn/asm/x86_64-mont5.pl @@ -181,7 +181,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .L1st + jl .L1st movq %xmm0,$m0 # bp[1] @@ -264,7 +264,7 @@ $code.=<<___; mulq $m1 # np[j]*m1 cmp $num,$j - jne .Linner + jl .Linner movq %xmm0,$m0 # bp[i+1] -- cgit v1.2.3-55-g6feb