Skip to content

fix: hashlib.md5 FIPS crash in context_compressor.py - #588

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56715
Open

fix: hashlib.md5 FIPS crash in context_compressor.py#588
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56715

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Summary

hashlib.md5() in context_compressor.py is used for content deduplication (hashing tool outputs to detect duplicates). On FIPS-enabled systems (RHEL 8/9, CentOS with FIPS mode), this raises:

ValueError: EVP_DigestInit_ex disabled for FIPS

Root Cause

Line 1229 calls hashlib.md5() without usedforsecurity=False. OpenSSL in FIPS mode rejects MD5 for any use unless explicitly marked as non-security.

Fix

Added usedforsecurity=False parameter to the hashlib.md5() call. This hash is used solely for content deduplication — no security implications.

Changes

  • agent/context_compressor.py: hashlib.md5(...)hashlib.md5(..., usedforsecurity=False)

Test Plan

  • Lint passes
  • Verify on FIPS-enabled system (RHEL 8/9)

Mirror-of: NousResearch#56715
NousResearch#56715

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.

1 participant