agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix out-of-bound reads with ascii() for invalid multibyte charac
Date: Mon, 10 Aug 2026 13:41:28 +0000
Message-ID: <E1wtQFs-00000000yF7-2M3u@gemulon.postgresql.org> (raw)
Fix out-of-bound reads with ascii() for invalid multibyte characters
This commit addresses two defects in this SQL function, the code
assuming that:
- The user-supplied string was long enough to contain a character of the
length implied by the first byte. It is possible to provide in input
data that was able to disclose a few bytes of server memory, allowing
out-of-bound reads.
- Specific bytes had values within the expected range, using a set of
assertions to validate them. The assertions could be triggered on
invalid input. These are replaced by tests and error reports.
Reported-by: Hcamael <baiyjrh@gmail.com>
Author: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Backpatch-through: 14
Security: CVE-2026-18024
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/849da82105395fa4d06f877db8edc62158167941
Author: Michael Paquier <michael@paquier.xyz>
Modified Files
--------------
src/backend/utils/adt/oracle_compat.c | 25 ++++++++++++++++++++-----
src/test/regress/expected/encoding.out | 19 +++++++++++++++++++
src/test/regress/sql/encoding.sql | 12 ++++++++++++
3 files changed, 51 insertions(+), 5 deletions(-)
view thread (6+ messages) latest in thread
Message-ID: <E1wtQFs-00000000yF7-2M3u@gemulon.postgresql.org>
Permalink: ../E1wtQFs-00000000yF7-2M3u@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wtQFs-00000000yF7-2M3u@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: noah@leadboat.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix out-of-bound reads with ascii() for invalid multibyte charac
In-Reply-To: <E1wtQFs-00000000yF7-2M3u@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