-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIPS mode crypto:strong_rand_bytes(1) fails #8769
Comments
With debugger mode i got this error
|
What do What exactly do you mean with "debugger mode"? |
I ran this one:
but now I see that it's breaks everything, sorry for misleading Upon your request
|
|
Ok, now it more informative 😃 Not understandable for me, maybe you know what does it mean?
|
The last one "random number generator::unable to fetch drbg" is the interesting one. It fails to fetch the random number generator provider (EVP_RAND_fetch). Seems something is wrong with the OpenSSL/OS configuration. Does it work if you don't enable |
Yeap, without enabling FIPS it's ok |
I cannot reproduce this. I tried on ubuntu 22 with OTP 26.2.1 and OpenSSL 3.0.2 built with fips support. Is it just |
I'm not sure if there is something else that fails, give me names and I can check
|
Yes, I built OpenSSL myself from source. What did you do to activate fips on installed OpenSSL on ubuntu 22? |
I ran this commands
|
For debug purposes there is small C code that is passes too
|
Let's try to better mimic what OTP and this directly after
and see what happens then... |
That's what i got
And this is the output
|
A nice random hex byte 62, how disappointing :-) What if you try some other crypto function, for example:
Regardless, I think I have to get myself an Ubuntu pro license and try to reproduce myself... |
😏
It also works, returns some object
At least they are free for personal use 😃 |
Hey @sverker Do you have any update about it? |
Here's a preliminary fix you can try:
|
Thanks It looks like it's working now, can you please explain what is happening? |
Something goes wrong when switching FIPS mode on/off (with This seems to me like a bug in OpenSSL. |
Fix in OTP-26.2.5.4. |
Describe the bug
Using ubuntu 22 with enabled FIPS mode I tried to enforce fips in rabbitmq using env variable(RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-crypto fips_mode true"), and it failed to start with the error:
So I thought that maybe rabbitmq requires erlang that compiled with fips in order to enforce it, but its failed with different error, that can be reproduced in simpler way
To Reproduce
Compile erlang/otp of tag OTP-26.2.1 with --enable-fips flag and run simple commands:
Enter erlang shell, load crypto app, and run the rand command:
I get
Expected behavior
Possibility to run rabbitmq with enforced fips
Affected versions
OTP-26.2.1+ , didn't see any changes in the changelog related to this issue
The text was updated successfully, but these errors were encountered: