Bug 1211562

Summary: windows:mingw:win32/mingw32-openssl-1_1: fips self test fails on windows due to invalid path
Product: [openSUSE] openSUSE.org Reporter: Stephan Jauernick <info>
Component: 3rd party softwareAssignee: Fridrich Strba <fstrba>
Status: RESOLVED FIXED QA Contact: E-mail List <screening-team-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_8UYIdkKBha, fridrich.strba, info, mkbosmans, perry.werneck, ralf.habacker
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Visualization of the bug symptoms

Description Stephan Jauernick 2023-05-19 20:32:49 UTC
Created attachment 867134 [details]
Visualization of the bug symptoms

I tried to include windows:mingw:win32/mingw32-openssl-1_1 inside  https://build.opensuse.org/package/show/home:stephan48:branches:multimedia:xiph:beta-devel/mingw32-icecast on openSuSE Tumbleweed x64 and it exploded with:
crypto/fips/fips.c:597: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE

Upon some review I found that OpenSSL apparently wants a HMAC for validation of the tests.

I check in regards to creating it and failed, upon which i tried to look where it attempts to do this and found that it tries an invalid path.

I am lost in regards how we should approach a fix or possible workarounds, currently this makes openssl 1.1 unuseable for us.

Sadly we neither can use openssl 1.0.

I hope we can find a solution. 

Thanks for your good and continious work!
Comment 1 Ralf Habacker 2023-05-22 07:13:52 UTC
Hi Stephan,

I can confirm this bug by running the icecast executable on Windows 10.

procmon shows a few lines, which looks to be related to this issue:

08:57:34,1176641	icecast.exe	7636	CreateFile	C:\Program Files (x86)\Icecast\.C:\Program Files (x86)\Icecast\bin\libcrypto-1_1.dll.hmac	NAME INVALID	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a

-> incorrect detection of a file located in the installation path 

08:57:34,1200828	icecast.exe	7636	CreateFile	C:\proc\sys\crypto\fips_enabled	PATH NOT FOUND	Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a

-> looks to be a part in the code not ported to win32.


08:57:34,1203185	icecast.exe	7636	CreateFile	C:\Program Files (x86)\Icecast\.C:\Program Files (x86)\Icecast\bin\libcrypto-1_1.dll.hmac	NAME INVALID	Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a

-> incorrect detection of a file located in the installation path
Comment 2 Ralf Habacker 2023-05-22 09:03:04 UTC
See https://build.opensuse.org/request/show/1088308 for an associated submit request to fix this issue.
Comment 3 Ralf Habacker 2023-05-22 09:10:25 UTC
See https://build.opensuse.org/request/show/1088311 for an associated submit request to fix the issue for 64 bit builds.
Comment 4 Ralf Habacker 2023-05-22 09:58:17 UTC
The issue has been resolved for mingw32 and mingw64 builds.
Comment 5 Stephan Jauernick 2023-05-22 16:48:45 UTC
Hi Ralf,
(In reply to Ralf Habacker from comment #4)
> The issue has been resolved for mingw32 and mingw64 builds.

Thank you very much for this very speedy fix! I can confirm now that the fix worked.

Will try to attach procmon later to see what it tries to do now.

Kind Regards,
Stephan
Comment 6 Perry Werneck 2023-05-22 18:57:41 UTC
*** Bug 1210415 has been marked as a duplicate of this bug. ***