agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix memory-safety bugs in the ispell/hunspell dictionary loader.
Date: Sun, 02 Aug 2026 17:22:55 +0000
Message-ID: <E1wqZtn-00000001NbX-1JLB@gemulon.postgresql.org> (raw)

Fix memory-safety bugs in the ispell/hunspell dictionary loader.

Allocate CompoundAffix with room for its terminator, initialize the
old-format flag buffer before NIAddAffix(), and reject incomplete or
missing Hunspell AF aliases.  None of these errors would be likely to
trigger on real dictionary files, accounting for the lack of previous
reports; but they're certainly bugs.

Bug: #19595
Reported-by: Michael Malis <michaelmalis2@gmail.com>
Author: Andrey Rachitskiy <pl0h0yp1@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19595-7dc18b4e212c4757@postgresql.org
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3fe4062cc6216e4edee1ac981020173b3dc01a81

Modified Files
--------------
src/backend/tsearch/spell.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1wqZtn-00000001NbX-1JLB@gemulon.postgresql.org>
Permalink:  ../E1wqZtn-00000001NbX-1JLB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wqZtn-00000001NbX-1JLB@gemulon.postgresql.org

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix memory-safety bugs in the ispell/hunspell dictionary loader.
  In-Reply-To: <E1wqZtn-00000001NbX-1JLB@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox