NSS defaults to allowing RFC 5746 client-initiated renegotiation. During a review of a new 389ds instance, the security auditor noted that repeated renegotiation could be used as a denial of service attack against the server, and recommended looking into disabling it. Looking at NSS, it's a simple option setting to disable renegotiation, so it'd be nice to expose this as an option in 389ds.
Checked for support in RHEL 7.3 389-ds-base-1.3.5.10-21.el7_3, and upstream source HEAD, no support found.
I'm working on a patch and test case for this.
<img alt="0001-Ticket-49303-Add-option-to-disable-TLS-client-initia.patch" src="/389-ds-base/issue/raw/7cd5258e54a8bce2f8fa44668e174256bd1cb23fbbf1ede0a3f82157165221e5-0001-Ticket-49303-Add-option-to-disable-TLS-client-initia.patch" />
Hey mate, thanks for your patch. It looks really good. Of course, I have some comments though.
I think the parameter nsSSLRenegotiate isn't a good name. We should probably call this either nsTLSAllowClientRenegotiation to make it clearer as to the intent of the variable.
You do some manual LDAP setup for TLS on the server. Perhaps look at this test case as an idea to make this briefer? https://pagure.io/lib389/blob/master/f/lib389/tests/tls_external_test.py#_21
Note the use of the rsa/config modules - they accept a generic get/set (attr, val) api, so this should make things nicer for you.
Try to avoid the NSPR PRtypes. I wish to remove them from the server. I'd rather see this as int_fast16_t or similar.
With your check you have:
200 + if (!PL_strcasecmp(val, "off")) { 201 + renegotiation = SSL_RENEGOTIATE_NEVER; 202 + } else if (PL_strcasecmp(val, "on")) { 203 + slapd_SSL_warn("The value of nsSSLRenegotiate (\"%s\") is invalid." 204 + " Ignoring it and setting it to default.", val); 205 + }
The issue with this is that what if the value is "bob"?. If it was me, I would make this logic:
if (val == 'on') { } else { // assume off }
Finally, can we give the 01core389.ldif schema DESC a better value? Describe briefly what the atr controls, IE "this controls allowing RFC 5746 client renegotiation" would suffice :) we plan to expose these desc's via the CLI later as help basically.
I hope that these comments help you, and again, thanks for your work on this feature!
Metadata Update from @firstyear: - Custom field type adjusted to defect
Metadata Update from @mreynolds: - Issue set to the milestone: 1.3.7.0
<img alt="0001-Ticket-49303-Add-option-to-disable-TLS-client-initia.patch" src="/389-ds-base/issue/raw/e50bbe7910c37b7b44c26103b97be5dacb04ce29f01b6b0e7b8f3164c1ed9b16-0001-Ticket-49303-Add-option-to-disable-TLS-client-initia.patch" />
New version of the patch:
I've not changed the check logic because I think it's correct as-is, but I've put a comment block in to make it clearer what I'm trying to do. An invalid value results in the default setting being used (allow reneg), and the warning message, and this is tested for in the test case.
Thanks for the feedback!
commit 7c9c39e To ssh://git@pagure.io/389-ds-base.git 7efc2d2..7c9c39e master -> master
Metadata Update from @firstyear: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Thanks for the patch, it's much appreciated!
Issue in CI test broken jenkins nightly CI testing.
a8628e2..1301db4 master -> master
<img alt="0001-Ticket-49303-Fix-error-in-CI-test.patch" src="/389-ds-base/issue/raw/48aa66ecae427f36b07371b89ce0286d8675c2d17c3677328524c8a21911920b-0001-Ticket-49303-Fix-error-in-CI-test.patch" />
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/2362
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Log in to comment on this ticket.