http://bugs.winehq.org/show_bug.cgi?id=17184
Summary: Achieve Planner 1.9.0 requires explicit native override of mscoree.dll Product: Wine Version: 1.1.13 Platform: PC URL: http://www.effexis.com/achieve/downloadn.htm OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mscoree AssignedTo: wine-bugs@winehq.org ReportedBy: arethusa26@gmail.com
As a follow-up to bug 17150, after installing the .NET Framework 1.1 and Achieve Planner 1.9.0, starting Achieve Planner yields:
wine: Call from 0x7b844cc8 to unimplemented function mscoree.dll.StrongNameSignatureVerificationEx, aborting
An explicit override is needed to allow the application to use the native mscoree shipped with the .NET Framework, which is contrary to Wine's mscoree's preference to use the native version.
http://bugs.winehq.org/show_bug.cgi?id=17184
Andrew Nguyen arethusa26@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download
http://bugs.winehq.org/show_bug.cgi?id=17184
Louis Lenders xerox_xerox2000@yahoo.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |xerox_xerox2000@yahoo.co.uk Ever Confirmed|0 |1
--- Comment #1 from Louis Lenders xerox_xerox2000@yahoo.co.uk 2009-08-23 16:52:28 --- confirming
though mscoree.dll.StrongNameSignatureVerificationEx has now a stub, the app still fails because it uses wine's mscoree. As far as i understand the problem is as follows:
The app calls the function StrongNameSignatureVerificationEx from a dll called mscoreesn.dll. This dll is installed somwhere in the MicroSoft.Net direcectory in c:\windows. I thinkk this dlls just forwards it directly to mscoree.dll. So in spite of mscoree's preference to use the native version, it calls the function from buitin mscoree, as it's directly forwarded. This last is just a guess, maybe someone with more knowledge about wine's load internals has a clue, but if my guess would be correct, this might just be WONTFIX?
http://bugs.winehq.org/show_bug.cgi?id=17184
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net 2010-07-29 17:37:02 --- Hello,
--- snip --- The app calls the function StrongNameSignatureVerificationEx from a dll called mscoreesn.dll. This dll is installed somwhere in the MicroSoft.Net direcectory in c:\windows. I thinkk this dlls just forwards it directly to mscoree.dll. So in spite of mscoree's preference to use the native version, it calls the function from buitin mscoree, as it's directly forwarded. This last is just a guess, maybe someone with more knowledge about wine's load internals has a clue, but if my guess would be correct, this might just be WONTFIX? --- snip ---
The app dlls, for example "efxstd.DLL" (managed code, strong named assembly) call StrongNameSignatureVerificationEx() use P/Invoke to check if they are tampered (patched). This is probably an attempt to stop novice hackers from re-signing the assembly or completely removing the existing strong name signature.
Although obfuscated I deduced it seems to implement some let-the-bad-guy-wait-until-he-dies-of-boredom scheme if StrongNameSignatureVerificationEx() returns false. Later the assemblies' public key token is verified with an internal (encrypted) representation of the public key token.
The native vs. builtin mscoree load order problem most likely results from different P/Invoke resolver implementation between .NET 1.1 CLR and .NET 2.0 CLR.
From the trace logs it seems .NET 1.1 uses LoadLibraryExW() with full app path
(working dir), resulting in loading of builtin mscoree.dll. .NET 2.0+ uses LoadLibraryExW() with short dll name only, resulting in getting the native one (from system32).
This is the relevant part from P/invoke wrapper trace (mscoree already loaded):
The already loaded module is not considered by loader due to full load path mismatch:
--- snip --- 0025:Call KERNEL32.LoadLibraryExW(0032ed90 L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll",00000000,00000008) ret=791b7b63 0025:trace:module:load_dll looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" in L"C:\Program Files\Effexis Software\Achieve Planner;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0025:trace:module:get_load_order looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" 0025:trace:module:get_load_order got hardcoded default for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" 0025:trace:module:load_builtin_dll Trying built-in L"mscoree.dll" ... 0025:trace:module:load_builtin_callback loaded mscoree.dll 0x18f3d8 0x204f0000 0025:trace:module:load_dll Loaded module L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" (builtin) at 0x204f0000 0025:trace:module:process_attach (L"mscoree.dll",(nil)) - START 0025:Call PE DLL (proc=0x204f6e00,module=0x204f0000 L"mscoree.dll",reason=PROCESS_ATTACH,res=(nil)) 0025:trace:mscoree:DllMain (0x204f0000, 1, (nil)) 0025:Call KERNEL32.DisableThreadLibraryCalls(204f0000) ret=204f5ed0 0025:Ret KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=204f5ed0 0025:Ret PE DLL (proc=0x204f6e00,module=0x204f0000 L"mscoree.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0025:trace:module:process_attach (L"mscoree.dll",(nil)) - END 0025:Ret KERNEL32.LoadLibraryExW() retval=204f0000 ret=791b7b63 --- snip ---
The already loaded module is taken due to short path match:
--- snip --- 0025:Call KERNEL32.LoadLibraryExW(79511a88 L"mscoree.dll",00000000,00000000) ret=79517307 0025:trace:module:load_dll looking for L"mscoree.dll" in L"C:\Program Files\Effexis Software\Achieve Planner;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0025:trace:module:load_dll Found L"C:\windows\system32\mscoree.dll" for L"mscoree.dll" at 0x79170000, count=-1 0025:Ret KERNEL32.LoadLibraryExW() retval=79170000 ret=79517307 --- snip ---
With "native-over-builtin":
--- snip --- 0037:Call KERNEL32.LoadLibraryExW(0032ed90 L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll",00000000,00000008) ret=791b7b63 0037:trace:module:load_dll looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" in L"C:\Program Files\Effexis Software\Achieve Planner;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0037:trace:module:get_load_order looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" 0037:trace:module:get_load_order_value got standard key n,b for L"mscoree" 0037:trace:module:load_builtin_dll Trying built-in L"mscoree.dll" ... 0037:trace:module:load_builtin_callback loaded mscoree.dll 0x193070 0x32870000 0037:trace:module:load_dll Loaded module L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" (builtin) at 0x32870000 0037:trace:module:process_attach (L"mscoree.dll",(nil)) - START 0037:Call PE DLL (proc=0x32883e00,module=0x32870000 L"mscoree.dll",reason=PROCESS_ATTACH,res=(nil)) 0037:trace:mscoree:DllMain (0x32870000, 1, (nil)) 0037:Call KERNEL32.DisableThreadLibraryCalls(32870000) ret=32882ed0 0037:Ret KERNEL32.DisableThreadLibraryCalls() retval=00000001 ret=32882ed0 0037:Ret PE DLL (proc=0x32883e00,module=0x32870000 L"mscoree.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 0037:trace:module:process_attach (L"mscoree.dll",(nil)) - END 0037:Ret KERNEL32.LoadLibraryExW() retval=32870000 ret=791b7b63 --- snip ---
With "native only":
--- snip --- 0041:Call KERNEL32.LoadLibraryExW(0032ed90 L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll",00000000,00000008) ret=791b7b63 0041:trace:module:load_dll looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" in L"C:\Program Files\Effexis Software\Achieve Planner;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0041:trace:module:get_load_order looking for L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll" 0041:trace:module:get_load_order_value got standard key n for L"mscoree" 0041:warn:module:load_dll Failed to load module L"C:\Program Files\Effexis Software\Achieve Planner\mscoree.dll"; status=c0000135 0041:Ret KERNEL32.LoadLibraryExW() retval=00000000 ret=791b7b63 0041:Call KERNEL32.LoadLibraryExW(0032eae8 L"mscoree.dll",00000000,00000000) ret=791b7b63 0041:trace:module:load_dll looking for L"mscoree.dll" in L"C:\Program Files\Effexis Software\Achieve Planner;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0041:trace:module:load_dll Found L"C:\windows\system32\mscoree.dll" for L"mscoree.dll" at 0x79170000, count=-1 0041:Ret KERNEL32.LoadLibraryExW() retval=79170000 ret=791b7b63 0 --- snip ---
Either enforce "native only" for mscoree on .NET 1.1 or install .NET 2.0 where the CLR will automatically resolve P/Invoke with short name.
If you go the Mono route you need of course to provide a real implementation for strong name verification.
Regards
http://bugs.winehq.org/show_bug.cgi?id=17184
--- Comment #3 from butraxz@gmail.com 2013-03-04 14:54:20 CST --- This has not been updated for two years. Is this an issue in 1.5.25 or should this be closed as abandoned ?
http://bugs.winehq.org/show_bug.cgi?id=17184
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.effexis.com/achi |http://www.effexis.com/achi |eve/downloadn.htm |eve/AchievePlanner19Downloa | |d.htm CC| |00cpxxx@gmail.com
--- Comment #4 from Bruno Jesus 00cpxxx@gmail.com 2013-03-04 18:34:09 CST --- winetricks dotnet11 + running the program does not work winetricks dotnet20 + running the program works
When running the program with dotnet11 this error is presented in the screen:
Failed to delay load mscorlib.dll (Win32 error: 0).
This program can no longer run and will now terminate.
https://bugs.winehq.org/show_bug.cgi?id=17184
c0re erge@yandex.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erge@yandex.ru
--- Comment #5 from c0re erge@yandex.ru --- I confirm, can not install dotnet 1.1, there is a similar error
https://bugs.winehq.org/show_bug.cgi?id=17184
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED URL|http://www.effexis.com/achi |https://web.archive.org/web |eve/AchievePlanner19Downloa |/20181110100817/http://effe |d.htm |xissoftware.s3.amazonaws.co | |m/AchieveSetup.exe Fixed by SHA1| |074dd6959f2cc1f00531132537f | |a3412388c27bb Keywords|dotnet | Summary|Achieve Planner 1.9.0 |Achieve Planner 1.9.0 (.NET |requires explicit native |1.1 app) requires explicit |override of mscoree.dll |native override of | |mscoree.dll or | |mscoree.dll.StrongNameSigna | |tureVerificationEx faking | |success
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting.
Wine 6.2 with .NET 1.1 (WINEARCH=win32):
--- snip --- $ wine ./Achieve.exe
$ pwd /home/focht/.wine/drive_c/Program Files/Effexis Software/Achieve Planner ... 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"c:\program files\effexis software\achieve planner\efxstd.dll", 1, 0031F260): stub ... 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"c:\program files\effexis software\achieve planner\efxstd.dll", 1, 0031EC7C): stub 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"C:\Program Files\Effexis Software\Achieve Planner\Achieve.exe", 1, 0031EC7C): stub ... 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"C:\Program Files\Effexis Software\Achieve Planner\Achieve.exe", 1, 0031ED74): stub ... 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"C:\Program Files\Effexis Software\Achieve Planner\Achieve.exe", 1, 0031EA24): stub 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"c:\program files\effexis software\achieve planner\efxstd.dll", 1, 0031EA24): stub 0024:fixme:mscoree:StrongNameSignatureVerificationEx (L"c:\program files\effexis software\achieve planner\efxstd.dll", 1, 0031EA3C): stub ... --- snip ---
Without explicit native 'mscoree' override, builtin 'mscoree' is taken. Builtin fakes strong name validation success which prevents the problem.
====
Wine 6.2 with Wine-Mono (no .NET 1.1 installed):
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)/Effexis Software/Achieve Planner
$ wine ./Achieve.exe ...
Unhandled Exception: System.InvalidProgramException: Invalid IL code in bI:.ctor (int,System.Exception,string,string,string): IL_002b: stfld 0x040004c6
at (wrapper remoting-invoke-with-check) bI..ctor(int,System.Exception,string,string,string) at hl.a (System.String , System.String , System.Int32 , System.Exception , System.Boolean ) [0x00007] in <22cb1368f070431fb47fa8dbac6eb06f>:0 at gm.a (System.String[] ) [0x0001e] in <c05e201fcef446e5bfd1b7580d474896>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidProgramException: Invalid IL code in bI:.ctor (int,System.Exception,string,string,string): IL_002b: stfld 0x040004c6
at (wrapper remoting-invoke-with-check) bI..ctor(int,System.Exception,string,string,string) at hl.a (System.String , System.String , System.Int32 , System.Exception , System.Boolean ) [0x00007] in <22cb1368f070431fb47fa8dbac6eb06f>:0 --- snip ---
* https://source.winehq.org/git/wine.git/commitdiff/1e48e160f50d73e1d5963c0bf4... ("mscoree: Stubs for StrongNameSignatureVerification(Ex)."), Part of Wine 1.1.21 release.
* https://source.winehq.org/git/wine.git/commitdiff/074dd6959f2cc1f00531132537... ("mscoree: Fake success from StrongNameSignatureVerificationEx()."), Part of Wine 4.13 release.
From the commit message:
--- quote --- Game Maker Studio 2 Desktop needs this to launch. --- quote ---
Sadly there is not even a bug report for this hence using this one because the user visible problem is gone.
From loader point of view it's not fixed but that kind of issue is covered by
other old bug reports as well.
$ sha1sum AchieveSetup.exe e532c3c016a4787071ee9a3bf5cf937b23ce11f5 AchieveSetup.exe
$ du -sh AchieveSetup.exe 35M AchieveSetup.exe
$ wine --version wine-6.2
Regards
https://bugs.winehq.org/show_bug.cgi?id=17184
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.3.