-
Notifications
You must be signed in to change notification settings - Fork 167
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
CVE-2022-0759 VULNERABILITY: Config
defaults to VERIFY_NONE
when kubeconfig doesn't specify custom CA - autoclosed
#554
Comments
This was broken IN ALL RELEASES MADE BEFORE 2022. I'm releasing a 4.9.3 with fix today. |
@lnacshonredhat (or anyone else who knows): can you help describe the impact when using client-certificate auth? My partial understanding:
|
✔️ 4.9.3 released on rubygems. |
Tiny followup to ManageIQ#556. Sorry for noise, had these locally but forgot to push before merging. If I start backporting, CHANGELOG.md on master branch might not always be updated with all backports (it SHOULD, but it will require separate merges to master). So I prefer pointing to the vulnerability issue as the "source of truth". Also, security impact will be better discussed on the issue.
See ManageIQ/kubeclient#554, I fixed an embarrasing vulnerability in Kubeclient::Config — it could wrongly set `VERIFY_NONE`, allowing man-in-the-middle attacks and stealing cluster credentials 😳 And I see this repo does use `Kubeclient::Config.read`. kubeclient generally obeys SemVer, so upgrading 4.6.z to 4.9.z should be safe. OTOH if you think upgrading is tricky, let us know on that kubeclient issue, we can backport the fix! @harshit-splunk @rockb1017 I see several of fluent-plugin-* gems depend on '~> 4.6.0', and more than one are maintained by Splunk — I'm not going to send PRs to them all, please spread the word.
Do we need more backports? So I'm thinking releasing 4.6.1 and 4.7.1 may be useful? (and then maybe 4.8.1 just to avoid situation where upgrading causes regression?) I also see some really old versions like 1.1.4 still getting used. Somewhat silly, but the fix commit itself (without tests) is trivially backportable. How far should I go? |
Config
defaults to VERIFY_NONE
when kubeconfig doesn't specify custom CAConfig
defaults to VERIFY_NONE
when kubeconfig doesn't specify custom CA
Hi, I see your code uses `Kubeclient::Config.read("#{ENV['HOME']}/.kube/config")`. 4.9.3 fixed a severe issue in Config — ManageIQ/kubeclient#554 I did not test this but generally kubeclient obeys semver, AFAIK 4.9 remains backwards-compatible with 4.1.
Hi, I see your code uses `Kubeclient::Config.read(ENV['KUBECONFIG'])`. 4.9.3 fixed a severe issue in Config, in some scenarios causing insecure VERIFY_NONE connections that may leak cluster credentials — ManageIQ/kubeclient#554 Your dependency range already allowed 4.9.3 but it's safer to disallow the older versions.
4.9.3 fixed [CVE-2022-0759 in `Kubeclient::Config`](ManageIQ/kubeclient#554), which I see you do use, at least in `create_client_from_config`. Current "~> 4.3" range already allows 4.9.x but safer to force it as minimum.
4.9.3 fixed [CVE-2022-0759 in `Kubeclient::Config`](ManageIQ/kubeclient#554), which I see you do use, at least in `create_client_from_config`. Current "~> 4.3" range already allows 4.9.x but safer to force it as minimum.
✔️ This issue was automatically closed by Mend because the vulnerable library in the specific branch(es) was either marked as ignored or it is no longer part of the Mend inventory. |
Config
defaults to VERIFY_NONE
when kubeconfig doesn't specify custom CAConfig
defaults to VERIFY_NONE
when kubeconfig doesn't specify custom CA - autoclosed
@agrare is this "Mend" bot part of the standard setup in manageiq org? In this case, the issue has been fixed in a released version of kubeclient, so we can keep this closed. |
Yes, mend is the new name for whitesource, so this is the whitesource bot - I'm as surprised as you are that they closed an issue they didn't own. I presume because it said
We can reopen if you want...it's up to you |
Can we add this issue / release to the Edit: Nevermind, I see that this is an older issue. I was trying to find our what changed in 4.10.0 ... |
Thes one i believe is covered in https://github.com/ManageIQ/kubeclient/blob/master/CHANGELOG.md#493-2021-03-23 4.10 - ah good catch, it's only described on v4.y branch: |
this was assigned CVE-2022-0759
Dangerous bug present ever since
Kubeclient::Config
was created:Whenever kubeconfig did not define custom CA (normal situation for production clusters with public domain and certificate!),
Config
was returning ssl_options[:verify_ssl] hard-coded toVERIFY_NONE
:-(Assuming you passed those ssl_options to Kubeclient::Client, this means that instead of checking server's certificate against your system CA store, it would accept ANY certificate, allowing easy man-in-the middle attacks.
This is especially dangerous with user/password or token credentials because MITM attacker could simply steal those credentials to the cluster and do anything you could do on the cluster.
Tightly related to #555, I'm fixing them together. This ticket is about the dangerous default, #555 is about inability to override it.
The text was updated successfully, but these errors were encountered: