| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: dict_int: Return NULL for zero-length tokens. |
| Date: | 2026-11-09 14:21:53 |
| Message-ID: | E1xQQFt-000000003SI-39Al@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Reported-by: Anthropic OSS program
Author: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Co-authored-by: Anthropic OSS program
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Reviewed-by: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Security: CVE-2026-116308
Backpatch-through: 14
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/19b5650880653478844141beabd4da5615bbeb2c
Author: Nathan Bossart <nathan(at)postgresql(dot)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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:54 | pgsql: Fix use-after-free in pg_show_all_settings(). |
| Previous Message | Noah Misch | 2026-11-09 14:21:52 | pgsql: Avoid use-after-free hazards in re-entrant use of pltcl. |