Code Monkey home page Code Monkey logo

linux_kernel_cves's Introduction

linux_kernel_cves

This is a simple project to track CVEs in the upstream linux kernel. Individual distro's (RHEL, Debian, Ubuntu, etc) often do a good job of tracking CVEs for their own kernels but this information is lacking for the upstream kernel. This project aims to help out with this void. The output was generated automatically through a set of tools that has not been fully tested or made public yet.

How to see the data

There are two ways to view/consume the data. The easiest is the web front end at www.linuxkernelcves.com. Here can you can view CVEs by stream or by CVE id. The second way is this github page. Here, the data is laid out in both JSON and text format.

Linux Security Note

Tracking, mitigating, and patching CVEs is just a small part of maintaining a secure kernel. Let me be clear, you can patch all known CVEs and still be vulnerable. Some risk can be mitigated through properly configuring your kernel/system. I suggest you visit the Kernel Self Protection Project and other kernel security pages for more information.

Reading stream reports

Below is a list of definitions for certain strings you might see in a stream report. The only CVEs that should appear in the stream document are ones that potentially affect that stream. (ie. ones that were not fixed prior to the first release version and were not introduced after the release version) If no fixing commit is known for a CVE, then by default it is assumed to present in all streams after it was introduced.

  • 'Fix unknown': No fixing commit in the commit maps or the commit is invalid
  • 'Fixed with X': Fixing commit was seen in the stream and first appears in version X
  • 'Fix not seen in stream': The fixing commit is known and valid, but not seen in this stream (ie. stream is still vulnerable)

Overview of Process

The process for generating these documents is focused on being as automated as possible. Below is the general outline of steps.

  1. Take list of all kernel CVEs
  2. If the issue is marked as Vendor specific, ignore it.
  3. Get the Breaking/Fixing Commits. This is retrieved from the internal cache first, if not present it pulls from Ubuntu, Debian, etc to try and fill that information in.
  4. Using those commit ids, get the first tags in the mainline that they appear.
  5. Using that version timeline, for each stream that would be vulnerable perform steps 6 through 8.
  6. Find the commit who has the commit message that matches the commit message from the mainline. This is the fixing commit in that stream.
  7. Record the commit id and get the earliest tag in the stream which has that commit.
  8. Output information to stream document.
  9. Update JSONs.

Accuracy

The bulk of the data is autogenerated or pulled from other open sources. While every effort is taken to ensure its accuracy, no promise of absolute accuracy can be made. If you think a CVE is missing or is not completely accurate, please fill out an issue to have the data looked at and changed. The eventual goal would be to have a community curated list of CVEs along with when the code was introduced and when it was fixed.

Development

Want to contribute? Great!

Data Contributions

Any additions/removals/updates to the data should start with an Issue. Please be as accurate and complete as possible when requesting a change so the information can be validated as quickly as possible.

Code Contributions

All code changes or enchancements must be done through a Pull Request to the staging branch. No PRs directly to master will be accepted.

Known Issues

  • Multiple commits to fix a CVE not handled

linux_kernel_cves's People

Contributors

dependabot[bot] avatar foxboron avatar milabs avatar nluedtke avatar quietcorey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linux_kernel_cves's Issues

Reorganize Stream Pages

Streams should be reverse sorted, with the newest version on top. We should provide an alternate or different view to the card view as well. this might be linked to #72

Atom Feed

Is your feature request related to a problem? Please describe.
We need more options to determine when things have changed, for the git illiterate.

Describe the solution you'd like
An Atom feed could hold each CVE, tracking when it was created and last updated. That way users could subscribe to the feed and link back to the site.

Describe alternatives you've considered

  1. RSS feed - I don't know that I like the idea of having to change GUID on each update. Even though its not that hard to do. I could be convinced otherwise.

Add support for scanning downstream kernel forks

We maintain a number of downstream kernels that typically contain vendor changes on top of a stable kernel branch (e.g: 4.9.135 etc.). Those kernel trees are managed with git, so we can scan those trees the same way the upstream and linux-stable trees are scanned.

Could you publish the scripts that do the scanning of Linux kernel trees such that it is possible to add "vendor" streams to the stream list?

Thank you very much!

HTML anchored versions within a stream

Is your feature request related to a problem? Please describe.
Navigating to different versions within a stream is clunky. Basically currently have to rely on the find feature or just scrolling through the stream

Describe the solution you'd like
All versions in the stream should be anchored so that we can use local links to a specific versions in the stream. Ideally, this will be used in three ways.

  • the CHANGES page can link right to a new version when a new version is seen.
  • There can be an in page navigation bar to help navigate while on the stream page.
  • External links that want to reference a version not a stream.

[BUG] Stream fixes don't appear in CHANGES

Describe the bug
New fixes in streams are not shown as a change in CHANGES.md

Expected behavior
Expected changes to appear as Updated CVEs.

Additional context
This was caught by looking at commit 165997b

CVEs fixed prior to v2.6.12-rc2

Since the first commit on github is v2.6.12-rc2 anything prior to this will appear wonky or will need a different solution. This is non-blocking, and can be pushed down the road.

API delivery [Wishlist Item]

We could in theory deliver vulnerability information on request via an API.

I see this is as long term option as an API service would raise our costs (not an option) at the moment. But the idea is worth noting for now.

Web frontend and scripts generating JSON?

Hi,

