Skip to content

Build against datasketches-cpp 5.3.0 - #80

Merged
leerho merged 1 commit into
masterfrom
cpp-5.3.0
Oct 10, 2026
Merged

leerho merged 1 commit into
masterfrom
cpp-5.3.0

Conversation

@leerho

@leerho leerho commented Oct 10, 2026

Copy link
Copy Markdown
Member

Moves the bundled C++ core library from 5.2.0 to 5.3.0 in package.sh (CORETAG) and the Dockerfile (DATASKETCHES_CPP_VERSION).

Why

C++ 5.3.0 fixes five vulnerabilities in sketch deserialization (https://datasketches.apache.org/docs/Community/Security.html). Three of them are in sketches this extension exposes:

The extension deserializes these sketches from bytea values, inside the PostgreSQL server process. Any user who can run a query can pass a crafted value, so the released extension (1.7.0, bundling C++ 5.0.0) is affected. A 1.8.0 release built on this change would fix it.

Dockerfile hash

DATASKETCHES_CPP_HASH was still the value from when the Dockerfile was added in 2020. It did not match the 5.2.0 source zip (whose SHA-1 is ee7ab0cd…), so the Docker build's sha1sum -c step failed. It is now e19d4357d938da8ce109ffbd3d47c25fc950a518, the SHA-1 of apache-datasketches-cpp-5.3.0-src.zip on downloads.apache.org (it matches the signed release artifact).

Testing

The extension compiles cleanly on macOS against the 5.3.0 source release with PostgreSQL 14. I did not run the SQL tests locally; CI builds against datasketches-cpp master, which contains 5.3.0. The C++ API changes in 5.3.0 that broke the Python bindings (update_theta_sketch::compact and hll_sketch::reset gained a defaulted parameter) do not affect this code, which calls those functions directly.

🤖 Generated with Claude Code

C++ 5.3.0 fixes deserialization vulnerabilities in the HLL, CPC and Theta
sketches (CVE-2026-103501, CVE-2026-103513, CVE-2026-103635). This
extension deserializes those sketches from bytea values inside the
PostgreSQL server process, so it inherits them.

Also corrects DATASKETCHES_CPP_HASH in the Dockerfile. It was still the
value from 2020 and did not match the 5.2.0 source zip, so the Docker
build's sha1sum check failed. The new value is the SHA-1 of
apache-datasketches-cpp-5.3.0-src.zip on downloads.apache.org.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leerho
leerho merged commit 56d8712 into master Oct 10, 2026
1 check passed
@leerho
leerho deleted the cpp-5.3.0 branch October 10, 2026 19:16
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