Use after free in PostgreSQL expanded-record domain checks allows an object creator to execute arbitrary code as the operating system user running the database, via repeated checks of a domain over a composite type that cause reuse of a dangling memory-context pointer. Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Red Hat Hardened Images | RedHat | postgresql17-main-17.12-0.1.hum1 | * |
| Red Hat Hardened Images | RedHat | postgresql18-main-18.7-0.1.hum1 | * |
| Red Hat Hardened Images | RedHat | libpq-main-18.7-0.1.hum1 | * |
| Postgresql-10 | Ubuntu | upstream | * |
| Postgresql-12 | Ubuntu | upstream | * |
| Postgresql-9.3 | Ubuntu | upstream | * |
| Postgresql-9.5 | Ubuntu | upstream | * |