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

ROX-12784: fix unpatched OpenShift 4 vulnerability detection #1006

Merged
merged 14 commits into from
Nov 15, 2022
Merged

Conversation

RTann
Copy link
Collaborator

@RTann RTann commented Nov 8, 2022

There is a single OpenShift 4 unpatched CVE file. This is in contrast to (*)most other products, which have a different unpatched file per minor version. The OpenShift 4 unpatched file indicates the affected CPE by a single, specific minor version, the next, unreleased version of OpenShift 4. It is implied this indicates each version of OpenShift 4 at that version and below are affected. For example, if the CPE is cpe:/a:redhat:openshift:4.12, it is assumed versions 4.0 - 4.12 are all affected.

Scanner performs RHEL-based image vulnerability matching by performing exact match queries with the CPEs found in the image and the CPEs indicated by the OVAL v2 feed. To fix the problem, this PR adds a CPE entry for the vulnerability for each OpenShift 4 minor version 4.0 <= x <= 4.y where y is the indicated minor version in the OVAL v2 feed. Originally, we only accounted for 4.y.

Note: there is a possibility the CPE format is changed to solely give the major version (ie cpe:/a:redhat:openshift:4 and cpe:/a:redhat:openshift:4::el8). This PR also accounts for this possibility.

This solely affects unpatched OpenShift 4 vulnerabilities.

(*) RHEL also does this. However, the RHEL CPEs only indicate the major version. Because of this, we have never had a problem with RHEL. OpenShift's CPEs indicate the minor version, as well, which has proven to be a problem.

@RTann RTann added the generate-dumps-on-pr Generates the image based on dumps from the PR label Nov 8, 2022
@ghost
Copy link

ghost commented Nov 8, 2022

Images are ready for the commit at ef15cf7.

To use the images, use the tag 2.26.x-42-gef15cf7c01.

@RTann RTann closed this Nov 14, 2022
@RTann RTann deleted the ROX-12784 branch November 14, 2022 16:51
@RTann RTann restored the ROX-12784 branch November 14, 2022 16:51
@RTann RTann reopened this Nov 14, 2022
@RTann
Copy link
Collaborator Author

RTann commented Nov 14, 2022

Verified the DB contains entries in vuln_v2 for both CVE-2021-26291 and CVE-2022-30945 with CPEs:

 cpe:/a:redhat:openshift:4.0
 cpe:/a:redhat:openshift:4.1
 cpe:/a:redhat:openshift:4.2
 cpe:/a:redhat:openshift:4.3
 cpe:/a:redhat:openshift:4.4
 cpe:/a:redhat:openshift:4.5
 cpe:/a:redhat:openshift:4.6
 cpe:/a:redhat:openshift:4.7
 cpe:/a:redhat:openshift:4.8
 cpe:/a:redhat:openshift:4.9
 cpe:/a:redhat:openshift:4.10
 cpe:/a:redhat:openshift:4.11
 cpe:/a:redhat:openshift:4.12
 cpe:/a:redhat:openshift:4.0::el8
 cpe:/a:redhat:openshift:4.1::el8
 cpe:/a:redhat:openshift:4.2::el8
 cpe:/a:redhat:openshift:4.3::el8
 cpe:/a:redhat:openshift:4.4::el8
 cpe:/a:redhat:openshift:4.5::el8
 cpe:/a:redhat:openshift:4.6::el8
 cpe:/a:redhat:openshift:4.7::el8
 cpe:/a:redhat:openshift:4.8::el8
 cpe:/a:redhat:openshift:4.9::el8
 cpe:/a:redhat:openshift:4.10::el8
 cpe:/a:redhat:openshift:4.11::el8
 cpe:/a:redhat:openshift:4.12::el8

@RTann RTann requested review from c-du and daynewlee November 14, 2022 19:45
@RTann RTann merged commit 3b3694b into master Nov 15, 2022
@RTann RTann deleted the ROX-12784 branch November 15, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
generate-dumps-on-pr Generates the image based on dumps from the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants