Skip to content

testAndSet race condition causes duplicate target processing #2457

@Mzack9999

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.

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