Skip to content

NetworkAddressChange.Unix can start reading from unrelated handles. #64319

@tmds

Description

@tmds

The NetworkAddressChange implementation for Unix has a read loop with a raw handle:

private static unsafe void LoopReadSocket(int socket)
{
while (socket == s_socket)
{
Interop.Sys.ReadEvents(socket, &ProcessEvent);
}
}

Between the condition-check in the while loop, and passing the handle to ReadEvents the handle may be re-used for something other. That means we'll be reading for some one else's file descriptor.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions