Re: Post-CVE Wishlist

Поиск
Список
Период
Сортировка
От Jacob Champion
Тема Re: Post-CVE Wishlist
Дата
Msg-id 2d65283ca63d7e8b136c891225334c33a66f91e1.camel@vmware.com
обсуждение исходный текст
Ответ на Re: Post-CVE Wishlist  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
On Fri, 2021-12-10 at 15:43 +0200, Heikki Linnakangas wrote:
> ProcessStartupPacket() currently reads the first 4 bytes coming from the 
> client to decide what kind of a connection it is, and I believe a TLS 
> ClientHello message always begins with the same sequence of bytes, so it 
> would be easy to check for.
> 
> You could use recv(.., MSG_PEEK | MSG_WAITALL) flags to leave the bytes 
> in the OS buffer. Not sure how portable that is, though. Alternatively, 
> you could stash them e.g. in a global variable and modify 
> secure_raw_read() to return those bytes first.
> 
> Overall, doesn't seem very hard to me.

After further thought... Seems like sharing a port between implicit and
explicit TLS will still allow a MITM to put bytes on the wire to try to
attack the client-to-server communication, because they can craft the
SSLRequest themselves and then hand it off to the real client.

But they shouldn't be able to attack the server-to-client communication
if the client is using implicit TLS, so it's still an overall
improvement? I wonder if there are any other protocols out there doing this.

--Jacob

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: row filtering for logical replication
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Apple's ranlib warns about protocol_openssl.c