Skip to content

fix(api): Linux kernel version queries miss populated ecosystem ranges #6319

Open

Description

@coygeek

Summary

A version query for the documented Linux ecosystem and Kernel package returns no vulnerabilities for 6.1.100, even though current records contain affected ecosystem ranges covering that release. The corresponding Git-tag query returns records, including a concrete same-branch example below. This makes the package/version API path give a clean result for an affected kernel release.

Runtime or environment

Observed against the public OSV API on 2026-11-10. Source inspection used a fresh master checkout at 59ebdcf7cf1d1855b72528dcf84cec3ef43ccef0; the deployed API revision is not exposed and was not established. The latest GitHub release is v0.1.3, an archived PyPI package release rather than a release baseline for the hosted API; that package was not used to reproduce this service behavior.

Steps to reproduce

  1. POST this JSON to https://api.osv.dev/v1/query, preserving the query fields and adding each returned next_page_token as page_token until no token remains:
{"package":{"ecosystem":"Linux","name":"Kernel"},"version":"6.1.100"}
  1. Inspect CVE-2022-49034. Its Linux/Kernel affected entry includes this ecosystem range, with no enumerated versions list:
{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.120"}]}
  1. As a control, exhaust pagination for this query to the same endpoint:
{"package":{"ecosystem":"GIT","name":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},"version":"v6.1.100"}

Expected behavior

The query API documentation describes package/version vulnerability lookup and identifies the schema ecosystem list as the valid names. The schema defines Linux as the Linux kernel with Kernel as its supported package name. The example record's ecosystem range covers the queried release, on the same stable branch as the fixed endpoint, so it should be returned by the package/version query. This does not require all Git and ecosystem query results to be identical.

Actual behavior

The package/version query returned zero vulnerabilities across five pages; the first four empty responses still carried continuation tokens. The Git control returned 716 unique records across three pages, including the example CVE. Thus this is not an early stop at the first empty page, an absent record, or a query for a malformed version.

Evidence

  • Expected source: The API and schema documentation linked above, together with the example record's explicit affected interval.
  • Failure source: The executed, fully paginated queries above and the public example record.
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete

In the inspected source, go/osv/ecosystem/ecosystem.go has no Linux helper registration. go/internal/database/datastore/vulnerability_matching.go, buildVersionMatcher, falls back to versionIsMatchString when the helper is absent. That matcher checks AffectedVersions.Versions and does not evaluate Events. go/internal/database/datastore/affected_versions.go, computeAffectedVersions, stores ecosystem ranges and enumerated versions per affected entry. Current CVE records have Git tags in a separate Git affected entry, leaving the Linux entry with ranges but no enumerated versions. This is a source-level explanation consistent with the observation, not proof of the deployed revision.

Restoration check

Exhausting pagination for the package/version query returns the example CVE while retaining the Git control's ability to find it. An unaffected release at or above the same-branch fixed endpoint should not match this record through that interval. Preserve stable-branch semantics rather than treating all kernel releases as a single globally fixed timeline.

References

Closed issue #1000 concerned Linux version-query timeouts and was automatically closed as stale. This report concerns a current completed zero-result query despite a populated affected range. Closed issue #472 requested version ranges and was closed with the explanation that CVEList ingestion now supplies Linux/Kernel ranges; those ranges are present in the example but do not make its version query match.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: A valid package/version lookup returns no vulnerabilities despite a concrete applicable interval in an available record. The demonstrated scope is Linux kernel queries with range-only ecosystem entries.
  • Workaround status: available
  • Workaround basis: The Git-tag control finds the concrete example. This is a workaround for this demonstrated missing result, not a claim that Git queries provide complete kernel coverage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions