From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: dict_int: Return NULL for zero-length tokens.
Date: Mon, 09 Nov 2026 14:21:58 +0000
Message-ID: <E1xQQFy-000000003dN-3GxU@gemulon.postgresql.org> (raw)
dict_int: Return NULL for zero-length tokens.
dintdict_lexize() does not check for zero-length tokens before
inspecting its input, so it can read past the end of the token. In
some cases, the returned lexeme can even contain data from well
beyond it. To fix, return NULL for a zero-length token, as
dict_ispell, dict_synonym, and dict_xsyn already do.
Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Reported-by: Anthropic OSS program
Author: Nathan Bossart <nathandbossart@gmail.com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Tatsuo Ishii <ishii@postgresql.org>
Security: CVE-2026-116308
Backpatch-through: 14
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8373a421558c05813ae6d428102892de38a934ea
Author: Nathan Bossart <nathan@postgresql.org>
Modified Files
--------------
contrib/dict_int/dict_int.c | 6 +++++-
contrib/dict_int/expected/dict_int.out | 6 ++++++
contrib/dict_int/sql/dict_int.sql | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: noah@leadboat.com
Subject: Re: pgsql: dict_int: Return NULL for zero-length tokens.
In-Reply-To: <E1xQQFy-000000003dN-3GxU@gemulon.postgresql.org>
References: <E1xQQFy-000000003dN-3GxU@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox