GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Ensure that HACL* states are not read concurrently · Issue #155835 · python/cpython

Ensure that HACL* states are not read concurrently #155835

New issue
Copy link
New issue
Copy link
Closed
Closed
Ensure that HACL* states are not read concurrently#155835
Copy link
Assignees
picnixz
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@picnixz
picnixz
opened on Aug 15, 2026
Issue body actions

Bug report

Bug description:

Sometimes, it's possible to read an HACL* state concurrently:

  • sha3 reads the live HACL state outside the object lock at six sites
  • blake2's digest_size getter reads the live HACL state outside the lock

Instead, we can (1) add this static information just after construction (2) compute it inside the lock sections. The problem is that HACL* update() functions update the entire state so reading static information is unsafe.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-155835: fix digest_size and block_size data races on SHA-3 objects #155838
  • gh-155835: fix digest_size data race on BLAKE-2 objects #155839
  • [3.15] gh-155835: fix digest_size and block_size data races on SHA-3 objects (GH-155838) #157038
  • [3.14] gh-155835: fix digest_size and block_size data races on SHA-3 objects (GH-155838) #157039
  • [3.13] gh-155835: fix digest_size and block_size data races on SHA-3 objects (GH-155838) #157041

Activity

  1. picnixz
    self-assigned this
    on Aug 15, 2026
  2. picnixz
    added a parent issue on Aug 15, 2026
    • Meta-issue for bugs in cryptographic extension modules #155438
  3. picnixz
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    on Aug 15, 2026
  4. picnixz
    added 4 commits that reference this issue on Aug 15, 2026

    pythongh-155835: fix `digest_size` and `block_size` data races on SHA…

    45ec585

    pythongh-155835: fix `digest_size` and `block_size` data races on SHA…

    3cfdc82

    pythongh-155835: fix `digest_size` and `block_size` data races on SHA…

    2b6c740

    pythongh-155835: fix `digest_size` data race on BLAKE-2 objects

    194cdab
  5. picnixz
    added 2 commits that reference this issue on Sep 6, 2026

    gh-155835: fix `digest_size` and `block_size` data races on SHA-3 obj…

    90ac539

    gh-155835: fix `digest_size` data race on BLAKE-2 objects (#155839)

    878b5e2
  6. clin1234
    added 2 commits that reference this issue on Sep 12, 2026

    pythongh-155835: fix `digest_size` and `block_size` data races on SHA…

    6a3f68a

    pythongh-155835: fix `digest_size` data race on BLAKE-2 objects (pyth…

    5fa935d
  7. Yhg1s
    added a commit that references this issue on Sep 29, 2026

    [3.13] gh-155835: fix `digest_size` and `block_size` data races on SH…

    33a6511
  8. encukou
    added a commit that references this issue on Oct 12, 2026

    [3.15] gh-155835: fix `digest_size` and `block_size` data races on SH…

    f7662fa
  9. encukou
    closed this as completedon Oct 12, 2026
  10. encukou
    added a commit that references this issue on Oct 12, 2026

    [3.14] gh-155835: fix `digest_size` and `block_size` data races on SH…

    1fdd1dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @picnixz
    picnixz

Labels

extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.