PostgreSQL security fix timeline
Public commits from postgres/postgres whose messages cite a vulnerability or a security fix. Patch text is not stored.
58 security-fix timeline events
May 5, 2025 · CVE-2025-4207
With GB18030, prevent SIGSEGV from reading past end of allocation.
With GB18030, prevent SIGSEGV from reading past end of allocation. With GB18030 as source encoding, applications could crash the server via SQL functions convert() or convert_from(). Applications themselves could crash after passing unterminated GB18030 input to libpq function…
Feb 16, 2025 · CVE-2025-1094
In fmtIdEnc(), handle failure of enlargePQExpBuffer().
In fmtIdEnc(), handle failure of enlargePQExpBuffer(). Coverity complained that we weren't doing that, and it's right. This fix just makes fmtIdEnc() honor the general convention that OOM causes a PQExpBuffer to become marked "broken", without any immediate error. In the pret…
Feb 15, 2025 · CVE-2025-1094
Make escaping functions retain trailing bytes of an invalid character.
Make escaping functions retain trailing bytes of an invalid character. Instead of dropping the trailing byte(s) of an invalid or incomplete multibyte character, replace only the first byte with a known-invalid sequence, and process the rest normally. This seems less likely to…
Feb 10, 2025 · CVE-2025-1094
Adapt appendPsqlMetaConnect() to the new fmtId() encoding expectations.
Adapt appendPsqlMetaConnect() to the new fmtId() encoding expectations. We need to tell fmtId() what encoding to assume, but this function doesn't know that. Fortunately we can fix that without changing the function's API, because we can just use SQL_ASCII. That's because dat…
Feb 10, 2025 · CVE-2025-1094
Fix type in test_escape test
Fix type in test_escape test On machines where char is unsigned this could lead to option parsing looping endlessly. It's also too narrow a type on other hardware. Found via Tom Lane's monitoring of the buildfarm. Reported-by: Tom Lane <tgl@sss.pgh.pa.us> Security: CVE-2025-1…
Feb 10, 2025 · CVE-2025-1094
docs: EUC_TW can be up to four bytes wide, not three
docs: EUC_TW can be up to four bytes wide, not three Backpatch-through: 13 Security: CVE-2025-1094
Feb 10, 2025 · CVE-2025-1094
Specify the encoding of input to fmtId()
Specify the encoding of input to fmtId() This commit adds fmtIdEnc() and fmtQualifiedIdEnc(), which allow to specify the encoding as an explicit argument. Additionally setFmtEncoding() is provided, which defines the encoding when no explicit encoding is provided, to avoid brea…
Feb 10, 2025 · CVE-2025-1094
Add test of various escape functions
Add test of various escape functions As highlighted by the prior commit, writing correct escape functions is less trivial than one might hope. This test module tries to verify that different escaping functions behave reasonably. It e.g. tests: - Invalidly encoded input to an…
Feb 10, 2025 · CVE-2025-1094
Fix handling of invalidly encoded data in escaping functions
Fix handling of invalidly encoded data in escaping functions Previously invalidly encoded input to various escaping functions could lead to the escaped string getting incorrectly parsed by psql. To be safe, escaping functions need to ensure that neither invalid nor incomplete…
Feb 10, 2025 · CVE-2025-1094
Add pg_encoding_set_invalid()
Add pg_encoding_set_invalid() There are cases where we cannot / do not want to error out for invalidly encoded input. In such cases it can be useful to replace e.g. an incomplete multi-byte characters with bytes that will trigger an error when getting validated as part of a lar…