Skip to content

Make Nmap (nsock) more tolerant of disappearing interfaces #3449

Open

Description

@fyodor

We've received some complaints of a scan halting with:

pcap_next_ex() fatal error while reading from pcap: The interface disappeared (error code ERROR_DEVICE_REMOVED/STATUS_DEVICE_REMOVED)

It may just be the network interface temporarily disappearing (like disconnecting from wifi or switching to ethernet when plugging into a docking station). So we may want to try and handle this error more softly, like waiting a bit and trying again, and/or maybe recheck the routing table and switching to the new appropriate interface.

Activity

  1. dmiller-nmap commented on Sep 3, 2026

    @dmiller-nmap

    The immediate fix was 4f7743e, which removes calls to fatal() from Nsock operations involving pcap handles. Instead, errors will be propagated the same way that connect and I/O errors are handled with network sockets. This will prevent transient things like NDIS stack pause events from crashing Nmap scans, but it doesn't fully resolve all complications involving disappearing network connections.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions