| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: find_or_make_matching_shared_tupledesc: Fix possible use-after-f |
| Date: | 2026-11-09 14:22:02 |
| Message-ID: | E1xQQG2-000000003ln-3J1G@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
find_or_make_matching_shared_tupledesc: Fix possible use-after-free.
Previously, the following sequence of events was possible: (1) new
anonymous-record typmod gets entered into shared_typmod_table;
(2) another process resolves the typmod and stores a pointer to the
associated TupleDesc; (3) the first process realizes that the
TupleDesc duplicates one that already has some other typmod assigned
to it and frees the TupleDesc; (4) later, the other process
accesses the now-freed storage, interprets it as a TupleDesc, and
uses it to deform a tuple.
It is likely that an attacker can control the new contents of the
freed memory to a sufficient degree to achieve arbitrary code
execution; hence, this is a security vulnerability.
Reported-by: Peter Geoghegan <pg(at)bowt(dot)ie>
Reviewed-by: Andrew Dunstan <andrew(at)dunslane(dot)net>
Security: CVE-2026-116304
Backpatch-through: 14
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a4d40a6ae9f0c0d68a26ea625d50f9a22e0cfc41
Author: Robert Haas <rhaas(at)postgresql(dot)org>
Modified Files
--------------
src/backend/utils/cache/typcache.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:22:03 | pgsql: Reject extnamespace if it's temporary or it's '$user'::regnamesp |
| Previous Message | Noah Misch | 2026-11-09 14:22:01 | pgsql: Introduce attribute versioning to prevent unsafe deforming |