Skip to content

fix: harden native extension for PostgreSQL 18.7 / 17.12 - #5

Merged
wezell merged 9 commits into
dotcms-0.2.0from
fix/pg18-security
Nov 13, 2026
Merged

wezell merged 9 commits into
dotcms-0.2.0from
fix/pg18-security

Conversation

@wezell

@wezell wezell commented Nov 13, 2026

Copy link
Copy Markdown
Member

Why

Unblocks https://github.com/dotCMS/ovh-k8s-cluster/issues/1186. PostgreSQL 18.7/17.12 require rebuilt native extensions for CVE-2026-6460; old pgrx's handwritten header helpers miss the new checks. This is based on the dotCMS production fork, preserving all .6 fixes.

Changes

  • Pin pgrx/cargo-pgrx 0.20.0 and Rust 1.99.1; use patched PGDG headers and locked package builds. Remove obsolete pgrx_embed binaries.
  • Translate removed helpers to generated PostgreSQL macros/native bindings, preserving null checks and pointer lifetimes. No compression format, schema or catalog DDL changes intended.
  • Require lz4_flex 0.11.6 and Parquet 58.4.1 (fixed thrift 0.23). Refresh Cargo.lock; pgrx's newer test harness also removes old postgres-protocol/tokio-postgres dependencies.
  • Add a security regression that must reject a stale composite datum after a rolled-back type alteration instead of interpreting text storage as bigint.
  • Address the small Rust 1.99 clippy changes, passing the existing drain iterator straight through without losing buffer capacity.
  • Reserve a NEW release version 0.2.0-dotcms.7. Existing assets are untouched.

Checks / release gates

cargo check and strict clippy on PG18 pass locally. Full unit and integration/correctness suites are running locally/CI. Trivy source-lockfile scan currently reports no findings; that is not an exploitability or complete runtime-safety claim.

Before publication/production use, qualify .6-compressed data reads, existing SQL/C-symbol compatibility and the composite-datum regression on both supported PG versions. The platform image still has unrelated unpatched OS findings. No production deployment is performed by this PR.

@wezell

wezell commented Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Completed PG17/18 integration suites and lint have passed on this security branch; the current head is still rerunning. Standalone Rust loader failures were not backend regressions. New pgrx dependencies remain in x86 test relocations even when unused. Added trapping weak stubs, and diagnostic nm output identified the complete remaining backend set on both majors: MemoryContextRegisterResetCallback and InterruptHoldoffCount. Both are now resolved. The new function stubs trap if called, rather than silently mocking backend memory allocation. No production code was changed for this CI-only issue. Local full PG18 backend suite remains 533 passed; final CI rerun is pending.

@wezell

wezell commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

All seven checks now pass on a26642d: PG17/18 backend unit suites, PG17/18 integration, PG18 correctness, strict lint, and dependency security. The standalone loader now resolves its complete new dependency set; new function stubs trap on accidental use. Local old-data upgrade fixture passed, all 31 legacy C entrypoints remain exported, and all 34 live SQL 0.2.0 function contracts match fresh candidate .7 definitions exactly. No production mutation. Preparing the versioned .7 release for downstream artifact qualification.

@wezell
wezell merged commit 15d41fa into dotcms-0.2.0 Nov 13, 2026
7 checks passed
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