Skip to content
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

Prevent FIPS packages been overwrite by official version #21530

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Jan 26, 2025

Prevent FIPS packages been overwrite by official version

Why I did it

FIPS break on 202405 and later version, because openssl and libk5crypto3 Debian offical version higher than FIPS version, so FIPS openssl been upgrade when install python-dbus:

  • sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot ./fsroot-mellanox apt-get -y install python3-dbus
    Reading package lists...
    Building dependency tree...
    Reading state information...
    python3-dbus is already the newest version (1.3.2-4+b1).
    The following additional packages will be installed:
    libk5crypto3 openssl <== python3-dbus depends on libk5crypto3 and openssl
    Suggested packages:
    krb5-doc krb5-user
    The following packages will be upgraded:
    libk5crypto3 openssl
    2 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
    ...
    Unpacking libk5crypto3:amd64 (1.20.1-2+deb12u2) over (1.20.1-2+deb12u1+fips) ... <== debian version been installed
    Unpacking openssl (3.0.15-1deb12u1) over (3.0.11-1deb12u2+fips) ...
Work item tracking
  • Microsoft ADO: 30945454

How I did it

Hold FIPS packaged during build image.

How to verify it

Pass all UT.

Manually confirm the package upgrade issue fixed:

  • sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot ./fsroot-mellanox apt-mark hold openssl
    openssl set on hold.
    ...
  • sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot ./fsroot-mellanox apt-get -y install python3-dbus
    Reading package lists...
    Building dependency tree...
    Reading state information...
    python3-dbus is already the newest version (1.3.2-4+b1).
    0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. <== openssl not upgrade any more
  • sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot ./fsroot-mellanox apt-mark unhold openssl
    Canceled hold on openssl.

admin@vlab-01:$ apt list | grep fips
libk5crypto3/now 1.20.1-2+deb12u1+fips amd64 [installed,local]
openssl/now 3.0.11-1
deb12u2+fips amd64 [installed,local]

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

  • []

Description for the changelog

Prevent FIPS packages been overwrite by official version

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 marked this pull request as ready for review January 26, 2025 09:57
@liuh-80 liuh-80 force-pushed the dev/liuh/hold_fips_version branch from 3dcb4e4 to 24b67e0 Compare January 27, 2025 03:03
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants