Skip to content

testAndSet race condition causes duplicate target processing #2457

Closed

Description

@Mzack9999

testAndSet in runner.go does a non-atomic check-then-set: it calls seen(k) and then setSeen(k) separately. Under concurrent access (e.g. TLS SubjectAN/SubjectCN discovery in processTargets), two goroutines can both pass seen() before either calls setSeen(), resulting in the same target being processed twice.

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