Skip to content

Conversation

@rezmoss
Copy link

@rezmoss rezmoss commented Dec 19, 2025

skip cpe matching for linux-kernel packages on major distros like ubuntu to avoid false positives from nvd's version ranges not covering backported fixes

kernel vulns are still found accurately using dpkg/rpm matchers with distro data that includes backported fixes

e.g CVE-2023-2163 for 5.15.0-164 ,fixed in 5.15.0-70.77~20.04.1

…VE-2023-2163

Signed-off-by: Rez Moss <hi@rezmoss.com>
…VE-2023-2163

Signed-off-by: Rez Moss <hi@rezmoss.com>
@rezmoss rezmoss force-pushed the false-post-ubuntu-ubuntu-backfixes branch from 21c89c3 to 40349fd Compare December 19, 2025 21:48
func (m *Matcher) Match(store vulnerability.Provider, p pkg.Package) ([]match.Match, []match.IgnoreFilter, error) {
// skip cpe matching for linux-kernel packages on major distros like ubuntu to avoid false positives from nvd's version ranges not covering backported fixes
// kernel vulns are still found accurately using dpkg/rpm matchers with distro data that includes backported fixes
if p.Type == syftPkg.LinuxKernelPkg && isMainDistro(p.Distro) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is minor, however, since the first branch of this is by package type (kernel) we should make a separate matcher for this. This also keeps the stock matcher as simple as possible (and matchers are tailor made to handle by package type).

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.

2 participants