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(scan): a bug of kernel Vulns detection on Ubuntu18 #818

Merged
merged 2 commits into from
May 23, 2019

Conversation

kotakanbe
Copy link
Member

@kotakanbe kotakanbe commented May 23, 2019

What did you implement:

The key name of a kernel has been changed in OVAL for Ubuntu 18.
I fixed the detection logic.

Not fixed yet in a report is also fixed.
Use not fixed yet data in OVAL except for CentOS.
OVAL detection for CentOS uses RHEL's OVAL.
The patch provided status is different from CentOS and RHEL.
So, the Version comparison(new version vs fixed in version in OVAL) is needed to judge fixed or not fixed yet for CentOS.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

diff

 ~/w/u18  ls                                                                                                                                        Thu May 23 16:45:23 2019
localhost.json     localhost.json.new
 ~/w/u18  diff *                                                                                                                                    Thu May 23 16:45:23 2019
37c37
<     "reportedAt": "2019-05-23T16:44:53.78834+09:00",
---
>     "reportedAt": "2019-05-23T16:43:23.577594+09:00",
488c488
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
659c659
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
972c972
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
1466c1466
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
1572c1572
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
1678c1678
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
1764c1764
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
5974c5974
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
6433c6433
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
6539,6541c6539,6541
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
6659,6661c6659,6661
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
6779,6781c6779,6781
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
6899c6899
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7000c7000
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7106c7106
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7207c7207
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7308c7308
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7439c7439
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7540c7540
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7641c7641
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7768c7768
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7895c7895
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
7991c7991
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8132c8132
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8465c8465
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8591c8591
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8713c8713
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8834c8834
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
8965c8965
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
9086c9086
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
9197c9197
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
9288c9288
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
9409c9409
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
9535,9537c9535,9537
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
9777c9777
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
10110,10112c10110,10112
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
10261c10261
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
10352,10354c10352,10354
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
10548,10550c10548,10550
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
10936,10938c10936,10938
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
11122,11124c11122,11124
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
11263c11263
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
11495c11495
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
11888c11888
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
12004c12004
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
12221c12221
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
13187c13187
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
13591c13591
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
13651,13653c13651,13653
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
13932c13932
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
13987c13987
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14072c14072
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14142c14142
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14207c14207
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14277c14277
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14337c14337
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14769c14769
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
14819,14821c14819,14821
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
14975,14977c14975,14977
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
15126c15126
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
15262c15262
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
15836,15838c15836,15838
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
15972,15974c15972,15974
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
16072c16072
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
16228,16229c16228,16229
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "notFixedYet": false,
>                     "fixState": ""
16233,16234c16233,16234
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "notFixedYet": false,
>                     "fixState": ""
16238,16239c16238,16239
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "notFixedYet": false,
>                     "fixState": ""
16302c16302
<                     "name": "linux-image-virtual",
---
>                     "name": "linux-image-generic",
16821,16823c16821,16823
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
17468,17470c17468,17470
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
17674,17676c17674,17676
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
17860,17862c17860,17862
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
18066,18068c18066,18068
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
18847,18849c18847,18849
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
18978,18980c18978,18980
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
19129,19131c19129,19131
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
19355,19357c19355,19357
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""
19435,19437c19435,19437
<                     "name": "linux-image-virtual",
<                     "notFixedYet": true,
<                     "fixState": "Not fixed yet"
---
>                     "name": "linux-image-generic",
>                     "notFixedYet": false,
>                     "fixState": ""

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

@kotakanbe kotakanbe force-pushed the fix-ubuntu-kernel-detection branch from cf14e65 to 5811173 Compare May 23, 2019 07:48
@kotakanbe kotakanbe merged commit 276363e into master May 23, 2019
@kotakanbe kotakanbe deleted the fix-ubuntu-kernel-detection branch June 13, 2019 14:03
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.

1 participant