Hi,

> Hi, our team have been experiencing a crash in some production
> machines (which I cannot reproduce in development machines) caused by
> the libeay32 module in 64 bits Windows 10 machines.
> 
> I was able to create a simple "crash application" and was able to get
> the dump of the crash along with PDB files for both the libeay32.dll
> and the sample application.
> 
> The exception code being thrown is 0xC0000005 (invalid memory access)
> and occurs inside sha1_block_data_order_shaext(), sha1-x86_64.asm,
> line 1435. The version used was 1.0.2g (but older versions also crash
> - the latest dev version from github crash as well).

Oh! Your machines don't seem like something everybody has :-) I mean
SHAEXT-capable CPUs are rare... Anyway, please verify attached patch.



-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4530
Please log in as guest with password guest if prompted

diff --git a/crypto/sha/asm/sha1-x86_64.pl b/crypto/sha/asm/sha1-x86_64.pl
index e8f61ab..97baae3 100755
--- a/crypto/sha/asm/sha1-x86_64.pl
+++ b/crypto/sha/asm/sha1-x86_64.pl
@@ -380,9 +380,9 @@ $code.=<<___;
 .align 16
 .Loop_shaext:
        dec             $num
-       lea             0x40($inp),%rax         # next input block
+       lea             0x40($inp),%r8          # next input block
        paddd           @MSG[0],$E
-       cmovne          %rax,$inp
+       cmovne          %r8,$inp
        movdqa          $ABCD,$ABCD_SAVE        # offload $ABCD
 ___
 for($i=0;$i<20-4;$i+=2) {
-- 
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to