[Bug 11052] New: crypt32 accesses freed memory and tries to enter deleted critical sections on process shutdown

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jan 5 12:32:02 CST 2008


http://bugs.winehq.org/show_bug.cgi?id=11052

           Summary: crypt32 accesses freed memory and tries to enter deleted
                    critical sections on process shutdown
           Product: Wine
           Version: 0.9.52.
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: crypt32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: kumbayo84+wine_bugzilla at gmail.com


Created an attachment (id=10060)
 --> (http://bugs.winehq.org/attachment.cgi?id=10060)
output more debug info + possible solution + simplify test case to only 1 call

crypt32 accesses memory after it has been freed
normally this does not manifest, but a easy way to reproduce this is to run the
cert test in the wine test suite with 2 patches of me applied


what happens is:
on process shutdown rsaenh.dll is unloaded
and it calls destroy_handle_table which HeapFrees the handle table
and deletes a critical section

then crypt32.dll is unloaded and it tries to release a handle(release_handle)
from
rsaenh.dll which accesses the HeapFreed handle table + it calls a function of a
already unloaded dll
and tries to enter the already uninitialized critical section
which hangs with my patch that zeros the whole critical section when deleting
it


http://blogs.msdn.com/oldnewthing/archive/2005/05/23/421024.aspx
also talks about this problem of

inside the first patch there are also 2 commented lines
which make crypt32 do nothing when DLL_PROCESS_DETACH happens because of
process shutdown
this might already be the proper solution for this problem


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list