Repository navigation
Bump vendored expat from 2.9.0 to 2.10.0 - #130311
Conversation
`expat` is not a submodule: Poco vendors it, so the sources are re-vendored by hand. This brings `base/poco/XML` from upstream `R_2_9_0` (commit a76b1174c1ea) to `R_2_10_0` (commit a70841d9ffa6). Security fixes that apply to code compiled here: - CVE-2026-113351 - denial of service via `XML_ParserReset` (`xmlparse.cpp`) - CVE-2026-115506 - billion laughs attacks are now detected quicker and for more of their variations: `accountingCurrentAmplificationTolerated` takes the not-yet-charged indirect bytes, and entity expanded sizes are resolved by an explicit-stack analysis in `resolveEntityClosureExpandedSize` - CVE-2026-117610 - segfault on initial non-final empty subparser parse calls - CVE-2026-118370 - signed integer overflow of `attIndex` and `nPrefixes` in `storeAtts` CVE-2026-124317 is not mentioned in the upstream `Changes` for 2.10.0 (it is not listed among the releases up to `R_2_10_0`) and is not fixed here. Other upstream changes that matter for the compiled code: `XML_Parse` handles `XML_CONTEXT_BYTES == 0` correctly, `m_parsingStatus.finalBuffer` is initialized in `parserInit`, `isCalledFromInsideHandler` is checked first in `XML_Parse`, a missing character-handler reset check and a missing `m_startDoctypeDeclHandler` NULL check are added, `ENTITY.textLen` and `ENTITY.processed` become `size_t`, and integer truncation in `XmlGetAttributes`/`getAtts` is fixed. `parserInit` gained an `isReset` parameter so that `XML_ParserReset` no longer clobbers the amplification properties, and the allocator tracks `bytesAllocatedWhenLastReset` so one document cannot skew the memory accounting of the next. Local modifications re-applied on top of upstream 2.10.0: - the `EXPAT_POCO` blocks that replace expat entropy gathering with `Poco::RandomStream` (including reading into `unsigned long` for macOS) and the `XML_ResetHandlerCallDepth` helper - the `Poco/XML/expat.h` and `Poco/XML/expat_external.h` include paths - explicit casts on `malloc`/`realloc` results and on `void *data`, needed because `xmlparse.cpp` is compiled as C++ - `extern "C"` guards in `internal.h`, `xmltok.h`, `xmlrole.h` and `xcs.h`, which upstream removed when it stopped mixing C and C++ translation units; here `xmlparse.cpp` is C++ while `xmltok.c`, `xmlrole.c` and `xmlxcs.c` are C - the removal of the `EXPAT_*_DEBUG` tracing (`getDebugLevel`, `unsignedCharToPrintable`, the accounting/entity/allocation report helpers, and the `debugLevel` and `peakBytesAllocated` fields), which upstream restructured in this release; the report call sites added by 2.10.0 in `resolveEntityClosureExpandedSize` are dropped as well Files: `entities.h` is a new upstream header included by `xmlparse.cpp` (with the `Poco/XML/expat_external.h` include path applied). `xcs.h` gains the new `xcsnstr` declaration; `xmlxcs.c` (upstream `xcs.c`) gains its definition. `-Wno-declaration-after-statement` is added to the `_poco_xml_expat` target: the new `xcsnstr` in `xmlxcs.c` declares a variable after a statement, which `-Weverything` rejects even under `-std=gnu11`. Co-Authored-By: Claude Code <[email protected]>
|
Workflow [PR], commit [3887c9e] Summary: ✅
AI ReviewSummaryUpdates Poco's vendored Missing context / blind spots
Findings💡 Nits
Final VerdictStatus: ✅ Approve. The description correction is non-blocking; no new inline review threads are warranted. |
The style check's whitespace_check rejects ", "; the other vendored expat headers already carry the collapsed form. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units12 translation units recompiled, 6 s compile time in total, 11 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.08 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. |
Backport #130311 to 26.9: Bump vendored `expat` from 2.9.0 to 2.10.0
Backport #130311 to 26.10: Bump vendored `expat` from 2.9.0 to 2.10.0
Cherry pick #130311 to 26.3: Bump vendored `expat` from 2.9.0 to 2.10.0
Cherry pick #130311 to 26.8: Bump vendored `expat` from 2.9.0 to 2.10.0
Backport #130311 to 26.8: Bump vendored `expat` from 2.9.0 to 2.10.0
Backport #130311 to 26.3: Bump vendored `expat` from 2.9.0 to 2.10.0
Bumps the
expatsources vendored underbase/poco/XMLfrom 2.9.0 to 2.10.0, picking up four security fixes inxmlparse.cpp, which parses every XML config andXMLStreampayload.CVEs
XML_ParserReset.storeAtts.ClickHouse-side changes
base/poco/XML/src,base/poco/XML/include/Poco/XML: upstream 2.10.0 re-vendored; theEXPAT_POCOentropy, debug-removal andextern "C"patches andXML_ResetHandlerCallDepthare re-applied. New upstream headerentities.h.base/poco/XML/CMakeLists.txt:-Wno-declaration-after-statementfor the new upstreamxcsnstr.Behaviour changes
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Update vendored
expatfrom 2.9.0 to 2.10.0 to fix a crash, denial-of-service issues and an integer overflow in XML parsing.Workflow [PR]
Sync PR [sync-upstream/pr/130311]
Version info
26.11.1.1827-master(included in26.11and later)