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

fix(centos): identify CentOS and CentOS Stream #1360

Merged
merged 1 commit into from Feb 2, 2022

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Jan 14, 2022

What did you implement:

CentOS8 and CentOS Stream8 use the same OVAL and Gost (RedHat Security API), but the EOL is different.
Currently, EOL of CentOS8 is also set for CentOS Stream8, and WARN is output. Fix this.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

master

$ vuls scan
[Jan 14 13:46:55]  INFO [localhost] vuls-v0.19.1-build-20220114_134430_a3f7d1d
[Jan 14 13:46:55]  INFO [localhost] Start scanning
[Jan 14 13:46:55]  INFO [localhost] config: /home/mainek00n/github/github.com/MaineK00n/vuls/config.toml
[Jan 14 13:46:55]  INFO [localhost] Validating config...
[Jan 14 13:46:55]  INFO [localhost] Detecting Server/Container OS... 
[Jan 14 13:46:55]  INFO [localhost] Detecting OS of servers... 
[Jan 14 13:46:56]  INFO [localhost] (1/1) Detected: vuls-target: centos 8
[Jan 14 13:46:56]  INFO [localhost] Detecting OS of containers... 
[Jan 14 13:46:56]  INFO [localhost] Checking Scan Modes... 
[Jan 14 13:46:56]  INFO [localhost] Detecting Platforms... 
[Jan 14 13:46:57]  INFO [localhost] (1/1) vuls-target is running on other
[Jan 14 13:46:57]  INFO [vuls-target] Scanning OS pkg in fast mode
[Jan 14 13:47:02]  WARN [localhost] Some warnings occurred during scanning on vuls-target. Please fix the warnings to get a useful information. Execute configtest subcommand before scanning to know the cause of the warnings. warnings: [Standard OS support is EOL(End-of-Life). Purchase extended support if available or Upgrading your OS is strongly recommended.]


Scan Summary
================
vuls-target	centos8	207 installed, 52 updatable

Warning: [Standard OS support is EOL(End-of-Life). Purchase extended support if available or Upgrading your OS is strongly recommended.]



To view the detail, vuls tui is useful.
To send a report, run vuls report -h.
$ vuls report
[Jan 14 13:48:18]  INFO [localhost] vuls-v0.19.1-build-20220114_134430_a3f7d1d
[Jan 14 13:48:18]  INFO [localhost] Validating config...
[Jan 14 13:48:18]  INFO [localhost] cveDict.type=sqlite3, cveDict.url=, cveDict.SQLite3Path=/usr/share/vuls-data/cve.sqlite3
[Jan 14 13:48:18]  INFO [localhost] ovalDict.type=sqlite3, ovalDict.url=, ovalDict.SQLite3Path=/usr/share/vuls-data/oval.sqlite3
[Jan 14 13:48:18]  INFO [localhost] gost.type=sqlite3, gost.url=, gost.SQLite3Path=/usr/share/vuls-data/gost.sqlite3
[Jan 14 13:48:18]  INFO [localhost] exploit.type=sqlite3, exploit.url=, exploit.SQLite3Path=/usr/share/vuls-data/go-exploitdb.sqlite3
[Jan 14 13:48:18]  INFO [localhost] metasploit.type=sqlite3, metasploit.url=, metasploit.SQLite3Path=/usr/share/vuls-data/go-msfdb.sqlite3
[Jan 14 13:48:18]  INFO [localhost] kevuln.type=sqlite3, kevuln.url=, kevuln.SQLite3Path=/usr/share/vuls-data/go-kev.sqlite3
[Jan 14 13:48:18]  INFO [localhost] Loaded: /home/mainek00n/github/github.com/MaineK00n/vuls/results/2022-01-14T13:48:07+09:00
[Jan 14 13:48:18]  INFO [localhost] OVAL centos 8 found. defs: 791
[Jan 14 13:48:18]  INFO [localhost] OVAL centos 8 is fresh. lastModified: 2022-01-13T11:14:28+09:00
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 2 CVEs are detected with OVAL
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 14 unfixed CVEs are detected with gost
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 0 CVEs are detected with CPE
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 0 PoC are detected
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 0 exploits are detected
[Jan 14 13:48:18]  INFO [localhost] vuls-target: total 16 CVEs detected
[Jan 14 13:48:18]  INFO [localhost] vuls-target: 0 CVEs filtered by --confidence-over=80
vuls-target (centos8)
=====================
Total: 16 (Critical:1 High:4 Medium:11 Low:0 ?:0)
2/16 Fixed, 3 poc, 0 exploits, cisa: 0, uscert: 0, jpcert: 1 alerts
207 installed

Warning: Some warnings occurred.
[Standard OS support is EOL(End-of-Life). Purchase extended support if available or Upgrading your OS is strongly recommended.]


+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+
|     CVE-ID     | CVSS | ATTACK | POC |   ALERT   |  FIXED  |                       NVD                       |
+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+
| CVE-2021-42574 |  9.8 |  AV:N  | POC |           |   fixed | https://nvd.nist.gov/vuln/detail/CVE-2021-42574 |
| CVE-2021-3999  |  8.1 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3999  |
| CVE-2021-43618 |  7.5 |  AV:L  | POC |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-43618 |
| CVE-2021-3712  |  7.4 |  AV:N  |     |      CERT |   fixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3712  |
| CVE-2021-41617 |  7.0 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-41617 |
| CVE-2021-23177 |  6.6 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-23177 |
| CVE-2017-14166 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2017-14166 |
| CVE-2017-14501 |  6.5 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2017-14501 |
| CVE-2021-35938 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35938 |
| CVE-2021-35939 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35939 |
| CVE-2021-3634  |  6.5 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3634  |
| CVE-2021-35937 |  6.3 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35937 |
| CVE-2021-40528 |  5.9 |  AV:N  | POC |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-40528 |
| CVE-2021-3997  |  5.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3997  |
| CVE-2021-31566 |  4.4 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-31566 |
| CVE-2021-3521  |  4.4 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3521  |
+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+

