Skip to content

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 into
openshift:masterfrom
wking:block-edges-on-crio-exec-run-leak
Aug 31, 2021
Merged

openshift-merge-robot merged 1 commit into
openshift:masterfrom
wking:block-edges-on-crio-exec-run-leak

Conversation

@wking

@wking wking commented Aug 31, 2021

Copy link
Copy Markdown
Member

From the impact statement, 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 31, 2021
@wking
wking force-pushed the block-edges-on-crio-exec-run-leak branch from 9896362 to 370a9cd Compare August 31, 2021 22:07
Comment thread blocked-edges/4.7.28.yaml Resolved
Comment thread blocked-edges/4.8.9.yaml Resolved
… 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
wking force-pushed the block-edges-on-crio-exec-run-leak branch from 370a9cd to 2a70cf5 Compare August 31, 2021 22:36
@jottofar

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 31, 2021
@openshift-ci

openshift-ci Bot commented Aug 31, 2021

Copy link
Copy Markdown
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

Details 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

@openshift-merge-robot
openshift-merge-robot merged commit cc9517d into openshift:master Aug 31, 2021
@wking
wking deleted the block-edges-on-crio-exec-run-leak branch August 31, 2021 22:52
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
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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants