kernelci / kernelci/kernelci-core

CVEhound

Open
#803 24 comments 0 reactions 0 assignees View on GitHub
native tests
Dominant language
Python
Stars
120
Forks
107
Avg merge
1d 2h
Merged PRs (30d)
21

Description

[CVEhound](https://github.com/evdenis/cvehound/) checks kernel trees for missing backports of CVE fixes. The tool doesn't require building a kernel. However, it can use a .config file to limit the scope of the check. The tool can produce json report with --report flag. Use examples:
```bash
# simple check of linux directory for all CVEs
$ cvehound --kernel ./linux
Found: CVE-2020-27830
Found: CVE-2020-27152
Found: CVE-2020-29371
Found: CVE-2020-26088

# -v to output more information --cve CVE1 CVE2 to check only for particular cves
$ cvehound --kernel . --cve CVE-2020-25639 -v
Found: CVE-2020-25639
MSG: drm/nouveau: bail out of nouveau_channel_new if channel init fails
CWE: NULL Pointer Dereference
CVSS2: 4.9
CVSS3: 4.4
FIX DATE: 2021-01-29 06:49:15
https://www.linuxkernelcves.com/cves/CVE-2020-25639

# to generate a json report use
$ cvehound --kernel . --report report.json
Found: CVE-2020-25639
Report saved to: report.json

# to check a config file
cvehound --kernel . --cve CVE-2020-25639 --config .config
Found: CVE-2020-25639
MSG: drm/nouveau: bail out of nouveau_channel_new if channel init fails
CWE: NULL Pointer Dereference
CVSS2: 4.9
CVSS3: 4.4
FIX DATE: 2021-01-29 06:49:15
https://www.linuxkernelcves.com/cves/CVE-2020-25639
Affected Files:
- ./drivers/gpu/drm/nouveau/nouveau_chan.c: CONFIG_DRM_NOUVEAU
./.config: not affected
Config: ./.config not affected
```

The tool uses [coccinelle](https://www.kernel.org/doc/html/latest/dev-tools/coccinelle.html) internally and can use the same container as for coccinelle static analysis.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the CVEhound usage examples and the closed linked pull request #1081 first to understand the intended integration. Clarify how --kernel, --cve, --config, and --report should be exposed, then define completion around a working integration that can use the coccinelle container.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.