Skip to content

context.DeadlineExceeded misclassified as ErrPortClosedOrFiltered, poisoning dial cache #530

@AuditeMarlow

Description

@AuditeMarlow

Bug

dialAllParallel in dialwrap.go treats context.DeadlineExceeded as a permanent error and wraps it as ErrPortClosedOrFiltered. This poisons the shared dial cache — every subsequent connection to that host:port fails immediately for the rest of the scan, even with a fresh context.

The same gap exists for context.Canceled at the final error-classification point, and in DialContext where a deadline-exceeded first connection is returned as a permanent failure instead of being retried.

Impact

Under load, timed-out dial attempts silently block all future connections to affected hosts across all protocol types for the remainder of the scan. This is exacerbated by the JS VM pool starvation bug in nuclei (projectdiscovery/nuclei#6865), which feeds expired contexts into the dialer.

Fix

PR: #529

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