I would very much like to replicate the web frontend on a local site as well as be able to include additional remotes/branches (mostly downstream kernel forks) to the list of kernels affected/fixed. Do you have any plans to make the web frontend as well as the tools used to produce the json files available in the near future?

Thanks a lot for doing this!

[BUG] Contact Us button directed incorrectly

Describe the bug
The Contact Us button goes to the donate page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to www.linuxkernelcves.com
  2. Click on 'Contact US'

Expected behavior
Expected a Form or Email mailto to pop up.

Desktop (please complete the following information):

  • OS: Debian 9
  • Browser: Firefox 58

Rework 404 page

Also possibly add option to submit missing CVE's if the user think we are missing it instead of it not existing.

Stream navigation should source data from /kern.json

Is your feature request related to a problem? Please describe.
Stream navigation uses top level hierarchy (by folders), but as data is added, additional folders appear as streams (like .github, ui).

Describe the solution you'd like
Use provided /kern.json

Describe alternatives you've considered
Explicit filtering. Not scalable.

Named CVE support

Add tracking and data for named CVE's ie DirtyCOW, Spectre, Meltdown ...etc.

Add NVD Text to CVE page

Describe the solution you'd like
Add the NVD text to the CVE report.

Describe alternatives you've considered

  1. No text - Seems like we could use more context for people in a rush and not wanting to search down the commits.
  2. Our own summary - Not enough resources to write up a summary for each kernel vuln.

Upgrade Webpack

Upgrade webpack-dev-server to version 3.1.11 or later to fix vulnerable dependency.

Ignore vendor specific kernel issues

Because this tracker is concerned with upstream kernels, the CVEs introduced by vendor patches should be ignored. This will likely require some sort of flag to be carried with the CVE in the json. I am not prepared to make this decision yet so filing this as a placeholder and a reminder it needs to be done. This will clear up several CVEs across all streams that appear as "Unknown fix"

CVEs caused by backporting

Several CVEs (mostly early ones) were caused by backporting commits. How will we handle these? Do we created a separate flag for this type of thing. For instance commit B was back ported to streams X,Y where they caused a security issue in X,Y but not in the stream that the commit was originally applied for. This will require some thought.

Remove shebang from urls

This is also going to take removing it from the sitemap generator and the change file generator.

Holding off to update CVEs.txt

I am holding off to update CVEs.txt until I get the stream reporting up and running. Its working now, but just ensuring accuracy and stability across all streams ....

Validate all CVEs are present

We need to make sure that there are not missing CVEs in the CVEs.txt. If there are we need to understand why, and where we can pull these CVEs from. This must be done in an automated fashion otherwise the amount of work is push effort/reward threshold.

[BUG] CVE drop down blocked by CHANGES

Describe the bug
CVE input suggestions drop down is blocked by the CHANGES window on some scales.

To Reproduce
Steps to reproduce the behavior:

  1. Size the Window so that the CVE input bar overlaps with the CHANGES window
  2. Start typing a CVE id

Expected behavior
Expected the suggestion drop down to be on top of the CHANGES window

Screenshots
screen shot 2019-01-18 at 9 32 42 am

Desktop (please complete the following information):

  • OS: MacOS High Sierra
  • chrome
  • Version 71.0.3578.98

Implement Staging Branch

This will be the staging branch to use, from which master will pull for UI/Major changes. in the CI infrastructure this should deploy to the test instance.

Re-structure the repo structure

I am thinking of moving the stream folders down one level into a "data" folder. What (if any) issues would this cause for the web frontend. There are some thing I know that will have to change on the backend.
@quietcorey

Vulnerability Time Line [Wishlist item]

Describe the solution you'd like
Visualization of the life of a vulnerabilities. Important dates/points for a vulnerability can be mapped given the data we have. It would be nice to visualize that in a time line or graph of some sort.

Testing instance

Is your feature request related to a problem? Please describe.
Current testing requires manual changes to code for branch changes and/or url changes.

Describe the solution you'd like
Need a solution that will easily allow for test instances to be hosted in the test bucket and pull from a test branch without manual code changes.

Recent Updates

Is your feature request related to a problem? Please describe.
Its hard to tell when and what has change recently.

Describe the solution you'd like
Add a "Recent Update" page that essentially displays key information from the last update. This could be done in RSS format as well if desired. I see the back-end auto compiling a summary of updates and then front-end essentially just feeding that summary to the/recent_updates page.

Describe alternatives you've considered
The only place this information exists is the github commit section but it requires heavy parsing on the user to read.

CVE-2004-0230

The breaks/fixes for this is not immediately clear. Clearly mitigations are readily available however in order to be accurate the commits would be nice if the CVE was fixed via code.

[DATA] CVE-2005-3660

Quick research yielded no known fix for this issue. It is unclear if this CVE was fixed via patch or if it was left to be handled by other mitigations.

[BUG] Incorrect favicon.ico

Describe the bug
The favicon.ico is not the correct one.

Additional context
It was discovered upon implementing the ci/cd pipeling the favicon.ico in the source control is not the correct one.

[BUG] If mainline and a stream have different fixes, only the mainline is shown

Describe the bug
If a CVE is fixed differently in the streams than in mainline, only the mainline commit is show and scanned.

Expected behavior
I expect a stream fix to be tracked separately and displayed correctly.

Additional context
Right now it is possible to manually add a fix for an individual stream but when printed the cmt_msg will incorrectly show the mainline cmt_msg. (the cmt_hash and versions will be correct however.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.