Bug 129528 - libcrypto.dll from LibreSSL MUST NOT GO in C:\Windows\System32
Summary: libcrypto.dll from LibreSSL MUST NOT GO in C:\Windows\System32
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Installation (show other bugs)
Version:
(earliest affected)
6.1 all versions
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-20 18:03 UTC by FA
Modified: 2019-12-23 10:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
LibreOffice version (124.57 KB, image/jpeg)
2019-12-20 18:04 UTC, FA
Details
Windows system popup: Entry point not found (88.28 KB, image/jpeg)
2019-12-20 18:05 UTC, FA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FA 2019-12-20 18:03:06 UTC
Description:
Hi
I found a critical issue using a specific version of libcrypto.dll from OpenSSL in my application. Please refer to this documentation  https://docs.microsoft.com/fr-fr/windows/win32/dlls/dynamic-link-library-search-order?redirectedfrom=MSDN which explain that whatever PATH set to search for a dll, when a dll named 'Foo.dll' is loaded in memory, all processes looking their own 'Foo.dll' will get the one in memory.

This is a critical issue!

Regards

Steps to Reproduce:
1.Build a process that is using the OpenSSL 1.1.1 libcrypto.dll
2.Run any LibreOffice process
3.Run the process in step 1

Actual Results:
Windows system pop up saying: The entry point X509_get_version is not found in the dynamic link library C:\Users\fandre\Documents\git\myproc\myproc.dll

Expected Results:
test success


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 FA 2019-12-20 18:04:23 UTC
Created attachment 156701 [details]
LibreOffice version
Comment 2 FA 2019-12-20 18:05:33 UTC
Created attachment 156702 [details]
Windows system popup: Entry point not found
Comment 3 FA 2019-12-20 18:06:43 UTC
C:\Users\fandre\Documents\git\poco-1.10>build\script\runtests2.cmd -64 Crypto
---------------------------------------------------------------
PATH=C:\Program Files (x86)\IBM\EHLLAPI\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ASF\apache-ant-1.9.13\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\IBM\CICS Transaction Gateway\bin;C:\Program Files (x86)\IBM\Personal Communications\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Program Files\IBM\HostOnDemand\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\WinSCP\;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Program Files\dotnet\;C:\Program Files (x86)\NuGet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Users\fandre\AppData\Local\Microsoft\WindowsApps;C:\Users\fandre\AppData\Roaming\npm;C:\Program Files\CMake\bin;C:\Users\fandre\.dotnet\tools
C:\Windows\System32\libcrypto.dll
---------------------------------------------------------------
PATH=C:\Users\fandre\Documents\git\poco-1.10\bin64;C:\Program Files (x86)\IBM\EHLLAPI\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ASF\apache-ant-1.9.13\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files (x86)\IBM\CICS Transaction Gateway\bin;C:\Program Files (x86)\IBM\Personal Communications\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Program Files\IBM\HostOnDemand\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\WinSCP\;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Program Files\dotnet\;C:\Program Files (x86)\NuGet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Users\fandre\AppData\Local\Microsoft\WindowsApps;C:\Users\fandre\AppData\Roaming\npm;C:\Program Files\CMake\bin;C:\Users\fandre\.dotnet\tools
C:\Users\fandre\Documents\git\poco-1.10\bin64\libcrypto.dll
C:\Windows\System32\libcrypto.dll
---------------------------------------------------------------


****************************************
*** Crypto
****************************************

bin64\TestSuite.exe -ignore C:\Users\fandre\Documents\git\poco-1.10\cppignore.win -all


1 runs, 1 failed.

Failed: Crypto


C:\Users\fandre\Documents\git\poco-1.10>
Comment 4 Julien Nabet 2019-12-20 19:58:37 UTC
6.1 branch is EOL as 6.2 branch now.
Please uninstall this version and give a try at last stable LO version 6.3.4
Comment 5 FA 2019-12-20 21:33:12 UTC
After uninstalling LibreOffice, C:\Windows\System32\libcrypto.dll remains. So ???
Comment 6 FA 2019-12-20 21:34:57 UTC
C:\WINDOWS\system32>dir lib*
 Le volume dans le lecteur C s’appelle OS
 Le numéro de série du volume est 483C-2641

 Répertoire de C:\WINDOWS\system32

19/03/2019  13:02         1 609 728 libcrypto.dll
               1 fichier(s)        1 609 728 octets
               0 Rép(s)  220 733 636 608 octets libres
Comment 7 Julien Nabet 2019-12-20 22:33:04 UTC
FA: thank you for your feedback, I put back to UNCONFIRMED since I don't have more questions for the moment

Michael: since it concerns Windows install + openSSL, thought you might be interested in this one.
Comment 8 Michael Stahl (allotropia) 2019-12-23 10:05:11 UTC
i recommend you write a bug report to whatever application installed the C:\WINDOWS\system32\libcrypto.dll - that is seriously broken and it's not a surprise that LibreOffice breaks due to it, because it can't load LibreOffice's bundled own libcrypto.dll, we've had such bugs before and with the way DLL lookup works on windows we can't do anything about it.

as such this is NOTOUTBUG.
Comment 9 Michael Stahl (allotropia) 2019-12-23 10:07:55 UTC
on second thought, LibreOffice's OpenSSL 1.0.2 DLLs are called ssleay32.dll and libeay32.dll - now i'm not sure what that libcrypto.dll thing is, maybe they renamed it in OpenSSL 1.1? and why it would break LibreOffice also isn't obvious, but still in all due likelihood NOTOURBUG.
Comment 10 FA 2019-12-23 10:26:03 UTC
Hi

The properties of C:\Windows\System32\libcrypto.dll show its name as 'LibreSSL', version '2.6.5.1' modified on '19/03/2019'. There is no way to know which installation is responsible of this dll. But since LibreSSL is around LibreOffice, I was thinking it was a dll from LibreOffice.

Sorry for the noise.