WineHQ
Bug Tracking Database – Bug 34738

 Bugzilla

 

Last modified: 2014-01-10 14:46:37 UTC  

PageFault when generating a MD5 Hash

Bug 34738 - PageFault when generating a MD5 Hash
PageFault when generating a MD5 Hash
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: rsaenh
1.6
x86-64 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-10-16 00:59 UTC by Glenn Chugg
Modified: 2014-01-10 14:46 UTC (History)
1 user (show)

See Also:
Regression SHA1:
Fixed by SHA1: bfd2c533beef454a61b24f92790f91099e607365
Distribution: ---
Staged patchset:


Attachments
Backtrace of crash (9.42 KB, text/plain)
2013-10-16 00:59 UTC, Glenn Chugg
Details
Test Case (395.05 KB, application/octet-stream)
2013-10-16 04:00 UTC, Glenn Chugg
Details
Here is the +crypt trace (10.43 KB, text/plain)
2013-10-16 04:12 UTC, Glenn Chugg
Details
This has the compiled x86 .exe for the test case (330.94 KB, application/octet-stream)
2013-10-17 07:54 UTC, Glenn Chugg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glenn Chugg 2013-10-16 00:59:14 UTC
Just updating my tools to be linux compatible, but this was stopping my progress.
Comment 1 Glenn Chugg 2013-10-16 00:59:51 UTC
Created attachment 46314 [details]
Backtrace of crash
Comment 2 Nikolay Sivov 2013-10-16 01:19:16 UTC
Could you attach a sample source code and +crypt trace?
Comment 3 Glenn Chugg 2013-10-16 03:16:01 UTC
I'll need to trace through someone elses code, but I'll post it as soon as I find the causing call... It's written in AutoIt, so quite easy to work with.

Not sure what a +crypt trace is or how to capture it for you tho? maybe the code will help, give me a hour or two to find the problem call.
Comment 4 Austin English 2013-10-16 03:21:04 UTC
(In reply to comment #3)
> I'll need to trace through someone elses code, but I'll post it as soon as I
> find the causing call... It's written in AutoIt, so quite easy to work with.
> 
> Not sure what a +crypt trace is or how to capture it for you tho? maybe the
> code will help, give me a hour or two to find the problem call.

WINEDEBUG=+crypt wine foo.exe >> log.txt 2>&1

(see also http://wiki.winehq.org/FAQ#debug_trace)
Comment 5 Nikolay Sivov 2013-10-16 03:23:28 UTC
It's described here http://wiki.winehq.org/FAQ#get_log, section 10.2. Crash is in CryptHashData() obviously. Is this a thing you're trying to run http://www.lastos.org/tools.html?
Comment 6 Glenn Chugg 2013-10-16 04:00:49 UTC
Created attachment 46315 [details]
Test Case

The attached file is a test case, I included the Crypt.au3 so you can read the actual api calls without needing AutoIt to run the proper test. Just run the EXE and it'll try to calculate the hash of C:\Windows\Notepad.exe, and causes the same crash specified in this bug report.
Comment 7 Glenn Chugg 2013-10-16 04:12:32 UTC
Created attachment 46316 [details]
Here is the +crypt trace

Hope this helps :)
Comment 8 Glenn Chugg 2013-10-16 04:27:14 UTC
Yeah the LastOS tools are what I am working on making compatible with WINE again, I used to support Linux, but I found earlier versions of WINE to be very temperamental with our tools, v1.6+ works great tho, I am amazed how far WINE has come lately.

Let me know if I can do anything else to help fix this ASAP, I only code in Basic and Scripting languages so nothing to complex.
Comment 9 Nikolay Sivov 2013-10-17 06:41:14 UTC
Could you attach a 32-bit executable for this test? I'm having troubles building 64-bit wine at the moment.
Comment 10 Glenn Chugg 2013-10-17 07:54:26 UTC
Created attachment 46330 [details]
This has the compiled x86 .exe for the test case
Comment 11 Nikolay Sivov 2013-10-17 11:16:33 UTC
The problem is CryptHashData() call at provider side. Application calls it with CRYPT_USERDATA flag and RSAENH provider fails if flags are not zero:

---
RSAENH_CPHashData(...)
---
    if (dwFlags)
    {
        SetLastError(NTE_BAD_FLAGS);
        return FALSE;
    }
---

If this check is removed it no longer crashes, but doesn't do anything useful either, but after looking at script I think it's intentional.

I'll add some tests for that call first, let's see how it goes. Confirming.
Comment 12 Nikolay Sivov 2013-10-18 15:11:15 UTC
This is fixed in git now, commit bfd2c533beef454a61b24f92790f91099e607365.
Comment 13 Alexandre Julliard 2013-10-25 12:54:35 UTC
Closing bugs fixed in 1.7.5.
Comment 14 Alexandre Julliard 2014-01-10 14:46:37 UTC
Removing 1.6.x milestone from bugs included in 1.6.2.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers