| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix out-of-bound reads with ascii() for invalid multibyte charac |
| Date: | 2026-08-10 13:41:33 |
| Message-ID: | E1wtQFx-00000000yPx-2lKT@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(at)gmail(dot)com>
Author: Michael Paquier <michael(at)paquier(dot)xyz>
Reviewed-by: Robert Haas <robertmhaas(at)gmail(dot)com>
Backpatch-through: 14
Security: CVE-2026-18024
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/42d333a78233599a25b34b66af940a87446d58c5
Author: Michael Paquier <michael(at)paquier(dot)xyz>
Modified Files
--------------
src/backend/utils/adt/oracle_compat.c | 25 ++++++++++++++++++++-----
src/test/regress/input/encoding.source | 12 ++++++++++++
src/test/regress/output/encoding.source | 19 +++++++++++++++++++
3 files changed, 51 insertions(+), 5 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2026-08-10 16:15:44 | pgsql: Last-minute updates for release notes. |
| Previous Message | Noah Misch | 2026-08-10 13:41:32 | pgsql: psql: Don't do backquote expansion in \unrestrict. |