Skip to content

Fix pulp_hashlib.new() on FIPS systems#7438

Closed
kush-gupt wants to merge 1 commit into
pulp:mainfrom
kush-gupt:fix/fips-hashlib
Closed

Fix pulp_hashlib.new() on FIPS systems#7438
kush-gupt wants to merge 1 commit into
pulp:mainfrom
kush-gupt:fix/fips-hashlib

Conversation

@kush-gupt
Copy link
Copy Markdown

Summary

  • Add usedforsecurity=False to pulp_hashlib.new() so FIPS-disallowed algorithms (e.g. md5, sha1) used for content addressing no longer raise UnsupportedDigestmodError.
  • All hashes from this wrapper are for content addressing (storage paths, dedup, manifest IDs), never for cryptographic security. setdefault preserves any explicit usedforsecurity=True a caller might pass.
  • Validated on a FIPS-enabled RHEL 9.7 VM running Satellite 6.18: manifest upload returned UnsupportedDigestmodError before the fix, HTTP 201 after.

Checklist

closes #7434

See also: pulp/pulp_container#2256

Made with Cursor

Pass usedforsecurity=False to hashlib.new() since all
hashes produced by this wrapper are used for content
addressing (storage paths, dedup, manifest IDs), never
for cryptographic security.

closes pulp#7434

Signed-off-by: Kush Gupta <kushalgupta@gmail.com>
Made-with: Cursor
@daviddavis
Copy link
Copy Markdown
Contributor

I don't think this change is necessary. I think the Satellite RPMs ship a patch that sets usedforsecurity=True as needed.

That said, it's been a very long time since I worked on this so maybe things have changed.

@kush-gupt
Copy link
Copy Markdown
Author

Closing this — @daviddavis is right, Satellite already ships a downstream patch for pulp_hashlib that handles md5 with usedforsecurity=False. Re-verified on a FIPS RHEL 9.7 VM: the pulp_container fix alone (pulp/pulp_container#2258) is sufficient. Thanks for the pointer!

@kush-gupt kush-gupt closed this Mar 10, 2026
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.

pulp_hashlib.new() fails on FIPS systems for non-security hashes

2 participants