[AutoPR- Security] Patch cloud-provider-kubevirt for CVE-2026-42502, CVE-2026-25681, CVE-2026-25680 [MEDIUM]#17575
Conversation
🔒 CVE Patch Review: CVE-2026-25680, CVE-2026-25681, CVE-2026-42502PR #17575 — [AutoPR- Security] Patch cloud-provider-kubevirt for CVE-2026-42502, CVE-2026-25681, CVE-2026-25680 [MEDIUM] Spec File Validation
Build VerificationBuild log analysis was skipped (no build ID available). Patch Analysis
|
🔒 CVE Patch Review: CVE-2026-25680, CVE-2026-25681, CVE-2026-42502PR #17575 — [AutoPR- Security] Patch cloud-provider-kubevirt for CVE-2026-42502, CVE-2026-25681, CVE-2026-25680 [MEDIUM] Spec File Validation
Build VerificationBuild log analysis was skipped (no build ID available). Patch Analysis
Detailed analysisCore change parity:
Context/path differences:
Completeness:
Risk assessment:
Comparison shows the PR patch mirrors the upstream commit in substance. In vendor/golang.org/x/net/html/render.go, all three call sites in render1 that previously used writeQuoted now call writeDoctypeQuoted for PUBLIC and SYSTEM identifiers, matching upstream. The helper function is renamed from writeQuoted to writeDoctypeQuoted and gains the same new behavior: it escapes all '>' characters via strings.ReplaceAll(s, ">", ">") to avoid abrupt-doctype-system-identifier parse errors, and it adds a safety check returning errors.New("doctype contains both quote types, cannot be safely rendered") if both quote types appear. The comments around the function are updated identically. The context/line numbers differ slightly (-251 vs -267), which is expected in a backport, but the code inside the hunks is the same. The PR also adds vendor/golang.org/x/net/html/testdata/go/doctype_named_entity.dat with the exact contents from upstream. No upstream hunks are missing, and there are no extra behavioral changes. As this is a straightforward backport to a vendored copy, the risk is low and equivalent to upstream; the only potential consideration is that the file already imported strings (as used before) and errors is commonly imported in render.go, which upstream also relied upon without altering imports. The fix should prevent sanitizer bypass via '>' in DOCTYPE identifiers without introducing regressions beyond rejecting malformed nodes with both quote types, exactly as upstream intended.Core fix comparison: The upstream patch changes html/render.go in childTextNodesAreLiteral to handle fostered nodes whose effective context is a non-HTML namespace. Specifically, for raw-text elements (iframe, noembed, noframes, noscript, plaintext, script, style, xmp), it walks up ancestor nodes until it finds a non-empty namespace; if found and the ancestor is not an HTML integration point, it returns false (i.e., do not treat child text nodes as literal). This prevents emitting raw, unescaped text when such elements are fostered into foreign content. The PR patch applies exactly this logic in vendor/golang.org/x/net/html/render.go with identical code: same switch cases, same ancestor walk, same htmlIntegrationPoint(p) guard, same return values, and equivalent whitespace/context. Differences vs upstream: The PR only modifies the vendored render.go and does not include the upstream test changes (parse_test.go blacklist entry, a new render test, and a new .dat test file). This is expected in a packaging backport where tests are not shipped or run. No other behavioral changes are present. Preconditions/compatibility: The change relies on htmlIntegrationPoint existing in the vendored version; this function is part of x/net/html and is used identically upstream for integration point determination, so compatibility risk is low. Security impact: The fix closes the hole where fostered raw-text elements in foreign content could be treated as literal, potentially allowing unescaped content. Risk of regression is low because the new logic only affects cases where an ancestor has a non-empty namespace and is not an HTML integration point; in normal HTML trees behavior is unchanged. Overall, the PR is a faithful backport of the upstream fix without tests. Verdict✅ APPROVED — All checks passed. Ready to merge. |
Kanishk-Bansal
left a comment
There was a problem hiding this comment.
Patch Analysis (matches upstream, test files omitted)
in the prep section we cant make it one command as I tried to build but the current vendor is getting override and causing build failures, we need to keep the current logic to rm -rf vendor
- Buddy Build
- patch applied during the build (check
rpm.log) - patch include an upstream reference
- PR has security tag
kgodara912
left a comment
There was a problem hiding this comment.
All 3 patches match with respective upstream references except the last where tests are omitted as vendor tarballs dont' have test files. Buddy build is successful. PR checks are known failures with recent twisted changes. LGTM.
Auto Patch cloud-provider-kubevirt for CVE-2026-42502, CVE-2026-25681, CVE-2026-25680.
Autosec pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=1130142&view=results
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
What does the PR accomplish, why was it needed?
Change Log
Does this affect the toolchain?
YES/NO
Associated issues
Links to CVEs
Test Methodology