Skip to content

fix: down-rank unbounded-range CVE matches on vendor-fork components - #30

Merged
nmatt0 merged 1 commit into
masterfrom
fix/vendor-fork-cve-demote
Sep 18, 2026
Merged

nmatt0 merged 1 commit into
masterfrom
fix/vendor-fork-cve-demote

Conversation

@nmatt0

@nmatt0 nmatt0 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

What

Vendor SDK forks of hostapd/wpa_supplicant carry version banners like hostapd v0.8.x_rtw_r24647.20171025 (Realtek's _rtw_ fork — very common on IoT Wi-Fi SoCs; AltoBeam's _ATBM is another). The binary-version detector strips these to a base semver (0.8) for matching, and many NVD CPE ranges have no lower bound, so 0.8 < 2.10 matches CVEs like CVE-2022-23303/23304 (SAE/EAP-pwd side-channels) as high-signal — even though the vulnerable feature (SAE) did not exist until hostapd 2.x, so a 0.8-based fork cannot contain the code. The result is confident, top-of-list false positives.

Change

Two parts:

  1. Fork detection + version fidelity (binary-version). After parsing the base semver, the detector inspects the tail that continued past it. A non-numeric tail (_rtw_, _ATBM, -devel, …) records a Component::fork label ("Realtek SDK" / "AltoBeam SDK" / "vendor fork") and keeps the full on-disk banner in the evidence, instead of the truncated base version.

  2. CVE-join demotion. A match from an unbounded-below range (no exact version and no start bound) on a fork component is dropped from the default high-signal view, with the basis annotated [<fork>; range lower-bound unknown -- verify]. KEV still overrides. The match stays in the full list under --component-cves-all.

This demotes uncertain fork matches without asserting (in)applicability — the honesty bar. A bounded-range CVE that genuinely covers the base version is unaffected, and a non-fork component is unaffected.

Scope / limitation

This is a heuristic down-rank, not proof. The more precise follow-up (tracked separately) is symbol/feature-presence gating — the userspace analog of the kernel's config-gated CVE checklist — which would confirm the vulnerable code is actually present in the binary.

Tests

Unit coverage for the fork label + full-banner evidence, and for the gate: fork + unbounded-below is demoted; either flag alone is kept; KEV overrides. Full unit suite (1406 checks) and integration suite pass; clean under ASan+UBSan.

A binary version banner like "hostapd v0.8.x_rtw_r24647.20171025" is a vendor
SDK fork (here Realtek's "_rtw_" hostapd, ubiquitous on IoT Wi-Fi SoCs). The
version was stripped to a base semver ("0.8") for matching, and the NVD CPE
range for CVEs such as CVE-2022-23303/23304 (SAE side-channels) has no lower
bound, so "0.8 < 2.10" matched them as high-signal even though SAE did not exist
until hostapd 2.x -- the fork's base cannot contain the vulnerable code.

Two changes:
- binary-version detection now records the vendor-fork label (Component::fork)
  when the version tail continued past the base semver with a non-numeric tag,
  and keeps the full on-disk banner in the evidence instead of the truncated
  base (so the fork/revision is not lost).
- the CVE join flags matches from an unbounded-below range and, on a fork
  component, drops them from the default high-signal view (KEV still overrides),
  annotating the basis "... lower-bound unknown -- verify". Such matches remain
  in the full list under --component-cves-all.

This demotes the uncertain fork matches without asserting (in)applicability; a
bounded-range CVE that genuinely covers the base version is unaffected. Add unit
coverage for the fork label/evidence and the gate (fork+unbounded demoted,
either flag alone kept, KEV overrides).
@nmatt0
nmatt0 merged commit a93e954 into master Sep 18, 2026
4 checks passed
@nmatt0
nmatt0 deleted the fix/vendor-fork-cve-demote branch September 18, 2026 05:47
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.

1 participant