| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix overflows with ts_headline() |
| Date: | 2026-05-11 12:19:40 |
| Message-ID: | E1wMPbo-0002eT-1q@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix overflows with ts_headline()
The options "StartSel", "StopSel" and "FragmentDelimiter" given by a
caller of the SQL function ts_headline() have their lengths stored as
int16. When providing values larger than PG_INT16_MAX, it was possible
to overflow the length values stored, leading to incorrect behaviors in
generateHeadline(), in most cases translating to a crash.
Attempting to use values for these options larger than PG_INT16_MAX is
now blocked. Some test cases are added to cover our tracks.
Reported-by: Xint Code
Author: Michael Paquier <michael(at)paquier(dot)xyz>
Backpatch-through: 14
Security: CVE-2026-6473
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/2d267ffc449ad9e8a1fbc2e23d4b55754a5a6e02
Author: Michael Paquier <michael(at)paquier(dot)xyz>
Modified Files
--------------
src/backend/tsearch/wparser_def.c | 24 +++++++++++++++++++++---
src/test/regress/expected/tsearch.out | 10 ++++++++++
src/test/regress/sql/tsearch.sql | 8 ++++++++
3 files changed, 39 insertions(+), 3 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-05-11 12:19:41 | pgsql: Check CREATE privilege on multirange type schema in CREATE TYPE. |
| Previous Message | Noah Misch | 2026-05-11 12:19:39 | pgsql: Check CREATE privilege on multirange type schema in CREATE TYPE. |