Repository navigation
blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak - #1022
Merged
openshift-merge-robot merged 1 commit intoAug 31, 2021
Conversation
wking
force-pushed
the
block-edges-on-crio-exec-run-leak
branch
from
August 31, 2021 22:07
9896362 to
370a9cd
Compare
jottofar
reviewed
Aug 31, 2021
jottofar
reviewed
Aug 31, 2021
… on CRI-O /run leak
From the impact statement [1], vulnerable releases:
* 4.6.43 is unaffected, next 4.6.z to ship will be unless we fix things.
* 4.7.24 - 4.7.28 include the regression.
* 4.8.5 - 4.8.9 include the regression.
But looking at channel/fast-4.8.yaml, a bunch of the impacted releases
did not ship. This commit picks out the three which have, and also
includes 4.7.28, which is expected to ship soon, and blocks updates to
them from any released, unaffected update sources.
For example, annotating output with comments:
$ oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.8.9-x86_64 | jq -r '.metadata.previous[]'
4.7.21 # blocking
4.7.22 # blocking
4.7.23 # blocking
4.7.24 # allowing, because it's already impacted, so updating doesn't make things worse
4.7.25 # allowing, because it was tombstoned in candidate, and we like feedback from candidate updates
4.7.26 # allowing, because it was tombstoned in candidate
4.7.28 # allowing, because it's already impacted
4.8.0 # allowing, because it was tombstoned in candidate
4.8.0-rc.0 # allowing, because it was filtered in candidate
4.8.0-rc.1 # allowing, because it was filtered in candidate
4.8.0-rc.2 # allowing, because it was filtered in candidate
4.8.0-rc.3 # allowing, because it was filtered in candidate
4.8.1 # allowing, because it was tombstoned in candidate
4.8.2 # blocking
4.8.3 # blocking
4.8.4 # blocking
4.8.5 # allowing, because it's already impacted
4.8.6 # allowing, because it was tombstoned in candidate
4.8.7 # allowing, because it was tombstoned in candidate
Validating my regular expression:
$ oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.8.9-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]7[.]2[123]|4[.]8[.][234])$") | not)'
4.7.24
4.7.25
4.7.26
4.7.28
4.8.0
4.8.0-rc.0
4.8.0-rc.1
4.8.0-rc.2
4.8.0-rc.3
4.8.1
4.8.5
4.8.6
4.8.7
And limiting to supported releases:
$ join <(oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.8.9-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]7[.]2[123]|4[.]8[.][234])$") | not)' | sort) <(curl -s 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.8&arch=amd64' | jq -r '.nodes[].version' | sort)
4.7.24
4.8.5
both of which are vulnerable. Checking the other releases too:
$ join <(oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.8.5-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]7[.].*|4[.]8[.][234])$") | not)' | sort) <(curl -s 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.8&arch=amd64' | jq -r '.nodes[].version' | sort)
...no matches...
$ join <(oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.7.28-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]6[.].*|4[.]7[.][0-9]|4[.]7[.]1[1236789]|4[.]7[.]2[123])$") | not)' | sort) <(curl -s 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.7&arch=amd64' | jq -r '.nodes[].version' | sort)
4.7.24
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1997062#c24
wking
force-pushed
the
block-edges-on-crio-exec-run-leak
branch
from
August 31, 2021 22:36
370a9cd to
2a70cf5
Compare
Contributor
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jottofar, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 2, 2021
History: * 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted nuanced edge blocking. * 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and similar. * 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we sort regexps, 2021-09-01, openshift#1030), which went to .* because the anchored regexp was not matching as expected, and began allowing 4.7.23 -> 4.7.28 and similar. It turns out that the versions Cincinnati is comparing with are architecture-suffixed release names [1], not the raw release name from the release image's metadata. So 4.7.24+amd64, etc. The new regular expression restores the multiple alternatives and anchors, but includes a new '[+].*' portion to absorb the architecture suffix. [1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 2, 2021
History: * 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted nuanced edge blocking. * 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and similar. * 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we sort regexps, 2021-09-01, openshift#1030), which went to .* because the anchored regexp was not matching as expected, and began allowing 4.7.23 -> 4.7.28 and similar. It turns out that the versions Cincinnati is comparing with are architecture-suffixed release names [1], not the raw release name from the release image's metadata. So 4.7.24+amd64, etc. The new regular expression restores the multiple alternatives and anchors, but includes a new '[+].*' portion to absorb the architecture suffix. [1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 2, 2021
History: * 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted nuanced edge blocking. * 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and similar. * 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we sort regexps, 2021-09-01, openshift#1030), which went to .* because the anchored regexp was not matching as expected, and allowed 4.7.23 -> 4.7.28 and similar. It turns out that the versions Cincinnati is comparing with are architecture-suffixed release names [1], not the raw release name from the release image's metadata. So 4.7.24+amd64, etc. The new regular expression restores the multiple alternatives and anchors, but includes a new '[+].*' portion to absorb the architecture suffix. [1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 2, 2021
History: * 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted nuanced edge blocking. * 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and similar. * 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we sort regexps, 2021-09-01, openshift#1030), which went to .* because the anchored regexp was not matching as expected, and allowed 4.7.23 -> 4.7.28 and similar. It turns out that the versions Cincinnati is comparing with are architecture-suffixed release names [1], not the raw release name from the release image's metadata. So 4.7.24+amd64, etc. The new regular expression restores the multiple alternatives and anchors, but includes a new '[+].*' portion to absorb the architecture suffix. [1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 2, 2021
History: * 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022) attempted nuanced edge blocking. * 49b5808 (blocked-edges/4.7.28: Explicitly anchor 'from' regexp with ^/$, 2021-09-01, openshift#1025) added anchors, to prevent things like the 4[.]7[.][0-9] alternative matching (and blocking) 4.7.24, and similar. * 9d348f9 (blocked-edges/4.7.28: Block all incoming edges while we sort regexps, 2021-09-01, openshift#1030), which went to .* because the anchored regexp was not matching as expected, and allowed 4.7.23 -> 4.7.28 and similar. It turns out that the versions Cincinnati is comparing with are architecture-suffixed release names [1], not the raw release name from the release image's metadata. So 4.7.24+amd64, etc. The new regular expression restores the multiple alternatives and anchors, but includes a new '[+].*' portion to absorb the architecture suffix. [1]: https://github.com/openshift/cincinnati-graph-data/tree/f653d3828832c0869df0e44dd7af7fc9b2079a63#release-names
wking
added a commit
to wking/cincinnati-graph-data
that referenced
this pull request
Sep 3, 2021
A few releases slipped into fast-4.8, despite being tombzoned in candidate releases, 4c53c7b (Blocking all the incoming edges to 4.7.10, 4.7.14, 4.7.15, 4.7.20, 2021-09-03, openshift#1035). Because I'd been comparing with fast-4.7 when developing the 4.7.28 blocker regexp, 2a70cf5 (blocked-edges: Block some edges into 4.7.24, 4.7.28, 4.8.5, and 4.8.9 on CRI-O /run leak, 2021-08-31, openshift#1022), those zombie releases still had edges: $ join <(oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.7.28-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]6[.].*|4[.]7[.][0-9]|4[.]7[.]1[1236789]|4[.]7[.]2[123])$") | not)' | sort) <(curl -s 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.8&arch=amd64' | jq -r '.nodes[].version' | sort) 4.7.10 4.7.14 4.7.15 4.7.20 4.7.24 With this commit, I'm extending the regular expression to exclude them, except for 4.7.24 which is already vulnerable to the bugs impacting 4.7.28: $ join <(oc adm release info -o json quay.io/openshift-release-dev/ocp-release:4.7.28-x86_64 | jq -r '.metadata.previous[] | select(test("^(4[.]6[.].*|4[.]7[.][0-9]|4[.]7[.]1[0-9]|4[.]7[.]2[0123])$") | not)' | sort) <(curl -s 'https://api.openshift.com/api/upgrades_info/v1/graph?channel=fast-4.8&arch=amd64' | jq -r '.nodes[].version' | sort) 4.7.24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From the impact statement, vulnerable releases:
But looking at
channel/fast-4.8.yaml, a bunch of the impacted releases did not ship. This commit picks out the three which have, and also includes 4.7.28, which is expected to ship soon, and blocks updates to them from any released, unaffected update sources.For example, annotating output with comments: