lp:ubuntu/trusty/postgresql-8.4
- Get this branch:
- bzr branch lp:ubuntu/trusty/postgresql-8.4
Branch information
- Owner:
- Ubuntu branches
- Status:
- Mature
Recent revisions
- 28. By Martin Pitt
-
* Urgency medium due to security fixes.
* New upstream bug fix/security release:
- Require execute permission on the trigger function for "CREATE
TRIGGER".
This missing check could allow another user to execute a trigger
function with forged input data, by installing it on a table he
owns. This is only of significance for trigger functions marked
SECURITY DEFINER, since otherwise trigger functions run as the
table owner anyway. (CVE-2012-0866)
- Remove arbitrary limitation on length of common name in SSL
certificates.
Both libpq and the server truncated the common name extracted from
an SSL certificate at 32 bytes. Normally this would cause nothing
worse than an unexpected verification failure, but there are some
rather-implausible scenarios in which it might allow one
certificate holder to impersonate another. The victim would have to
have a common name exactly 32 bytes long, and the attacker would
have to persuade a trusted CA to issue a certificate in which the
common name has that string as a prefix. Impersonating a server
would also require some additional exploit to redirect client
connections. (CVE-2012-0867)
- Convert newlines to spaces in names written in pg_dump comments.
pg_dump was incautious about sanitizing object names that are
emitted within SQL comments in its output script. A name containing
a newline would at least render the script syntactically incorrect.
Maliciously crafted object names could present a SQL injection risk
when the script is reloaded. (CVE-2012-0868)
- Fix btree index corruption from insertions concurrent with
vacuuming.
An index page split caused by an insertion could sometimes cause a
concurrently-running "VACUUM" to miss removing index entries that
it should remove. After the corresponding table rows are removed,
the dangling index entries would cause errors (such as "could not
read block N in file ...") or worse, silently wrong query results
after unrelated rows are re-inserted at the now-free table
locations. This bug has been present since release 8.2, but occurs
so infrequently that it was not diagnosed until now. If you have
reason to suspect that it has happened in your database, reindexing
the affected index will fix things.
- Update per-column permissions, not only per-table permissions, when
changing table owner.
Failure to do this meant that any previously granted column
permissions were still shown as having been granted by the old
owner. This meant that neither the new owner nor a superuser could
revoke the now-untraceable-to-table- owner permissions.
- Allow non-existent values for some settings in "ALTER USER/DATABASE
SET".
Allow default_text_search_ config, default_tablespace, and
temp_tablespaces to be set to names that are not known. This is
because they might be known in another database where the setting
is intended to be used, or for the tablespace cases because the
tablespace might not be created yet. The same issue was previously
recognized for search_path, and these settings now act like that
one.
- Avoid crashing when we have problems deleting table files
post-commit.
Dropping a table should lead to deleting the underlying disk files
only after the transaction commits. In event of failure then (for
instance, because of wrong file permissions) the code is supposed
to just emit a warning message and go on, since it's too late to
abort the transaction. This logic got broken as of release 8.4,
causing such situations to result in a PANIC and an unrestartable
database.
- Track the OID counter correctly during WAL replay, even when it
wraps around.
Previously the OID counter would remain stuck at a high value until
the system exited replay mode. The practical consequences of that
are usually nil, but there are scenarios wherein a standby server
that's been promoted to master might take a long time to advance
the OID counter to a reasonable value once values are needed.
- Fix regular expression back-references with - attached.
Rather than enforcing an exact string match, the code would
effectively accept any string that satisfies the pattern
sub-expression referenced by the back-reference symbol.
A similar problem still afflicts back-references that are embedded
in a larger quantified expression, rather than being the immediate
subject of the quantifier. This will be addressed in a future
PostgreSQL release.
- Fix recently-introduced memory leak in processing of inet/cidr
values.
- Fix dangling pointer after "CREATE TABLE AS"/"SELECT INTO" in a
SQL-language function.
In most cases this only led to an assertion failure in
assert-enabled builds, but worse consequences seem possible.
- Fix I/O-conversion-related memory leaks in plpgsql.
- Improve pg_dump's handling of inherited table columns.
pg_dump mishandled situations where a child column has a different
default expression than its parent column. If the default is
textually identical to the parent's default, but not actually the
same (for instance, because of schema search path differences) it
would not be recognized as different, so that after dump and
restore the child would be allowed to inherit the parent's default.
Child columns that are NOT NULL where their parent is not could
also be restored subtly incorrectly.
- Fix pg_restore's direct-to-database mode for INSERT-style table
data.
Direct-to-database restores from archive files made with
"--inserts" or "--column-inserts" options fail when using
pg_restore from a release dated September or December 2011, as a
result of an oversight in a fix for another problem. The archive
file itself is not at fault, and text-mode output is okay.
- Allow AT option in ecpg DEALLOCATE statements.
The infrastructure to support this has been there for awhile, but
through an oversight there was still an error check rejecting the
case.
- Fix error in "contrib/intarray" 's int[] & int[] operator.
If the smallest integer the two input arrays have in common is 1,
and there are smaller values in either array, then 1 would be
incorrectly omitted from the result.
- Fix error detection in "contrib/pgcrypto" 's encrypt_iv() and
decrypt_iv().
These functions failed to report certain types of invalid-input
errors, and would instead return random garbage values for
incorrect input.
- Fix one-byte buffer overrun in "contrib/test_parser" .
The code would try to read one more byte than it should, which
would crash in corner cases. Since "contrib/test_parser" is only
example code, this is not a security issue in itself, but bad
example code is still bad.
- Use __sync_lock_test_ and_set( ) for spinlocks on ARM, if available.
This function replaces our previous use of the SWPB instruction,
which is deprecated and not available on ARMv6 and later. Reports
suggest that the old code doesn't fail in an obvious way on recent
ARM boards, but simply doesn't interlock concurrent accesses,
leading to bizarre failures in multiprocess operation.
- Use "-fexcess-precision= standard" option when building with gcc
versions that accept it.
This prevents assorted scenarios wherein recent versions of gcc
will produce creative results.
- Allow use of threaded Python on FreeBSD.
Our configure script previously believed that this combination
wouldn't work; but FreeBSD fixed the problem, so remove that error
check.
* Drop 04-armel-tas.patch, applied upstream. - 27. By Martin Pitt
-
* New upstream bug fix release:
- Fix bugs in information_schema. referential_ constraints view.
This view was being insufficiently careful about matching the
foreign-key constraint to the depended-on primary or unique key
constraint. That could result in failure to show a foreign key
constraint at all, or showing it multiple times, or claiming that
it depends on a different constraint than the one it really does.
Since the view definition is installed by initdb, merely upgrading
will not fix the problem. If you need to fix this in an existing
installation, you can (as a superuser) drop the information_schema
schema then re-create it by sourcing
"SHAREDIR/information_ schema. sql". (Run pg_config --sharedir if
you're uncertain where "SHAREDIR" is.) This must be repeated in
each database to be fixed.
- Fix incorrect replay of WAL records for GIN index updates.
This could result in transiently failing to find index entries
after a crash, or on a hot-standby server. The problem would be
repaired by the next "VACUUM" of the index, however.
- Fix TOAST-related data corruption during CREATE TABLE dest AS
SELECT - FROM src or INSERT INTO dest SELECT * FROM src.
If a table has been modified by "ALTER TABLE ADD COLUMN", attempts
to copy its data verbatim to another table could produce corrupt
results in certain corner cases. The problem can only manifest in
this precise form in 8.4 and later, but we patched earlier versions
as well in case there are other code paths that could trigger the
same bug.
- Fix race condition during toast table access from stale syscache
entries.
- Track dependencies of functions on items used in parameter default
expressions. Previously, a referenced object could be dropped without
having dropped or modified the function, leading to misbehavior when the
function was used. Note that merely installing this update will not fix
the missing dependency entries; to do that, you'd need to "CREATE OR
REPLACE" each such function afterwards. If you have functions whose
defaults depend on non-built-in objects, doing so is recommended.
- Allow inlining of set-returning SQL functions with multiple OUT
parameters.
- Make DatumGetInetP() unpack inet datums that have a 1-byte header,
and add a new macro, DatumGetInetPP(), that does not.
- Improve locale support in money type's input and output.
Aside from not supporting all standard lc_monetary formatting
options, the input and output functions were inconsistent, meaning
there were locales in which dumped money values could not be
re-read.
- Don't let transform_null_equals affect CASE foo WHEN NULL ...
constructs. transform_null_equals is only supposed to affect foo = NULL
expressions written directly by the user, not equality checks
generated internally by this form of CASE.
- Change foreign-key trigger creation order to better support
self-referential foreign keys. For a cascading foreign key that
references its own table, a row update will fire both the ON UPDATE
trigger and the CHECK trigger as one event. The ON UPDATE trigger must
execute first, else the CHECK will check a non-final state of the row
and possibly throw an inappropriate error. However, the firing order of
these triggers is determined by their names, which generally sort in
creation order since the triggers have auto-generated names following
the convention "RI_ConstraintTrigger_ NNNN". A proper fix would require
modifying that convention, which we will do in 9.2, but it seems risky
to change it in existing releases. So this patch just changes the
creation order of the triggers. Users encountering this type of error
should drop and re-create the foreign key constraint to get its triggers
into the right order.
- Avoid floating-point underflow while tracking buffer allocation
rate.
- Preserve blank lines within commands in psql's command history.
The former behavior could cause problems if an empty line was
removed from within a string literal, for example.
- Fix pg_dump to dump user-defined casts between auto-generated
types, such as table rowtypes.
- Use the preferred version of xsubpp to build PL/Perl, not
necessarily the operating system's main copy.
- Fix incorrect coding in "contrib/dict_int" and "contrib/dict_xsyn" .
- Honor query cancel interrupts promptly in pgstatindex().
- Ensure VPATH builds properly install all server header files.
- Shorten file names reported in verbose error messages.
Regular builds have always reported just the name of the C file
containing the error message call, but VPATH builds formerly
reported an absolute path name. - 25. By Martin Pitt
-
* New upstream bug fix release:
- Fix bugs in indexing of in-doubt HOT-updated tuples.
These bugs could result in index corruption after reindexing a
system catalog. They are not believed to affect user indexes.
- Fix multiple bugs in GiST index page split processing.
The probability of occurrence was low, but these could lead to
index corruption.
- Fix possible buffer overrun in tsvector_concat().
The function could underestimate the amount of memory needed for
its result, leading to server crashes.
- Fix crash in xml_recv when processing a "standalone" parameter.
- Make pg_options_to_table return NULL for an option with no value.
Previously such cases would result in a server crash.
- Avoid possibly accessing off the end of memory in "ANALYZE" and in
SJIS-2004 encoding conversion.
This fixes some very-low-probability server crash scenarios.
- Prevent intermittent hang in interactions of startup process with
bgwriter process.
This affected recovery in non-hot-standby cases.
- Fix race condition in relcache init file invalidation.
There was a window wherein a new backend process could read a stale
init file but miss the inval messages that would tell it the data
is stale. The result would be bizarre failures in catalog accesses,
typically "could not read block 0 in file ..." later during
startup.
- Fix memory leak at end of a GiST index scan.
Commands that perform many separate GiST index scans, such as
verification of a new GiST-based exclusion constraint on a table
already containing many rows, could transiently require large
amounts of memory due to this leak.
- Fix incorrect memory accounting (leading to possible memory bloat)
in tuplestores supporting holdable cursors and plpgsql's RETURN
NEXT command.
- Fix performance problem when constructing a large, lossy bitmap.
- Fix join selectivity estimation for unique columns.
This fixes an erroneous planner heuristic that could lead to poor
estimates of the result size of a join.
- Fix nested PlaceHolderVar expressions that appear only in
sub-select target lists. This mistake could result in outputs of an
outer join incorrectly appearing as NULL.
- Allow nested EXISTS queries to be optimized properly.
- Fix array- and path-creating functions to ensure padding bytes are
zeroes. This avoids some situations where the planner will think that
semantically-equal constants are not equal, resulting in poor
optimization.
- Fix "EXPLAIN" to handle gating Result nodes within inner-indexscan
subplans. The usual symptom of this oversight was "bogus varno" errors.
- Work around gcc 4.6.0 bug that breaks WAL replay. This could lead to
loss of committed transactions after a server crash.
- Fix dump bug for VALUES in a view.
- Disallow SELECT FOR UPDATE/SHARE on sequences.
This operation doesn't work as expected and can lead to failures.
- Fix "VACUUM" so that it always updates pg_class.reltuples/ relpages.
This fixes some scenarios where autovacuum could make increasingly
poor decisions about when to vacuum tables.
- Defend against integer overflow when computing size of a hash table.
- Fix cases where "CLUSTER" might attempt to access already-removed
TOAST data.
- Fix portability bugs in use of credentials control messages for
"peer" authentication.
- Fix SSPI login when multiple roundtrips are required.
The typical symptom of this problem was "The function requested is
not supported" errors during SSPI login.
- Throw an error if "pg_hba.conf" contains hostssl but SSL is
disabled. This was concluded to be more user-friendly than the
previous behavior of silently ignoring such lines.
- Fix typo in pg_srand48 seed initialization.
This led to failure to use all bits of the provided seed. This
function is not used on most platforms (only those without
srandom), and the potential security exposure from a
less-random- than-expected seed seems minimal in any case.
- Avoid integer overflow when the sum of LIMIT and OFFSET values
exceeds 2^63.
- Add overflow checks to int4 and int8 versions of generate_series().
- Fix trailing-zero removal in to_char(). In a format with FM and no
digit positions after the decimal point, zeroes to the left of the
decimal point could be removed incorrectly.
- Fix pg_size_pretty() to avoid overflow for inputs close to 2^63.
- Weaken plpgsql's check for typmod matching in record values.
An overly enthusiastic check could lead to discarding length
modifiers that should have been kept.
- Fix pg_upgrade to preserve toast tables' relfrozenxids during an
upgrade from 8.3. Failure to do this could lead to "pg_clog" files
being removed too soon after the upgrade.
- Fix psql's counting of script file line numbers during COPY from a
different file.
- Fix pg_restore's direct-to-database mode for
standard_conforming_ strings. pg_restore could emit incorrect commands
when restoring directly to a database server from an archive file that
had been made with standard_conforming_ strings set to on.
- Be more user-friendly about unsupported cases for parallel
pg_restore. This change ensures that such cases are detected and
reported before any restore actions have been taken.
- Fix write-past-buffer- end and memory leak in libpq's LDAP service
lookup code.
- In libpq, avoid failures when using nonblocking I/O and an SSL
connection.
- Improve libpq's handling of failures during connection startup.
In particular, the response to a server report of fork() failure
during SSL connection startup is now saner.
- Improve libpq's error reporting for SSL failures.
- Fix PQsetvalue() to avoid possible crash when adding a new tuple to
a PGresult originally obtained from a server query.
- Make ecpglib write double values with 15 digits precision.
- In ecpglib, be sure LC_NUMERIC setting is restored after an error.
- Apply upstream fix for blowfish signed-character bug
(CVE-2011-2483) (Closes: #631285)
"contrib/pg_crypto" 's blowfish encryption code could give wrong
results on platforms where char is signed (which is most), leading
to encrypted passwords being weaker than they should be.
- Fix memory leak in "contrib/seg".
- Fix pgstatindex() to give consistent results for empty indexes.
- Allow building with perl 5.14. (Closes: #628503)
* Drop 16-cmsgcred-size.patch, fixed upstream in a different way. - 24. By Martin Pitt
-
* debian/
postgresql- 8.4.postrm: Clean up pg_ctl.conf on purge.
* debian/control, debian/rules: Drop usage of pycentral. We don't ship any
Python extension/module, so we don't need a python helper at all.
(Closes: #616948)
* Add 16-cmsgcred-size.patch: Fix size of struct cmsgcred to fix ident
authentication on kFreeBSD 64 bit. Thanks to Petr Salinger for the patch!
(Closes: #612888) - 22. By Martin Pitt
-
Priority medium due to data-loss pg_upgrade bug.
[ Martin Pitt ]
* New upstream bug fix release:
- If your installation was upgraded from a previous major release by
running pg_upgrade, you should take action to prevent possible data loss
due to a now-fixed bug in pg_upgrade. The recommended solution is to run
"VACUUM FREEZE" on all TOAST tables. More information is available at
http://wiki.postgresql .org/wiki/ 20110408pg_ upgrade_ fix.
- Fix pg_upgrade's handling of TOAST tables.
This error poses a significant risk of data loss for installations
that have been upgraded with pg_upgrade. This patch corrects the
problem for future uses of pg_upgrade, but does not in itself cure
the issue in installations that have been processed with a buggy
version of pg_upgrade.
- Suppress incorrect "PD_ALL_VISIBLE flag was incorrectly set"
warning.
- Disallow including a composite type in itself.
- Avoid potential deadlock during catalog cache initialization.
- Fix dangling-pointer problem in BEFORE ROW UPDATE trigger handling
when there was a concurrent update to the target tuple.
- Disallow "DROP TABLE" when there are pending deferred trigger
events for the table.
Formerly the "DROP" would go through, leading to "could not open
relation with OID nnn" errors when the triggers were eventually
fired.
- Prevent crash triggered by constant-false WHERE conditions during
GEQO optimization.
- Improve planner's handling of semi-join and anti-join cases.
- Fix selectivity estimation for text search to account for NULLs.
- Improve PL/pgSQL's ability to handle row types with dropped columns.
- Fix PL/Python memory leak involving array slices.
- Fix pg_restore to cope with long lines (over 1KB) in TOC files.
- Put in more safeguards against crashing due to division-by-zero
with overly enthusiastic compiler optimization. (Closes: #616180)
* debian/control: Stop building the versionless metapackages and client-side
libraries, they are built by postgresql-9.0 now. Add libpq-dev build
dependency.
* debian/rules: Drop check for uninstalled files, since it'd now break the
build due to the uninstalled libraries.[ Matthias Klose ]
* Add 15-bool-altivec. patch: Fix definition of bool on __APPLE_ALTIVEC__
architecture (ppc64). - 21. By Martin Pitt
-
* New upstream bug fix release: (LP: #767165)
- If your installation was upgraded from a previous major release by
running pg_upgrade, you should take action to prevent possible data loss
due to a now-fixed bug in pg_upgrade. The recommended solution is to run
"VACUUM FREEZE" on all TOAST tables. More information is available at
http://wiki.postgresql .org/wiki/ 20110408pg_ upgrade_ fix.
- Fix pg_upgrade's handling of TOAST tables.
This error poses a significant risk of data loss for installations
that have been upgraded with pg_upgrade. This patch corrects the
problem for future uses of pg_upgrade, but does not in itself cure
the issue in installations that have been processed with a buggy
version of pg_upgrade.
- Suppress incorrect "PD_ALL_VISIBLE flag was incorrectly set"
warning.
- Disallow including a composite type in itself.
- Avoid potential deadlock during catalog cache initialization.
- Fix dangling-pointer problem in BEFORE ROW UPDATE trigger handling
when there was a concurrent update to the target tuple.
- Disallow "DROP TABLE" when there are pending deferred trigger
events for the table.
Formerly the "DROP" would go through, leading to "could not open
relation with OID nnn" errors when the triggers were eventually
fired.
- Prevent crash triggered by constant-false WHERE conditions during
GEQO optimization.
- Improve planner's handling of semi-join and anti-join cases.
- Fix selectivity estimation for text search to account for NULLs.
- Improve PL/pgSQL's ability to handle row types with dropped columns.
- Fix PL/Python memory leak involving array slices.
- Fix pg_restore to cope with long lines (over 1KB) in TOC files.
- Put in more safeguards against crashing due to division-by-zero
with overly enthusiastic compiler optimization. (Closes: #616180) - 19. By Martin Pitt
-
* New upstream security/bug fix release:
- Fix buffer overrun in "contrib/intarray" 's input function for the
query_int type.
This bug is a security risk since the function's return address
could be overwritten. Thanks to Apple Inc's security team for
reporting this issue and supplying the fix. (CVE-2010-4015)
- Avoid failures when "EXPLAIN" tries to display a simple-form CASE
expression.
If the CASE's test expression was a constant, the planner could
simplify the CASE into a form that confused the expression-display
code, resulting in "unexpected CASE WHEN clause" errors.
- Fix assignment to an array slice that is before the existing range
of subscripts.
If there was a gap between the newly added subscripts and the first
pre-existing subscript, the code miscalculated how many entries
needed to be copied from the old array's null bitmap, potentially
leading to data corruption or crash.
- Avoid unexpected conversion overflow in planner for very distant
date values.
The date type supports a wider range of dates than can be
represented by the timestamp types, but the planner assumed it
could always convert a date to timestamp with impunity.
- Fix pg_restore's text output for large objects (BLOBs) when
standard_conforming_ strings is on.
Although restoring directly to a database worked correctly, string
escaping was incorrect if pg_restore was asked for SQL text output
and standard_conforming_ strings had been enabled in the source
database.
- Fix erroneous parsing of tsquery values containing ... &
!(subexpression) | ... .
Queries containing this combination of operators were not executed
correctly. The same error existed in "contrib/intarray" 's query_int
type and "contrib/ltree"'s ltxtquery type.
- Fix bug in "contrib/seg"'s GiST picksplit algorithm.
This could result in considerable inefficiency, though not actually
incorrect answers, in a GiST index on a seg column. If you have
such an index, consider "REINDEX"ing it after installing this
update. (This is identical to the bug that was fixed in
"contrib/cube" in the previous update.)
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:ubuntu/utopic/postgresql-8.4