-
Notifications
You must be signed in to change notification settings - Fork 377
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
[BUG] GoalStateTestCase.test_it_should_refresh_the_goal_state_when_it_is_inconsistent failing with openssl 3.2.2 in Ubuntu 24.10 (python 3.12) #3163
Comments
@mirespace Thanks for opening the issue. I was able to repro after installing openssl version 3.2.2 as you highlighted. The other thing I noticed is this test uses 2 test certs. One of the cert(certs.xml) decrypted properly (no issues) but other certs-2.xml is failing while decrypting it. As a result, test validation failed.
I tested this in vm as well with sample certs and able to decrypt the cert.
So far this is my observation, and I'll continue investigate further |
@mirespace thanks for reporting this. @nagworld9 and me looked into this and we need a small change in the Agent to accommodate a difference of behavior in the new openssl. We'll do this within the next couple of weeks. |
Thanks @narrieta and @nagworld9 ! |
Fixed by #3166 |
Hi team,
Describe the bug: A clear and concise description of what the bug is.
When building WALinuxAgent in Ubuntu 24.10 the following test is failing:
The curious thing is that this was not happening a pair of weeks ago, so I've checked what changed at distro level to see if another package could be impacting WALinuxagent. The suspicious was openssl, and I can confirm it is the cause, but I couldn't discover 100% the underlying root of the problem, because using previous version 3.2.1, the test passes:
Changes between opennsl versions (3.2.1 and 3.2.2): https://github.com/openssl/openssl/blob/openssl-3.2.2/CHANGES.md#changes-between-321-and-322-4-jun-2024
Distro and WALinuxAgent details :
Additional context
I explored different options to get to the point on what is happening, with no luck... so sharing here all the way I did (thanks in advance!):
Checking when openssl is involved in the test, I saw the check_certificates in azurelinuxagent/common/protocol/goal_state.py that calls Certificates(), and it ends calling decrypt_p7m func from CryptUtil in azurelinuxagent/common/utils/cryptutil.py which executes
/usr/bin/openssl cms -decrypt -in Certificates.p7m -inkey TransportPrivate.pem -recip TransportCert.pem | /usr/bin/openssl pkcs12 -nodes -password pass: -out Certificates.pem
.This operation fails once, happening with both openssl 3.2.1 -the "good"- and 3.2.2 - "bad":
But it seems it "recovers" well in one case and it doesn't in the other. I checked how many times are openssl called in bad a good case:
Good
And in the bad is one missing:
Bad
So, I checked if the Certificates.pem generated are different depending on the SSL version, and is not:
Accidentally, when doing a trace with pdb, I jumped out the reading loop when reading that file (to line 621 in azurelinuxagent/common/protocol/goal_state.py) and the test passed.. .I'm sharing that pdb session with you here in case I could give you a clue that I can't be able to identify. I put the breakpoints at the end.
Anything else you need from me, please let me know... Thanks for looking into it!
Miriam
The text was updated successfully, but these errors were encountered: