Skip to content

Fix crashes with malformed compressed data - #10360

Merged
dbeck merged 1 commit into
mainfrom
dbeck/cve_fixes
Aug 3, 2026
Merged

Fix crashes with malformed compressed data#10360
dbeck merged 1 commit into
mainfrom
dbeck/cve_fixes

Conversation

@dbeck

@dbeck dbeck commented Jul 29, 2026

Copy link
Copy Markdown
Member

The Gorilla and Dictionary compressors crashed on malformed data with the reverse decompression iterator and the bulk decompressor.

This issue was reported by Mehmet Ince @mdisec https://mehmetince.net/, and the test case binaries are his contribution that I integrated into the fuzzer test suite.

This change adds validation for these cases and adds reverse iterator coverage to the fuzzer tests, so the randomised test will catch future issues. It already caught issues in other compressors like deltadelta, which I also fixed in this review.

@github-actions

Copy link
Copy Markdown

@melihmutlu, @svenklemm: please review this pull request.

Powered by pull-review

@dbeck
dbeck requested review from akuzm and removed request for melihmutlu July 29, 2026 18:37
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 2 times, most recently from 4529c6f to 94cb6cd Compare July 29, 2026 18:40
Comment thread tsl/test/src/decompress_arithmetic_test_impl.c Outdated
Comment thread tsl/test/src/decompress_arithmetic_test_impl.c
Comment thread tsl/test/sql/compression_crashes.sql Outdated
Comment thread tsl/src/compression/algorithms/gorilla.c Outdated
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 3 times, most recently from b058b38 to e536225 Compare July 29, 2026 19:20
Comment thread .unreleased/pr_10360 Outdated
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 9 times, most recently from f6bdb88 to d759ebf Compare July 30, 2026 16:13
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 3 times, most recently from 26e9840 to 99992d1 Compare July 30, 2026 16:58
@dbeck dbeck added the bug label Jul 30, 2026
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 10 times, most recently from e6cbac2 to 7d64574 Compare August 2, 2026 10:36
@dbeck dbeck changed the title Fixing crashes with malformed compressed data Fix crashes with malformed compressed data Aug 2, 2026
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch 6 times, most recently from d9e9551 to 06711b5 Compare August 3, 2026 01:02
Comment thread tsl/src/compression/algorithms/deltadelta_impl.c
The Gorilla and Dictionary compressors crashed on malformed data
with the reverse decompression iterator and the bulk decompressor.

This issue was reported by Mehmet Ince @mdisec https://mehmetince.net/,
and the test case binaries are his contribution that I integrated into
the fuzzer test suite.

This change adds validation for these cases and adds reverse iterator
coverage to the fuzzer tests, so the randomised test will catch future
issues. It already caught issues in other compressors like deltadelta,
which I also fixed in this review.
@dbeck
dbeck force-pushed the dbeck/cve_fixes branch from 06711b5 to 72d7af3 Compare August 3, 2026 14:26
@dbeck
dbeck enabled auto-merge (rebase) August 3, 2026 14:34
@dbeck
dbeck merged commit 517c13e into main Aug 3, 2026
79 of 82 checks passed
@dbeck
dbeck deleted the dbeck/cve_fixes branch August 3, 2026 14:40
@surister surister mentioned this pull request Aug 4, 2026
surister pushed a commit that referenced this pull request Aug 4, 2026
# TimescaleDB Changelog

**Please note: When updating your database, you should connect using
`psql` with the `-X` flag to prevent any `.psqlrc` commands from
accidentally triggering the load of a previous TimescaleDB version.**

## 2.29.1 (2026-08-04)

This release contains performance improvements and bug fixes since the
2.29.0 release and fixes for security vulnerabilities (#10360, #10379,
#10386). You can check the [security
advisory](https://github.com/timescale/timescaledb/security/advisories/GHSA-hcfx-29v5-2rcw)
for more information on the vulnerability and the platforms that are
affected. We recommend that you upgrade at the next available
opportunity.

**Bugfixes**
* [#10327](#10327)
Assertion failure in `add_dimension()` when the hypertable argument is
`NULL`
* [#10339](#10339) Fix
crash when deleting from a compressed continuous aggregate source
* [#10340](#10340) Validate
`max_batches` in `compact_chunk()`
* [#10352](#10352) Reset
inherited column and constraint flags on chunks during `attach_chunk()`
* [#10360](#10360) Fix
decompressor crashes with malformed compressed data
* [#10369](#10369) Fix typo
in error message about `MERGE` support on compressed hypertables
* [#10379](#10379) Read
hypertable max time value with an ordered scan
* [#10386](#10386) Add
missing permission checks to internal chunk functions

**Thanks**
* @JoongHyuk-Shin for reporting and fixing `NULL` handling in
`add_dimension()`
* @igor2x for reporting a typo in a `MERGE` support error message
* @mdisec for reporting issues with compressed data validation during
decompression
@timescale-automation timescale-automation added the released-2.29.1 Released in 2.29.1 label Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants