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

Use latest oc binary to avoid known CVE issues #2416

Closed
nickboldt opened this issue Nov 26, 2019 · 11 comments
Closed

Use latest oc binary to avoid known CVE issues #2416

nickboldt opened this issue Nov 26, 2019 · 11 comments
Assignees
Labels
area/release-eng Issues or PRs related to the Release Engineering estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects

Comments

@nickboldt
Copy link
Member

/kind enhancement

Which functionality do you think we should update/improve?

Update to newer oc binary to fix known CVE issues.

Why is this needed?

Known CVE issue: https://access.redhat.com/errata/RHSA-2019:3905

Fix: move to atomic-openshift-clients-3.11.154-1.git.0.7a097ad.el7.x86_64.rpm (or newer).

For example:

https://mirror.openshift.com/pub/openshift-v3/clients/ (3.11.156 currently latest)

Alternatively it might be worth considering moving to the oc 4.2 binary instead:

https://mirror.openshift.com/pub/openshift-v4/clients/ocp/ (4.2.8 currently latest)

@mohammedzee1000
Copy link
Contributor

Thanks, I think this also applies to our vendor client-go (occlient) library
/kind bug
/priority medium
@kadel wdyt

@openshift-ci-robot openshift-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/Medium Nice to have issue. Getting it done before priority changes would be great. labels Nov 27, 2019
@kadel
Copy link
Member

kadel commented Nov 27, 2019

There are two CVEs.
What I understand from reading through it is that they don't effect client-go. But one of them might be effecting us.

https://nvd.nist.gov/vuln/detail/CVE-2019-11253
This one is effecting apiserver, not a client-side.

https://bugzilla.redhat.com/show_bug.cgi?id=1753495
The discovered vulnerability is in kubectl cp command. We don't use that command, but our code is based on the same login.
We need to check if the attack can be applied to the odo.

@kadel kadel added this to For consideration in Sprint 176 via automation Nov 27, 2019
@kadel kadel added the estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person label Nov 27, 2019
@kadel kadel moved this from For consideration to To do in Sprint 176 Nov 27, 2019
@mik-dass
Copy link
Contributor

@mik-dass
Copy link
Contributor

mik-dass commented Dec 2, 2019

@kadel I don't see any changes which will be required in odo's tarring logic
kubernetes/kubernetes@786acdb

The resursiveTar() in the upstream has the same logic as ours.
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/cp/cp.go

The changes were done in the unTarAll function but I couldn't find any usage of it in our code base.
https://github.com/kubernetes/kubernetes/blob/f6337c762483e60e41dd775166afd536b130455e/pkg/kubectl/cmd/cp/cp.go#L429

@mik-dass
Copy link
Contributor

mik-dass commented Dec 9, 2019

@kadel @cdrage @nickboldt Looking at kubernetes/kubernetes@786acdb, I could find that the changes were done in the unTarAll() function which is used in the copyFromPod() function https://github.com/kubernetes/kubernetes/blob/2fbe432d2347d7f808054f92f2b146e8a7dd2de8/pkg/kubectl/cmd/cp/cp.go#L324

Thus looking at the above code base, I think the vulnerability exists when the attacker places the malicious software in a pod and the victim copies files from the pod back to his source computer. Since we don't copy files from the pod to a user's computer, I don't think we affected by this issue. Also I couldn't find the usage of the unTarAll() logic anywhere in our code. So I guess we can close this issue.

@nickboldt
Copy link
Member Author

nickboldt commented Dec 9, 2019

Well, you're still better off IMHO being based on newer versions of oc than 3.11.0 (as 3.11.156 is the latest) or moving to 4.2.latest...

but it's good to now this specific CVE issue might not affect you.

(There are others. Or there wouldn't haven been a need for 156 z-stream updates to 3.11.0 since Oct 2018.)

@mik-dass
Copy link
Contributor

mik-dass commented Dec 11, 2019

Well, you're still better off IMHO being based on newer versions of oc than 3.11.0 (as 3.11.156 is the latest) or moving to 4.2.latest...

@nickboldt Do you mean the OC binary or the client-go? We don't use the OC binary in our code base. As for the client-go, we have plans to update it to a newer version in a upcoming PR.

@mik-dass mik-dass moved this from To Do to Ready for review in Sprint 176 Dec 11, 2019
@kadel kadel added this to For consideration in Sprint 177 via automation Dec 16, 2019
@kadel kadel removed this from Ready for review in Sprint 176 Dec 16, 2019
@kadel kadel moved this from For consideration to Ready for review in Sprint 177 Dec 16, 2019
@girishramnani girishramnani added the area/release-eng Issues or PRs related to the Release Engineering label Jan 3, 2020
@girishramnani girishramnani added this to For concideration in Sprint 178 via automation Jan 8, 2020
@girishramnani girishramnani removed this from Ready for review in Sprint 177 Jan 8, 2020
@girishramnani girishramnani moved this from For concideration to For review in Sprint 178 Jan 8, 2020
@girishramnani girishramnani removed this from For review in Sprint 178 Mar 11, 2020
@girishramnani girishramnani added this to For consideration in Sprint 181 via automation Mar 11, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 181 Mar 11, 2020
@girishramnani girishramnani removed this from For review in Sprint 181 Mar 30, 2020
@girishramnani girishramnani added this to For consideration in Sprint 182 via automation Mar 30, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 182 Mar 30, 2020
@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci-robot openshift-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 2, 2020
@girishramnani girishramnani removed this from For review in Sprint 182 Apr 20, 2020
@girishramnani girishramnani added this to For consideration in Sprint 183 via automation Apr 20, 2020
@girishramnani girishramnani moved this from For consideration to For review in Sprint 183 Apr 20, 2020
@girishramnani
Copy link
Contributor

closing this due to inactivity.

Sprint 183 automation moved this from For review to Done Apr 20, 2020
@nickboldt
Copy link
Member Author

@nickboldt Do you mean the OC binary or the client-go? We don't use the OC binary in our code base. As for the client-go, we have plans to update it to a newer version in a upcoming PR.

I meant the oc binary.

@mik-dass
Copy link
Contributor

mik-dass commented Apr 20, 2020

I meant the oc binary.

@nickboldt We don't use the OC binary anymore in ODO. We have moved to client-go long back. We even updated client-go to release-4.1 recently https://github.com/openshift/odo/blob/18f9f3b33404b5a2d5f662f9dd494128c41d093f/glide.yaml#L17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering estimated-size/XL (40-60) Rough sizing for Epics. About 3 sprints of work for a person kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
No open projects
Sprint 183
  
Done
Development

No branches or pull requests

7 participants