The vulnerability CVE-2026-70197 is described as an out-of-bounds write occurring during ReceiveFromAsync when a SocketAsyncEventArgs instance is reused across IPv4 and IPv6 datagram sockets. The core issue is the retention of an undersized cached native address buffer.
My analysis focused on identifying the specific function responsible for initiating this vulnerable operation. By examining the dotnet/runtime repository's source code for System.Net.Sockets.Socket and System.Net.Sockets.SocketAsyncEventArgs, I confirmed that System.Net.Sockets.Socket.ReceiveFromAsync is the method that takes a SocketAsyncEventArgs instance and orchestrates the receive operation, including the handling of the remote endpoint's address.
While Socket.ReceiveFromAsync attempts to serialize the RemoteEndPoint into e._socketAddress and then pins this buffer, the vulnerability description points to a 'cached native address buffer' that remains undersized. This suggests that either the _socketAddress buffer itself, or a related native buffer managed by the underlying Windows API calls (likely initiated by internal ReceiveFromAsyncCore methods), is not being properly re-allocated or re-sized when the SocketAsyncEventArgs instance is reused with a different address family (e.g., from IPv4 to IPv6). This mismatch in buffer size and incoming data size leads to the out-of-bounds write. Therefore, System.Net.Sockets.Socket.ReceiveFromAsync is the function that directly triggers the vulnerable code path.