Skip to content

Improve affected git range enumeration #6221

Open

Description

@Ly-Joey

Ideally, consider_all_branches would be the default way to enumerate affected commits.
However, enabling it by default across all records may introduce too many false positives because of data quality issues (such as incomplete fixed / last_affected commits leading to unbounded affected branches).

Because of this, our current default is the more conservative single-branch backwards traversal. But it breaks on repos with non-linear tagging and release workflow (e.g. php-src in #6216).

Some initial TODOs:

  • Investigate real-world repo topologies and group them into common branching / tagging patterns
  • Per-repo consider-all-branches enabling if it's not too problematic
  • Explore alternative algorithms (?)

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. coygeek commented on Nov 10, 2026

    @coygeek

    The Linux stable tree supplies another topology for the per-repository analysis here: an end-of-life stable branch can contain the introducing commit without containing any recorded fix, while the fixes live on other stable branches and mainline. This differs from the off-branch release tags discussed in #6216.

    I exhausted pagination for the GIT query using repository https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git and tag v7.2.15: five unique CVEs were returned across three pages, with continuation tokens on the first two. Four omitted examples are below. Each record is already imported; its hash-based Git range agrees with the kernel CNA input, and its Git affected entry has no enumerated versions.

    Omitted record Introducing commit Releases containing the recorded fixes
    CVE-2026-99271 63e20df1e5b2ef8d871ecbdb6c038d554ed1ca74 6.18.61, 7.3.2, 7.4-rc1
    CVE-2026-99272 d8e050398d23ef7c019c96200b80d73f4e5cec0c 7.3.2, 7.4-rc1
    CVE-2026-99274 2f3ebaba13cebd8badfb9aed31c0cf3cc82eb4f4 6.18.61, 7.3.2, 7.4-rc1
    CVE-2026-99275 5478f9ba9a34d660eb3227dcd16314689c51f946 7.3.2, 7.4-rc1

    The kernel team's per-CVE dyad files associate those commits with the releases above. For all four, I also checked the public stable-tree mirror's compare API: comparing each introducing hash to v7.2.15 reports ahead with behind_by: 0 and the introducing hash as merge base; comparing every listed fixing hash to that tag reports diverged. For example, this introducing-commit comparison and this stable-fix comparison show the distinction for the first row. The tag's peeled commit matches kernel.org's 497791a0a96b866d90add64041c47acdff49cae6.

    At source revision 59ebdcf7cf1d1855b72528dcf84cec3ef43ccef0, go/cmd/gitter/gitter.go defaults bounded ranges to AffectedSingleBranch; repository.go describes that operation as a backward first-parent walk from the fixed/last-affected commits. That is consistent with these omissions: none of those backward walks reaches the target stable branch after it diverges. I did not establish the deployed revision or run a replacement enumeration algorithm.

    These examples establish missing matches relative to the published introducing/fixing commit relationships, not system-specific exploitability or a requirement that the kernel CNA backport fixes to an unsupported branch. They may be useful cases when evaluating the false-positive/false-negative tradeoff described in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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