PR

$ vuls scan
[Jan 14 13:47:24]  INFO [localhost] vuls-v0.19.1-build-20220114_134453_66c0acb
[Jan 14 13:47:24]  INFO [localhost] Start scanning
[Jan 14 13:47:24]  INFO [localhost] config: /home/mainek00n/github/github.com/MaineK00n/vuls/config.toml
[Jan 14 13:47:24]  INFO [localhost] Validating config...
[Jan 14 13:47:24]  INFO [localhost] Detecting Server/Container OS... 
[Jan 14 13:47:24]  INFO [localhost] Detecting OS of servers... 
[Jan 14 13:47:24]  INFO [localhost] (1/1) Detected: vuls-target: centos stream8
[Jan 14 13:47:24]  INFO [localhost] Detecting OS of containers... 
[Jan 14 13:47:24]  INFO [localhost] Checking Scan Modes... 
[Jan 14 13:47:24]  INFO [localhost] Detecting Platforms... 
[Jan 14 13:47:25]  INFO [localhost] (1/1) vuls-target is running on other
[Jan 14 13:47:25]  INFO [vuls-target] Scanning OS pkg in fast mode


Scan Summary
================
vuls-target	centosstream8	207 installed, 52 updatable





To view the detail, vuls tui is useful.
To send a report, run vuls report -h.

$ vuls report
[Jan 14 13:49:34]  INFO [localhost] vuls-v0.19.1-build-20220114_134453_66c0acb
[Jan 14 13:49:34]  INFO [localhost] Validating config...
[Jan 14 13:49:34]  INFO [localhost] cveDict.type=sqlite3, cveDict.url=, cveDict.SQLite3Path=/usr/share/vuls-data/cve.sqlite3
[Jan 14 13:49:34]  INFO [localhost] ovalDict.type=sqlite3, ovalDict.url=, ovalDict.SQLite3Path=/usr/share/vuls-data/oval.sqlite3
[Jan 14 13:49:34]  INFO [localhost] gost.type=sqlite3, gost.url=, gost.SQLite3Path=/usr/share/vuls-data/gost.sqlite3
[Jan 14 13:49:34]  INFO [localhost] exploit.type=sqlite3, exploit.url=, exploit.SQLite3Path=/usr/share/vuls-data/go-exploitdb.sqlite3
[Jan 14 13:49:34]  INFO [localhost] metasploit.type=sqlite3, metasploit.url=, metasploit.SQLite3Path=/usr/share/vuls-data/go-msfdb.sqlite3
[Jan 14 13:49:34]  INFO [localhost] kevuln.type=sqlite3, kevuln.url=, kevuln.SQLite3Path=/usr/share/vuls-data/go-kev.sqlite3
[Jan 14 13:49:34]  INFO [localhost] Loaded: /home/mainek00n/github/github.com/MaineK00n/vuls/results/2022-01-14T13:49:24+09:00
[Jan 14 13:49:34]  INFO [localhost] OVAL redhat 8 found. defs: 791
[Jan 14 13:49:34]  INFO [localhost] OVAL redhat 8 is fresh. lastModified: 2022-01-13T11:14:28+09:00
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 2 CVEs are detected with OVAL
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 14 unfixed CVEs are detected with gost
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 0 CVEs are detected with CPE
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 0 PoC are detected
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 0 exploits are detected
[Jan 14 13:49:35]  INFO [localhost] vuls-target: total 16 CVEs detected
[Jan 14 13:49:35]  INFO [localhost] vuls-target: 0 CVEs filtered by --confidence-over=80
vuls-target (centosstream8)
===========================
Total: 16 (Critical:1 High:4 Medium:11 Low:0 ?:0)
2/16 Fixed, 3 poc, 0 exploits, cisa: 0, uscert: 0, jpcert: 1 alerts
207 installed

+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+
|     CVE-ID     | CVSS | ATTACK | POC |   ALERT   |  FIXED  |                       NVD                       |
+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+
| CVE-2021-42574 |  9.8 |  AV:N  | POC |           |   fixed | https://nvd.nist.gov/vuln/detail/CVE-2021-42574 |
| CVE-2021-3999  |  8.1 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3999  |
| CVE-2021-43618 |  7.5 |  AV:L  | POC |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-43618 |
| CVE-2021-3712  |  7.4 |  AV:N  |     |      CERT |   fixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3712  |
| CVE-2021-41617 |  7.0 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-41617 |
| CVE-2021-23177 |  6.6 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-23177 |
| CVE-2017-14166 |  6.5 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2017-14166 |
| CVE-2017-14501 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2017-14501 |
| CVE-2021-35938 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35938 |
| CVE-2021-35939 |  6.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35939 |
| CVE-2021-3634  |  6.5 |  AV:N  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3634  |
| CVE-2021-35937 |  6.3 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-35937 |
| CVE-2021-40528 |  5.9 |  AV:N  | POC |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-40528 |
| CVE-2021-3997  |  5.5 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3997  |
| CVE-2021-31566 |  4.4 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-31566 |
| CVE-2021-3521  |  4.4 |  AV:L  |     |           | unfixed | https://nvd.nist.gov/vuln/detail/CVE-2021-3521  |
+----------------+------+--------+-----+-----------+---------+-------------------------------------------------+

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@MaineK00n MaineK00n self-assigned this Jan 14, 2022
@kotakanbe kotakanbe merged commit 2923cbc into master Feb 2, 2022
@kotakanbe kotakanbe deleted the MaineK00n/fix-centos-stream branch February 2, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants