Skip to content

pluginDir read-modify-write TOCTOU (otp, capability, shortlink, activitypub) #4

Open

Description

@melvincarvalho

The pluginDir JSON writes are now atomic (temp + rename, commit ca52373). But two concurrent request handlers can still interleave read → modify → write and lose one update: e.g. two capability revocations, two OTP mints, two shortlink claims, or two AP inbox pushes racing.

Distinct from the atomicity fix (which prevents torn files) and from core #600 (the host's own conditional-write non-atomicity).

Fix direction: a per-key (or per-file) async lock / serialized write queue around the read-modify-write. Low impact at scratch scale; accepted-risk in SECURITY.md.

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

    securitySecurity finding or hardening

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions