[MDEV-29765] Packages signed with weak cipher causing issues with FIPS Created: 2022-10-11 Updated: 2023-02-07 Resolved: 2023-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Packaging, Repositories |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Amit Narkhede | Assignee: | Daniel Bartholomew |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
SLES 15 SP4 |
||
| Description |
|
We recently started testing deployments of SLES 15 SP4 and we found out that MariaDB repo doesn't work when FIPS is enabled on the machine. The following steps can be taken to reproduce the issue. Error message we get from doing the above steps looks something like below.
Looking further why this is happening only with MariaDB and not other third party repositories we have, we noticed this must be weak signature that is probably being blocked with FIPS now.
Are there existing tickets or plans on fixing this issue? We need FIPS for compliance reasons and can't deploy using SLES15 SP4 for this reason. |
| Comments |
| Comment by Daniel Bartholomew [ 2022-10-18 ] | ||||||||||||||||||||||||
|
For a while now we've used a stronger key for our Debian and Ubuntu repositories and so I'll run some tests with it to see if that key will work on SLES 15 w/FIPS enabled. If it does then we can definitely migrate our SLES repositories to using it. And maybe we should also migrate our RHEL and Fedora repositories too. I don't know if those have a FIPS mode or not, but getting everything onto the same (stronger) key would be beneficial. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2022-10-20 ] | ||||||||||||||||||||||||
|
I haven't been able to reproduce the error. On a sles15 VM with fips enabled I did the following:
The mariadb.repo file looks like this:
And the gpgkey file, downloaded and saved to the /etc/pki/trust/ folder by the mariadb_repo_setup script from it's default source at https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY has a sha256sum of:
Can you verify the above are in line with your machine? If so, and you're still seeing the error, then which SLES 15 SP are you on? Let me know. Thanks. | ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2022-10-21 ] | ||||||||||||||||||||||||
|
sha256 on the machine I have is also the same
What service pack are you using for the test above? So the issue is not reproducible on SLES 15 SP3, because we did use that for some testing earlier this year. It is reproducible on SLES15 SP4. Can you verify that you are indeed using SLES15 SP4 with output of
| ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2022-10-21 ] | ||||||||||||||||||||||||
|
Yes, it turns out my VM was on SP3. So that's why I wasn't able to reproduce. I'll spin up an SP4 VM. Thanks. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2022-10-21 ] | ||||||||||||||||||||||||
|
Confirmed it on SLES 15 SP4 with fips enabled. I've created a temporary test repository signed using the same (stronger) key we use for our Debian/Ubuntu repositories (f1656f24c74cd1d8). I've temporarily put this repository in a location you can access to test:
To try it out, here are some instructions that should work for a stock SLES 15 (fips-enabled or not) system that doesn't have MariaDB installed. If a MariaDB repository is already configured, just change the baseurl line in your MariaDB repo file to the above and then skip the first two steps and jump to step 3 about importing the updated GPG-KEY file and continue on from there.
Assuming things look good for using the f1656f24c74cd1d8 key, I'll start the planning process for an orderly transition to using this key, probably for all of our zypper and dnf repositories (it doesn't hurt for all of them to be using a stronger key). | ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2022-10-25 ] | ||||||||||||||||||||||||
|
Thanks for the detailed steps above. I created a VM on SLES15 SP4. Tried to reproduce the issue on the custom repo and was not able to. So it looks like this indeed fixes the issue here. | ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2022-10-25 ] | ||||||||||||||||||||||||
|
Just to make sure, as things are working fine now can I assume here that the new key will be the one above? I can use that to prepare our migration as this affects VMs in our live environment even if they are not using SLES15 yet. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2022-10-25 ] | ||||||||||||||||||||||||
|
Yes, the plan is to migrate to using that key for our yum/dnf/zypper repositories. I don't have a definite timeline yet on this, but I'm starting discussions with the relevant people so the roll-out can be as organized and smooth as possible. To kickstart things I've today updated the official location for the yum/dnf/zypper repository pub-key - https://supplychain.mariadb.com/MariaDB-Server-GPG-KEY - to include both the legacy and 'new' pub keys, but there are other places that need to be updated that I'm working on. This is a transparent change for end users. When rpm imports a pub-key it doesn't care if the file has one or multiple keys in it. So adding the key to that file now has the effect of pre-staging it for those that set up repositories using our repository setup script from today. We'll also provide documentation in relevant release notes, the GPG page in the Knowledgebase (and other pages), and probably blog posts for updating existing repositories, which I think will be along the lines of:
(At least, that's what I assume will be needed. I haven't tested migrations yet.) | ||||||||||||||||||||||||
| Comment by Faustin Lammler [ 2022-11-08 ] | ||||||||||||||||||||||||
|
FYI: https://github.com/MariaDB/buildbot/pull/68 has just been merged and I have triggered rebuild of knowing green install test on RPM platform (new BB: https://buildbot.mariadb.org/#/builders?tags=%2Binstall&tags=kvm&tags=%2Brpm) to test the v2 version of the key. | ||||||||||||||||||||||||
| Comment by Faustin Lammler [ 2022-12-12 ] | ||||||||||||||||||||||||
|
I have just roll-backed since I was not aware of: | ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2023-01-09 ] | ||||||||||||||||||||||||
|
Faustin, I see you did get the migration back in December and rolled it back as it was planned for 2023. Do we have any timeline when this will be attempted again? | ||||||||||||||||||||||||
| Comment by Faustin Lammler [ 2023-01-10 ] | ||||||||||||||||||||||||
|
Hi amitnarkhede, yes we plan it for the next release (probably before the end of the month). | ||||||||||||||||||||||||
| Comment by Faustin Lammler [ 2023-01-31 ] | ||||||||||||||||||||||||
|
Hi! The new key is now in place on our root mirrors, it is going to be synced in the next hours to all mirrors. Please note that the v2 key is still available:
But, we will probably remove the key in the next month since people should use the following:
| ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2023-02-01 ] | ||||||||||||||||||||||||
|
Hi Faustin, Thanks for the update. I tried to point a VM so that it will fetch things from https://downloads.mariadb.com/MariaDB/mariadb-10.5/yum/sles/15/x86_64 and see that latest packages from that repo still had older signature. Just to make sure I'm on the same page, is this expected behavior? Shouldn't older package also get re-signed with new key? | ||||||||||||||||||||||||
| Comment by Faustin Lammler [ 2023-02-02 ] | ||||||||||||||||||||||||
|
Hi amitnarkhede, yes that's normal since only the next release (that has been delayed) will use the new signature key (so, 10.5.19 in your case). | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2023-02-06 ] | ||||||||||||||||||||||||
|
The releases have now been published. | ||||||||||||||||||||||||
| Comment by Amit Narkhede [ 2023-02-07 ] | ||||||||||||||||||||||||
|
Thank you Daniel and Faustin for the help on this. | ||||||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2023-02-07 ] | ||||||||||||||||||||||||
|
Great to hear. Closing. |