[PATCH] Align GSS and TLS error handling in PQconnectPoll() - Mailing list pgsql-hackers

From Jacob Champion
Subject [PATCH] Align GSS and TLS error handling in PQconnectPoll()
Date
Msg-id 23787477-5fe1-a161-6d2a-e459f74c4713@timescale.com
Whole thread Raw
Responses Re: [PATCH] Align GSS and TLS error handling in PQconnectPoll()
List pgsql-hackers
Hi all,

During the gssencmode CVE discussion, we noticed that PQconnectPoll()
handles the error cases for TLS and GSS transport encryption slightly
differently. After TLS fails, the connection handle is dead and future
calls to PQconnectPoll() return immediately. But after GSS encryption
fails, the connection handle can still be used to reenter the GSS
handling code.

This doesn't appear to have any security implications today -- and a
client has to actively try to reuse a handle that's already failed --
but it seems undesirable. Michael (cc'd) came up with a patch, which I
have attached here and will register in the CF.

Thanks,
--Jacob
Attachment

pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Making Vars outer-join aware
Next
From: Jeff Davis
Date:
Subject: Re: ICU locale validation / canonicalization