Skip to content

write_target TOCTOU between check and write (documented) #151

Open

Description

@guijacquemet

Finding (as written in the restart doc, ChatGPT batch 3): the write_target TOCTOU (time-of-check to time-of-use) is documented but not fixed.

Suggested fix: create the target atomically (exclusive create or write to a temporary file in the same directory followed by an atomic rename after the final check), or keep the documented limit and add a test that states it. Decide with the owner before changing the contract.

Source: ChatGPT audit batch 3 (core), 2026-11-04; restart doc "Batch 3 FILE items".

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions