Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling TLS via users.ldap disables peer checking #27506

Closed
grahamc opened this issue Jul 19, 2017 · 10 comments
Closed

Enabling TLS via users.ldap disables peer checking #27506

grahamc opened this issue Jul 19, 2017 · 10 comments

Comments

@grahamc
Copy link
Member

grahamc commented Jul 19, 2017

If someone enables TLS in users.ldap, our module turns off TLS peer checking. This must not be the default behavior, and should be changed ASAP. Not sure if we can apply this to stable or not.

https://github.com/NixOS/nixpkgs/blob/release-17.03/nixos/modules/config/ldap.nix#L20-L23

or pinned for time:

${optionalString config.users.ldap.useTLS ''
ssl start_tls
tls_checkpeer no
''}

@grahamc
Copy link
Member Author

grahamc commented Jul 19, 2017

cc @fpletz @domenkozar

@fpletz fpletz added this to the 17.03 milestone Jul 19, 2017
@fpletz
Copy link
Member

fpletz commented Jul 19, 2017

This has to be fixed for stable. We might break setups, but that's acceptable in this case IMHO. We have to send an advisory to nix-devel and nix-security to inform our users though.

@grahamc Do you intend to fix this? I can handle this or support you.

@grahamc
Copy link
Member Author

grahamc commented Jul 19, 2017

I'm working on a patch.

@grahamc
Copy link
Member Author

grahamc commented Jul 19, 2017

master: 2b2a6f2

@grahamc
Copy link
Member Author

grahamc commented Jul 19, 2017

17.03: b3fa629

@grahamc grahamc changed the title Enabling TLS in users.ldap disables peer checknig Enabling TLS via users.ldap disables peer checking Jul 20, 2017
@grahamc
Copy link
Member Author

grahamc commented Jul 20, 2017

Addressed, announced, and mail sent to oss-security. Working on a CVE.

@fpletz
Copy link
Member

fpletz commented Jul 21, 2017

CVE-2017-11501 has been assigned to this vulnerability.

@fpletz fpletz closed this as completed Jul 21, 2017
@nbp
Copy link
Member

nbp commented Jul 22, 2017

Would it be possible to write a test case for this issue, such that it does not appear again in the future?

@grahamc
Copy link
Member Author

grahamc commented Jul 22, 2017

I'm sure it could be done, @nbp :) I don't know LDAP though. Can you do it?

@nbp
Copy link
Member

nbp commented Jul 22, 2017

I don't know much about LDAP, but I think the in the worse case we could assert that the line is not present in the final content of the configuration file. Still, I don't think we have any failing test case in NixOS at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants