Reject extraneous data after SSL encryption handshake.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Wed, 17 Nov 2021 10:26:11 +0000 (19:26 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Wed, 17 Nov 2021 10:26:11 +0000 (19:26 +0900)
commitf644f6ecd53a62fbd6880cd1fc1049177089b1ff
tree8e33ecf86b2900264895bd50d0878de0ad59f849
parent4df1c11fa00f8ab863858985293bbfa490a4000c
Reject extraneous data after SSL encryption handshake.

In the server side implementation of SSL negotiation
(pool_ssl_negotiate_serverclient()), it was possible for a
man-in-the-middle attacker to inject arbitrary SQL commands. This is
possible if Pgpool-II is configured to use cert authentication or
hostssl + trust. This resembles PostgreSQL's CVE-2021-23214.

Similarly, in the client side implementation of SSL negotiation
(pool_ssl_negotiate_clientserver()), it was possible for a
man-in-the-middle attacker to inject arbitrary responses. This is
possible if PostgreSQL is using trust authentication with a clientcert
requirement. It is not possible with cert authentication because
Pgpool-II does not implement the cert authentication between Pgpool-II

To fix these reject extraneous data in the read buffer after SSL
encryption handshake.
and PostgreSQL. This resembles PostgreSQL's CVE-2021-23222.
src/utils/pool_ssl.c