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

test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot #88214

Closed
stratakis mannequin opened this issue May 5, 2021 · 4 comments
Closed

test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot #88214

stratakis mannequin opened this issue May 5, 2021 · 4 comments
Assignees
Labels
3.10 only security fixes 3.11 only security fixes topic-SSL

Comments

@stratakis
Copy link
Mannequin

stratakis mannequin commented May 5, 2021

BPO 44048
Nosy @tiran, @stratakis, @pablogsal, @miss-islington, @shreyanavigyan
PRs
  • bpo-44048: Fix two hashlib test cases under FIPS mode #26470
  • [3.10] bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) #26531
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/tiran'
    closed_at = <Date 2021-06-04.16:48:20.701>
    created_at = <Date 2021-05-05.11:09:23.288>
    labels = ['expert-SSL', '3.10', '3.11']
    title = 'test_hashlib failure for "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot'
    updated_at = <Date 2021-06-04.18:38:09.877>
    user = 'https://github.com/stratakis'

    bugs.python.org fields:

    activity = <Date 2021-06-04.18:38:09.877>
    actor = 'pablogsal'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2021-06-04.16:48:20.701>
    closer = 'pablogsal'
    components = ['SSL']
    creation = <Date 2021-05-05.11:09:23.288>
    creator = 'cstratak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44048
    keywords = ['patch']
    message_count = 4.0
    messages = ['393003', '393015', '395104', '395110']
    nosy_count = 5.0
    nosy_names = ['christian.heimes', 'cstratak', 'pablogsal', 'miss-islington', 'shreyanavigyan']
    pr_nums = ['26470', '26531']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44048'
    versions = ['Python 3.10', 'Python 3.11']

    @stratakis
    Copy link
    Mannequin Author

    stratakis mannequin commented May 5, 2021

    The buildbot started experiencing some failures. First after ddbef71 this test started failing with:

    ======================================================================
    ERROR: test_disallow_instantiation (test.test_hashlib.HashLibTestCase)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 160, in __hash_new
        return _hashlib.new(name, data, **kwargs)
    ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 912, in test_disallow_instantiation
        h = constructor()
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 133, in _test_algorithm_via_hashlib_new
        return hashlib.new(_alg, **kwargs)
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 166, in __hash_new
        return __get_builtin_constructor(name)(data)
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 123, in __get_builtin_constructor
        raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type md5

    And then after 91554e4 there is another failure:

    ======================================================================
    ERROR: test_readonly_types (test.test_hashlib.HashLibTestCase)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 160, in __hash_new
        return _hashlib.new(name, data, **kwargs)
    ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 933, in test_readonly_types
        hash_type = type(constructor())
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_hashlib.py", line 133, in _test_algorithm_via_hashlib_new
        return hashlib.new(_alg, **kwargs)
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 166, in __hash_new
        return __get_builtin_constructor(name)(data)
      File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/hashlib.py", line 123, in __get_builtin_constructor
        raise ValueError('unsupported hash type ' + name)
    ValueError: unsupported hash type md5

    @stratakis stratakis mannequin added 3.10 only security fixes 3.11 only security fixes labels May 5, 2021
    @stratakis stratakis mannequin assigned tiran May 5, 2021
    @stratakis stratakis mannequin added topic-SSL 3.10 only security fixes 3.11 only security fixes labels May 5, 2021
    @stratakis stratakis mannequin assigned tiran May 5, 2021
    @stratakis stratakis mannequin added the topic-SSL label May 5, 2021
    @shreyanavigyan
    Copy link
    Mannequin

    shreyanavigyan mannequin commented May 5, 2021

    The errors are occurring because the code before these commits checked whether those algorithms were present or not. If an algorithm was not present it was not tested. The new code doesn't check and therefore if even one of the algorithm modules are not present raises an error.

    @pablogsal
    Copy link
    Member

    New changeset a46c220 by stratakis in branch 'main':
    bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470)
    a46c220

    @pablogsal
    Copy link
    Member

    New changeset 3f4d801 by Miss Islington (bot) in branch '3.10':
    bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) (GH-26531)
    3f4d801

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes topic-SSL
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants