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

hashlib.MD5 is working on FIPS enabled system #123112

Closed
bnaigaonkar opened this issue Aug 17, 2024 · 2 comments
Closed

hashlib.MD5 is working on FIPS enabled system #123112

bnaigaonkar opened this issue Aug 17, 2024 · 2 comments

Comments

@bnaigaonkar
Copy link

bnaigaonkar commented Aug 17, 2024

Bug report

Bug description:

On FIPS Enabled system, hashlib.MD5 is working which is against the FIPS compliance, we found below note in the official document, https://docs.python.org/3/library/hashlib.html

hashlib.algorithms_guaranteed
A set containing the names of the hash algorithms guaranteed to be supported by this module on all platforms. Note that ‘md5’ is in this list despite some upstream vendors offering an odd “FIPS compliant” Python build that excludes it.

Can anyone explain what is the meaning of above note in detail ?

CPython versions tested on:

3.11

Operating systems tested on:

Debian Linux

@bnaigaonkar bnaigaonkar added the type-bug An unexpected behavior, bug, or error label Aug 17, 2024
@picnixz
Copy link
Member

picnixz commented Aug 17, 2024

Related: #118224 (or perhaps a duplicate?)

cc @encukou

@picnixz picnixz added the pending The issue will be closed if no feedback is provided label Aug 17, 2024
@encukou
Copy link
Member

encukou commented Aug 19, 2024

You should raise this issue with whoever certified your system for FIPS compliance. Python itself is not “FIPS compliant”, though it provides some tools to make it easier to build such systems. (That usually means disabling things -- reducing usability.)
Specifically, you could use the --with-builtin-hashlib-hashes configure option to build without the bundled md5 library.

A set containing the names of the hash algorithms guaranteed to be supported by this module on all platforms. Note that ‘md5’ is in this list despite some upstream vendors offering an odd “FIPS compliant” Python build that excludes it.

That means that some re-distributors offer changed versions of CPython, where they disable md5 functionality but keep it in the algorithms_guaranteed list.
(Nowadays it's better if they don't disable md5 entirely, but rely on the usedforsecurity argument being passed on to OpenSSL. And then audit uses of usedforsecurity in all Python software on the system.)

Related: #118224 (or perhaps a duplicate?)

Yes, that's a duplicate, and it has more info, so I'll close this one. Thanks for triaging!

@encukou encukou closed this as completed Aug 19, 2024
@picnixz picnixz closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2024
@picnixz picnixz removed type-bug An unexpected behavior, bug, or error pending The issue will be closed if no feedback is provided labels Aug 19, 2024
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

No branches or pull requests

3 participants