Skip to content

security: detect owner locks across every Codex home #10

Closed

Description

@abruption

Problem

lockFilesOpenedByProcess() currently filters open lock files to the selected CODEX_HOME/thread-writer-locks directory. A Codex process can hold native thread locks from another default, configured, or Orca Codex home without those locks being counted.

Security impact

The owner may be reported as holding exactly one thread lock even though it owns additional locks in another Codex home. Sending SIGTERM would then affect unrelated threads.

Required behavior

Determine all native Codex thread-writer lock files opened by the candidate PID across known and discovered Codex homes. Unlock must proceed only when the complete set contains exactly the intended lock.

Canonicalize directories and paths without following an attacker-controlled lock-file symlink as trusted evidence. Unreadable or ambiguous home inventories must fail closed.

Tests

Cover:

  • one PID holding locks in two different Codex homes
  • default and Orca account homes
  • duplicate/hard-linked rollout files that do not imply duplicate locks
  • unreadable or unresolved candidate home paths
  • one-lock happy path remaining permitted

Activity

  1. added
    bug
    on Sep 20, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions