Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dims
Copy link
Member

@dims dims commented Apr 30, 2023

Re-do of #117242 on release-1.26.

Modifies: #117647

#117242: CVE-2023-27561: Bump runc go module v1.1.4 -> v1.1.5

For details on the cherry pick process, see the cherry pick requests page.

* CVE-2023-27561 CVE-2023-25809 CVE-2023-28642: Bump fix runc v1.1.4 -> v1.1.5
* Fixed cgroup removal error when using runc binary >= 1.1.6

@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Apr 30, 2023
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Apr 30, 2023
@k8s-ci-robot k8s-ci-robot requested review from andrewsykim, bart0sh and a team April 30, 2023 02:32
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 30, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5e2184a291bd576cf0f649f6860aa1ab2e8d6c07

@liggitt
Copy link
Member

liggitt commented May 1, 2023

dep mechanics lgtm (and unit/integration compatibility tests show we still pass tests with original minor version go release, which is good)

My understanding is that #117647 is caused by mismatched versions of the libcontainer library between kube and the runc binary used. Do the changes in this PR cause any issues with mismatched versions in the opposite direction if a runc binary older than 1.1.6 is used?

also, is there a test demonstrating #117647 is fixed with this change, and doesn't regress the currently working cgroupv2 combinations?

@kolyshkin
Copy link
Contributor

My understanding is that #117647 is caused by mismatched versions of the libcontainer library between kube and the runc binary used. Do the changes in this PR cause any issues with mismatched versions in the opposite direction if a runc binary older than 1.1.6 is used?

Good question. The answer, to my best understanding, is definitely not.

The problem is caused by 1.1.6+ runc binary adding a misc cgroup controller directory which older runc/libcontainer used by kubelet doesn't know about (and thus can't remove). Using an older binary (which does not create misc controller directory) with a newer vendored runc/libcontainer is fine -- missing controllers are ignored.

also, is there a test demonstrating #117647 is fixed with this change, and doesn't regress the currently working cgroupv2 combinations?

If there is, I am not aware. A problem like this is very rare (and ultimately is caused by cgroup v1 idiosyncrasy of having a forest, rather than a tree, of controller hierarchies), and I don't know if there's a test that tries various runc releases.

It would be nice to have though (as well as testing the runc from the main/HEAD).

@SergeyKanzhelev
Copy link
Member

/lgtm

Copy link
Member

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liggitt
Copy link
Member

liggitt commented May 3, 2023

/approve
per #117691 (comment) and node lgtm

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2023
@BenTheElder
Copy link
Member

Somewhat unreasonable problem to tackle: I guess KIND is going to have fun with older releases and cgroups v1 as we roll out runc 1.1.6 🙃, we don't currently use older runc for older kubernetes and changing that won't be easy.

How far can we reasonably backport this?

@liggitt
Copy link
Member

liggitt commented May 3, 2023

I guess KIND is going to have fun with older releases and cgroups v1 as we roll out runc 1.1.6

this PR doesn't require runc 1.1.6, if I understand #117691 (comment) correctly

@liggitt
Copy link
Member

liggitt commented May 3, 2023

/hold just to double-check my understanding in #117691 (comment) is correct

@kolyshkin?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 3, 2023
@BenTheElder
Copy link
Member

BenTheElder commented May 3, 2023

I mean the opposite: runc 1.1.6 requires this PR and not upgrading runc means missing CVE patches?

@BenTheElder
Copy link
Member

For tools like CAPI I assume we can do something like forcing cgroupsv2 but we should probably ping cluster lifecycle about the implications of patching runc.

KIND updated to 1.1.6 shortly after release and I didn't realize we'd have this problem and for that particular tool we don't control the kernel / host cgroups

@liggitt
Copy link
Member

liggitt commented May 3, 2023

I mean the opposite: runc 1.1.6 requires this PR and not upgrading runc means missing CVE patches?

oh. I'm not sure, but my understanding is that whether runc improves interop with previous versions of this library or not, this is an ok bump to take

@BenTheElder
Copy link
Member

agreed, I was asking if we will backport this further / how far, and now also if we're in contact with the owners of in-project cluster tools (CAPI, kOps, kubespray, minikube, ...) regarding the compat issue, I would guess most of them have been upgrading due to CVEs and may not be aware of the problem this PR intends to solve

@liggitt
Copy link
Member

liggitt commented May 3, 2023

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 3, 2023
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For RelEng:
/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, liggitt, samuelkarp, xmudrii

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@xmudrii xmudrii added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label May 4, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. label May 4, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7970b8a into kubernetes:release-1.26 May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kubectl cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

10 participants