Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-73170

Ensure correct fips.so checksum calculation

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhel-10.0
    • CentOS Stream 10
    • openssl
    • openssl-3.2.2-15.el10
    • No
    • Important
    • 1
    • rhel-sst-security-crypto
    • ssg_security
    • 26
    • 0.2
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • Crypto25Q1
    • Hide

      AC1) The command "OPENSSL_FORCE_FIPS_MODE=1 openssl dgst -sha256 <some file>" is not throwing any errors on fedora and centos (integrity verified).

      Show
      AC1) The command "OPENSSL_FORCE_FIPS_MODE=1 openssl dgst -sha256 <some file>" is not throwing any errors on fedora and centos (integrity verified).
    • Pass
    • Not Needed
    • Manual
    • Unspecified Release Note Type - Unknown
    • None

      We came across the rpmbuild behavior change.

      Preamble. We embed checksum in our fips-certified binaries in a specially created section of the so files. Before calculation the block is initialized by zeros at compilation time and then the correct checksum is embedded, replacing the zeroes by the calculated value.

      The embedding procedure is done twice: for the locally built fips.so and for the fips.so copied to buildroot after strip/extracting the debuginfo. The package native tests are run from %check with the locally built ones and must succeed to build the package.

      Recently (between the end of September 2024 and Jan 2025) the behavior of rpmbuild has changed. Old behavior was copying the built files to the buildroot before embedding the checksum (before %check?). Now the files are copied after embedding the checksum. So the checksum block is not zeroized anymore and checksum verification is failing.

      We need to zeroize the checksum section in the buildroot before calculating the checksum, so the state becomes predictable.

              dbelyavs@redhat.com Dmitry Belyavskiy
              dbelyavs@redhat.com Dmitry Belyavskiy
              Dmitry Belyavskiy Dmitry Belyavskiy
              George Pantelakis George Pantelakis
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: