[IP] Don't reference uninitialized PCB to avoid BSOD. CORE-18982

transport calls to LibTCPConnect that suffer certain early failures
like parameter errors or early route lookup failures return without
initializing the pcb.
In order to avoid later BSOD's this change clears the
ConnectionRequest bucket in those cases.
This commit is contained in:
David L Bean 2023-07-24 13:18:16 -04:00 committed by Thomas Faber
parent e5993f13f0
commit f8a6542b15
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -411,7 +411,13 @@ NTSTATUS TCPConnect
Status = TCPTranslateError(LibTCPConnect(Connection,
&connaddr,
RemotePort));
if (!NT_SUCCESS(Status))
{
LockObject(Connection);
RemoveEntryList(&Bucket->Entry);
UnlockObject(Connection);
ExFreeToNPagedLookasideList(&TdiBucketLookasideList, Bucket);
}
TI_DbgPrint(DEBUG_TCP,("[IP, TCPConnect] Leaving. Status = 0x%x\n", Status));
return Status;