#150 follow-up: kernel CVEs filtered by the kernel configuration. Tracker #167.
Approach
Prüfwerk does not reimplement kernel filtering. It uses Yocto's own script, scripts/contrib/improve_kernel_cve_report.py, which ships with OE-Core since Scarthgap 5.0. The script compares every kernel CVE of the Linux kernel CNA (the vulns repository, with each CVE's program files) against the files the kernel actually compiled, using the build's debugsources list. It then writes the cve-check report again. That report is uploaded as a build output in place of the image's, and the cve-check reader from #854 handles it.
Verified on the ferrite build (scarthgap 5.0.21, core-image-minimal qemuarm64, linux-yocto 6.6.151), with no rebuild needed:
#150 follow-up: kernel CVEs filtered by the kernel configuration. Tracker #167.
## Approach
Prüfwerk does not reimplement kernel filtering. It uses Yocto's own script, `scripts/contrib/improve_kernel_cve_report.py`, which ships with OE-Core since Scarthgap 5.0. The script compares every kernel CVE of the Linux kernel CNA (the `vulns` repository, with each CVE's program files) against the files the kernel actually compiled, using the build's `debugsources` list. It then writes the cve-check report again. That report is uploaded as a build output in place of the image's, and the cve-check reader from #854 handles it.
**Verified on the ferrite build** (scarthgap 5.0.21, core-image-minimal qemuarm64, linux-yocto 6.6.151), with no rebuild needed:
- 22,001 kernel CVEs in total;
- **2,230** Ignored `not-applicable-config` (not compiled);
- **337** Ignored `rejected`;
- 953 Unpatched;
- the rest Patched.
## What
- `rejected` (withdrawn by the CNA) now becomes `not_affected`.
- Patched `version-not-in-range` now becomes `not_affected` (vulnerable code not present) instead of `fixed`, since the version is simply not affected.
- **Fixture** `fixtures/yocto/linux-yocto.improved-cve-report.json`: a trimmed copy of that run, two CVEs for each verdict, with no local paths.
- **Docs** (`guide/yocto`): a new paragraph *Kernel CVEs and the kernel configuration*, with the commands and the result above, plus the two new mapping rows.
## Tests
- Unit test `the_kernel_report_filtered_by_compiled_files_settles_kernel_cves`:
- not-applicable-config, rejected and version-not-in-range become not affected;
- fixed-version and cpe-stable-backport become fixed;
- version-in-range stays open.
- CI only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Yocto's scripts/contrib/improve_kernel_cve_report.py (OE-Core, since
Scarthgap) checks every kernel CVE of the Linux kernel CNA against the
files the kernel compiled (the build's debug-sources list) and writes
the cve-check report again: Ignored not-applicable-config for code the
configuration does not build, Ignored rejected for withdrawn CVEs,
Patched version-not-in-range outside the affected versions. Uploaded as
a build output, it goes through the cve-check reader (#854).
- rejected becomes not affected; Patched version-not-in-range becomes
not affected (vulnerable code not present) instead of fixed.
- guide/yocto: how to produce the report (no rebuild needed) and the
mapping rows.
- Fixture: a trimmed copy of the report over a real scarthgap kernel
(linux-yocto 6.6.151, core-image-minimal qemuarm64), two CVEs per
verdict; on the full image 2,230 of 22,001 kernel CVEs were not
applicable for the configuration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang
merged commit b531227b45 into main2026-11-05 00:00:51 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
#150 follow-up: kernel CVEs filtered by the kernel configuration. Tracker #167.
Approach
Prüfwerk does not reimplement kernel filtering. It uses Yocto's own script,
scripts/contrib/improve_kernel_cve_report.py, which ships with OE-Core since Scarthgap 5.0. The script compares every kernel CVE of the Linux kernel CNA (thevulnsrepository, with each CVE's program files) against the files the kernel actually compiled, using the build'sdebugsourceslist. It then writes the cve-check report again. That report is uploaded as a build output in place of the image's, and the cve-check reader from #854 handles it.Verified on the ferrite build (scarthgap 5.0.21, core-image-minimal qemuarm64, linux-yocto 6.6.151), with no rebuild needed:
not-applicable-config(not compiled);rejected;What
rejected(withdrawn by the CNA) now becomesnot_affected.version-not-in-rangenow becomesnot_affected(vulnerable code not present) instead offixed, since the version is simply not affected.fixtures/yocto/linux-yocto.improved-cve-report.json: a trimmed copy of that run, two CVEs for each verdict, with no local paths.guide/yocto): a new paragraph Kernel CVEs and the kernel configuration, with the commands and the result above, plus the two new mapping rows.Tests
the_kernel_report_filtered_by_compiled_files_settles_kernel_cves:🤖 Generated with Claude Code