Files
node/lib
Fedor Indutny 94571c1001 tls: emit session after verifying certificate
Prior to this patch `session` event was emitted after `secure` event on
TLSSocket, but before `secureConnect` event. This is problematic for
`https.Agent` because it must cache session only after verifying the
remote peer's certificate.

Connecting to a server that presents an invalid certificate resulted
in the session being cached after the handshake with the server and
evicted right after a certifiate validation error and socket's
destruction. A request initiated during this narrow window would pick
the faulty session, send it to the malicious server and skip the
verification of the server's certificate.

Fixes: https://hackerone.com/reports/811502
CVE-ID: CVE-2020-8172
PR-URL: https://github.com/nodejs-private/node-private/pull/200
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-06-02 15:56:40 +02:00
..
2020-02-18 22:15:50 -08:00
2019-12-17 08:11:13 -05:00
2020-05-11 09:57:46 -07:00
2020-05-16 12:52:06 -07:00
2020-05-16 12:52:06 -07:00
2018-11-20 10:42:31 -08:00
2020-05-16 12:52:06 -07:00
2020-03-09 12:44:16 +01:00
2020-05-04 14:23:19 +02:00
2020-05-19 11:30:54 -07:00
2020-04-14 11:04:56 +01:00
2019-12-11 16:38:06 -06:00
2020-05-16 12:52:06 -07:00
2020-05-16 12:52:06 -07:00
2020-05-16 12:52:06 -07:00