]> granicus.if.org Git - postgresql/commit
Fix RelationBuildPartitionKey's processing of partition key expressions.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Feb 2018 15:37:30 +0000 (10:37 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Feb 2018 15:37:30 +0000 (10:37 -0500)
commitfe921a360a4858f537c99d1872d3c3a5a09d6df0
tree29564feaeaea8d3ec48d570e2777858ac860f044
parent20446a4a04240ce9880331eea3082c906ede4f26
Fix RelationBuildPartitionKey's processing of partition key expressions.

Failure to advance the list pointer while reading partition expressions
from a list results in invoking an input function with inappropriate data,
possibly leading to crashes or, with carefully crafted input, disclosure
of arbitrary backend memory.

Bug discovered independently by Álvaro Herrera and David Rowley.
This patch is by Álvaro but owes something to David's proposed fix.
Back-patch to v10 where the issue was introduced.

Security: CVE-2018-1052
src/backend/utils/cache/relcache.c
src/test/regress/expected/create_table.out
src/test/regress/sql/create_table.sql