plus3it / plus3it/amigen8

[BUG] FIPS Mode Isn't REALLY Disabled When --no-fips Flag Is Set

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Shell
Stars
10
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

While doing:

$ cat /proc/sys/crypto/fips_enabled

On an EC2 built from an AMI created using the --no-fips flag will correctly result in a 0 output, executing:

update-crypto-policies --show

Will still show:

FIPS

Note: This issue was uncovered after using the Cross-Distro Bootstrap instructions to produce an OL8 AMI. Packer's (current) inability to negotiate SSH connections on FIPS-enabled instances was on full display when attempting to provision the resulting EC2.

Severity

  • Completely Broken (No work-around evident)
  • Severely Broken (Work-around possible but difficult)
  • Moderately Broken (Trivial work-around)
  • Nuisance (Functions but untrapped errors can slip through)

To Reproduce
Steps to reproduce the behavior:

  1. Create an AMI using the PostBuild.sh script's --no-fips flag
  2. Launch an EC2 from the resulting AMI
  3. Login to the EC2
  4. Execute FIPS-mode steps as described above to see the incorrect/inconsistent FIPS-state

Expected behavior

FIPS is fully and completely disabled within EC2s launched from AMIs built by passing the --no-fips flag to the PostBuild.sh script

Deviance Description

FIPS is only partially disabled (see opening bug description) within EC2s launched from AMIs built by passing the --no-fips flag to the PostBuild.sh script

Screenshots

Additional context

Fix Suggestions

Ensure that the PostBuild.sh script's --no-fips logic includes an execution of:

update-crypto-policies --set DEFAULT

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the PostBuild.sh handling for the --no-fips flag and review the reported state with /proc/sys/crypto/fips_enabled and update-crypto-policies --show. Ensure the resulting EC2 instance reports FIPS as disabled in both checks, including after launching an AMI built with --no-fips.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, shell
Domain
cloud, infrastructure, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.