agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix overflows with ts_headline()
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d388e1d7f0468db8d046f9101f972d1fa988b19a
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/62ad262661ed92b0fbd43e8b7bbd1e0e38cbb9c0
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3ed3dbbf440a81590ade81ac6553dc7380a26561
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5919e0005b6f23292450a44f1db5c6b2e2bb0ddf
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7fe36569395909d18549e9d3098e6ef18d421596
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix overflows with ts_headline()
@ 2026-05-11 12:19  Noah Misch <noah@leadboat.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Noah Misch @ 2026-05-11 12:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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@paquier.xyz>
Backpatch-through: 14
Security: CVE-2026-6473

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2d267ffc449ad9e8a1fbc2e23d4b55754a5a6e02
Author: Michael Paquier <michael@paquier.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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-05-11 12:19 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>
2026-05-11 12:19 pgsql: Fix overflows with ts_headline() Noah Misch <noah@leadboat.com>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox