[openssl-dev] Possible wrong restore register order in SEH for ecp_nistz256

Jun Sun jun.sun at infosecglobal.com
Thu Feb 9 16:54:33 UTC 2017


Hi,

I noticed Windows exception handler is added to ecp_nistz256-x86_64.pl. In function full_handler, when restore register contents, rbx is the first one with the smallest offset:


3181         mov     -8(%rax),%rbx

3182         mov     -16(%rax),%rbp

but when do push, rbp is always the first one push to the stack:


 497 .Lmul_mont:

 498         push    %rbp

 499         push    %rbx


That is, the contents of rbx is restored to rbp and the content of rbp is restored to rbx. I think it is probably a bug of the code.



Jun


This email and any attachments are for the sole use of the intended recipients and may be privileged or confidential. Any distribution, printing or other use by anyone else is prohibited. If you are not an intended recipient, please contact the sender immediately, and permanently delete this email and attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20170209/021680f9/attachment-0001.html>


More information about the openssl-dev mailing list