Closed Bug 1773374 Opened 3 years ago Closed 3 months ago

CERTCertificate leak in ssl3_FillInCachedSID when using a client certificate with TLS 1.3

Categories

(NSS :: Libraries, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: keeler, Assigned: keeler)

References

Details

Attachments

(2 files)

ssl3_FillInCachedSID assigns to sid->localCert without first checking if it has a value. It turns out, when using a client authentication certificate and TLS 1.3, it will already be set, which means this leaks a CERTCertificate. I found a similar situation with tls13_HandleClientHelloPart2 and ss->sec.localCert, but I don't know if it's possible to reach that point and have ss->sec.localCert have a value.

This patch adds a test for connecting with client auth to a server which sends multiple
session tickets.

TODO: Investigate why setting the (unused) callback is necessary to hit the bug.

Attachment #9280329 - Attachment description: Bug 1773374 - avoid leaking localCert if it is already set in ssl3_FillInCachedSID and tls13_HandleClientHelloPart2 r?mt → Bug 1773374 - avoid leaking localCert if it is already set in ssl3_FillInCachedSID r?mt
Priority: P1 → P3
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: