Commit e45a74c
feat(hw-fw): CVE-2023-20819 modem-family version_regex — forward-prepared
Reviewer B 2026-05-15-PM HIGH carried-forward from postmortem-hw-firmware-
tegra-activation-2026-05-15. Per Rule digitalandrew#19 recursive NVD-CPE
verification, NVD CPE narrows CVE-2023-20819 to exactly 6 MediaTek
modem-OS families: lr11 / lr12a / lr13 / nr15 / nr16 / nr17. The
hardware chipset CPEs (66 entries MT2731..MT8798) are sibling
AND-nodes describing the runtime substrate, NOT version anchors.
Pre-narrowing the entry fired on EVERY MediaTek modem blob (20 rows
current corpus) regardless of family. Post-narrowing, the
version_regex restricts firings to blobs whose `version` field
contains an NVD-CPE-affected family token.
NVD-CPE verification (recursive — implementer-side WebFetch in scout
report + this commit re-verifies regex against published CPE strings):
- cpe:2.3:o:mediatek:lr11:-:*:*:*:*:*:*:*
- cpe:2.3:o:mediatek:lr12a:-:*:*:*:*:*:*:*
- cpe:2.3:o:mediatek:lr13:-:*:*:*:*:*:*:*
- cpe:2.3:o:mediatek:nr15:-:*:*:*:*:*:*:*
- cpe:2.3:o:mediatek:nr16:-:*:*:*:*:*:*:*
- cpe:2.3:o:mediatek:nr17:-:*:*:*:*:*:*:*
Regex shape (boundary-aware, case-insensitive):
(?i)(?:^|[^a-z0-9])(lr11|lr12a|lr13|nr15|nr16|nr17)(?:[^a-z0-9]|$)
Boundary check (`(?:^|[^a-z0-9])` / `(?:[^a-z0-9]|$)`) prevents false
positives on confused substrings — e.g. `nr155_else` (nr155 ≠ nr15)
and `lr12abc` (lr12abc ≠ lr12a). Tolerates dot, underscore, and
end-of-string separators per the canonical MOLY banner shapes
(MOLY.LR12A.R3.MP.V101 / MOLY_NR16_R1 / bare `lr12a`).
Forward-prepared per Tegra precedent (Pattern digitalandrew#3 from postmortem-hw-
firmware-tegra-activation-2026-05-15 — forward-prepared CVE pins ship
with documented activation conditions; activate via N follow-up
commits when extraction infrastructure lands). Current state:
- mtk_modem parser DOES NOT populate blob.version with MOLY banner
(Scout 3 verified via parsers/mediatek_modem.py:46-50 _VERSION_RES
regex set — none of the patterns capture lr11..nr17)
- matcher version_regex semantics are HARD REJECT (Scout 3 verified
via cve_matcher.py:480-491; comment confirms "Stays STRICT — when
present, version evidence MUST be found")
- Net corpus effect post-rebuild: CVE-2023-20819 row count
20 → 0 (BETTER than the over-attributed pre-narrowing rows per
Reviewer B's NVD-CPE evidence; activates when mtk_modem parser
ships version-banner extraction in a future session)
5 new paired-canary tests (Rule #46):
- test_cve_2023_20819_version_regex_present_and_matches_six_families
(positive: all 6 NVD families in real-world MOLY banner shapes;
negative: LR18/NR18/LR12 out-of-scope + confused-substring
guards `nr155_else` and `lr12abc`)
- test_cve_2023_20819_hard_rejects_blob_with_null_version (gate-
canary asserts the matcher's HARD-REJECT version_regex semantics
actually fire on NULL — without this, a silent regression to
soft-fallback would re-introduce the over-attribution)
- test_cve_2023_20819_fires_when_version_contains_lr12a (Rule #46
positive-arm — confirms the gate doesn't silently drop all
matches due to a regex bug; activates with mtk_modem parser
shipment)
- test_cve_2023_20819_excludes_out_of_scope_family_versions (Rule
#46 negative-arm — even with MOLY banner present, out-of-NVD-
scope families like LR18 must not fire)
- test_cve_2023_20819_entry_satisfies_f_forensic_10_gate (asserts
the entry survives the F-FORENSIC-10 load filter)
Verification: all 5 new tests pass; full cve_matcher + forensic10
alignment suite (98 tests) passes under
`uv run --frozen pytest backend/tests/test_hardware_firmware_cve_matcher.py
backend/tests/test_forensic10_alignment.py -v`.
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-20819
- M-MOLY01068234 (MediaTek PSB)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 54a0a32 commit e45a74c
2 files changed
Lines changed: 237 additions & 0 deletions
File tree
- backend
- app/services/hardware_firmware
- tests
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
397 | 417 | | |
398 | 418 | | |
399 | 419 | | |
| |||
403 | 423 | | |
404 | 424 | | |
405 | 425 | | |
| 426 | + | |
406 | 427 | | |
407 | 428 | | |
408 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
1974 | 2190 | | |
1975 | 2191 | | |
1976 | 2192 | | |
| |||
0 commit comments