[IP]
authorThomas Faber <thomas.faber@reactos.org>
Wed, 10 Aug 2016 10:28:28 +0000 (10:28 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Wed, 10 Aug 2016 10:28:28 +0000 (10:28 +0000)
- Only accept an incoming connection on one listening socket, not all. Fixes use after free when multiple connection endpoints are assigned the same PCB.
CORE-11649 #resolve

svn path=/trunk/; revision=72183

reactos/sdk/lib/drivers/ip/transport/tcp/event.c

index 8c33518..1d9918c 100644 (file)
@@ -345,6 +345,11 @@ TCPAcceptEventHandler(void *arg, PTCP_PCB newpcb)
         DereferenceObject(Bucket->AssociatedEndpoint);
         
         CompleteBucket(Connection, Bucket, FALSE);
+
+        if (Status == STATUS_SUCCESS)
+        {
+            break;
+        }
     }
     
     DereferenceObject(Connection);