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 false positive: ignore oval info when kernel major version is different #541

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

kotakanbe
Copy link
Member

@kotakanbe kotakanbe commented Nov 10, 2017

What did you implement:

Dirty Cow was miss-detected on RedHat based linux because RedHat7's OVAL has below entry(DIRTY COW).

 <definition class="patch" id="oval:com.redhat.rhsa:def:20170372" version="602">
  ...
  <criterion comment="kernel is earlier than 0:4.5.0-15.2.1.el7" test_ref="oval:com.redhat.rhsa:tst:20170372013"/>

If the running kernel is 3 series, the version comparison would be wrong.

This CVE was also fixed in kernel 3 series.
https://access.redhat.com/errata/RHSA-2016:2098

kernel-3.10.0-327.36.3.el7.x86_64.rpm

So, if the major version of running kernel is different from oval's version, vuls ignore the oval entry.

How did you implement it:

see diff

How can we verify it:

yum -y update on CentOS7.
vuls scan 
vuls report

Confirm that the DIRTY COW is not detected.

Todos:

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?: NO
Is it a breaking change?: NO

@kotakanbe kotakanbe merged commit 6af49f4 into master Nov 10, 2017
kotakanbe added a commit that referenced this pull request Nov 15, 2017
* master:
  Fix yum changelog option (#543)
  Update README.md (#542)
  Fix false positive: ignore oval info when kernel major version is different. (#541)
  Fix: Misdetection of OvalMatch for CentOS and Scientific in oval/util.go (#536)
  Fix: "Reboot Required" detection process in scan/redhat.go (#534)
  Remove README.fr.md because unable to maintenance..
  README Typo Update (#538)
  Insert `sudo` only at the beginning of command in deep scan #495 (#539)
  Fix config.toml validation (#537)
  Add pseudo server type for non-ssh scanning (only cpe scan) #512 (#531)
  README Update (#530)
  Update README
  send slack msg by api (#525)
  fix typo Privious -> Previous (#523)
  Fix package query fails on debian based container (#519) (#522)
  fix typo from "enviroment" to "environment" (#518)
  Fix typo in config/jsonloader.go (#517)
  Modified Spell Miss of "README.md". (#516)
  Fix .goreleaser.yml
  Fix a bug of making channels when fill oval information via HTTP (#514)
mai346 added a commit to mai346/vuls that referenced this pull request Dec 4, 2017
kotakanbe added a commit that referenced this pull request Jan 10, 2018
* master:
  Fixed panic occurred when blank line continued in changelog (#569)
  Fixed Typo (#574)
  fix typo(BackSpace) in README.ja.md (#576)
  Fix a bug of sending to closed socket while oval access via HTTP #578 (#579)
  fix typo in reports/s3.go (#573)
  LXC container support without LXD (#552)
  Support Amazon Linux2 (#562)
  Fix #548 and #557 - RHEL's Fast Scan no longer required internet connection and root privilege (#559)
  Change error handling of "Reboot Required" detection (#556)
  Fix some RPM related commands failed in the container (#554)
  travis: update go version (#555)
  Add more kernel related packages (Fix #541) (#551)
@kotakanbe kotakanbe deleted the fix-redhat-false-positive branch February 19, 2018 04:30
@MaineK00n MaineK00n mentioned this pull request Feb 8, 2022
13 tasks
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