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

fix intermittent openssl FIPS selftest failures in jitterentropy #9890

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

tobiasb-ms
Copy link
Contributor

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • If you are adding/removing a .spec file that has multiple-versions supported, please add @microsoft/cbl-mariner-multi-package-reviewers team as reviewer (Eg. golang has 2 versions 1.18, 1.21+)
  • Ready to merge

Summary

Openssl fails intermittently -- around 1/10K runs -- during boot on FIPS-enabled machines. This turned out to be a subtle bug in the jitterentropy module. From the patch file comments:

Ocassionally, the jitterentropy module was failing the FIPS self-test because it was unable to create sufficient entropy. This was due to two main reasons:

A memory buffer was not being initialized in the jent_time_entropy_init function. This buffer is used to add variations based on memory access to the entropy pool.

The OSR value was being set to 1, rather than the standard minimum of 3. Since this affects the threshold for number of times the allows itself to attempt to generate entropy before failing out, this made the issue more likely to occur.

This patch initializes that buffer and enforces the standard minmum OSR value.

Change Log
  • Add patch file to fix intermittent issue in jitterentropy.
  • Bump version, etc.
Does this affect the toolchain?

YES

Test Methodology

@tobiasb-ms tobiasb-ms requested a review from a team as a code owner July 19, 2024 17:56
@microsoft-github-policy-service microsoft-github-policy-service bot added the main PR Destined for main label Jul 19, 2024
@tobiasb-ms tobiasb-ms merged commit 297b90e into main Jul 23, 2024
10 checks passed
@tobiasb-ms tobiasb-ms deleted the tobiasb/openssl-fix-intermittent-selftest-failure branch July 23, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
main PR Destined for main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants