We are using the FIPS validated libeay32.dll. This dll uses the /FIXED
linker switch so that the libeay32.dll will be loaded at fixed base address. The other modules from our project is consuming the openssl dll in shared mode using LoadLibrary()
function. We have observed the intermittent issue while loading the mentioned dll.
As part of resolution, we added the relocation information in the image header of libeay32.dll with the understanding that the dll will be loaded at some base address if not at fixed one to address intermittent loading issue. I checked the open ssl user guide which mentions the following.
The standard OpenSSL build with the fips option will use a base address for
libeay32.dll
of0xFB00000
by default. This value was chosen because it is unlikely to conflict with other dynamically loaded libraries. In the event of a clash with another dynamically loaded library which will trigger runtime relocation oflibeay32.dll
, the integrity check will fail with the errorFIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED
A base address conflict can be resolved by shuffling the other DLLs or re-compiling OpenSSL with an alternative base address specified with the
--withbaseaddr=
option.
Here are my questions.
By introducing the relocation information in image header of libeay32.dll, am I making the libeay32.dll vulnerable to security [fips 140-2] ?
What kind of security vulnerabilities am I introducing with their side effect in the modules which are using those open ssl libraries ?
Any cleaner solution to such kind of loading issues ?
Thanks in advance...