summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/matview.out
diff options
context:
space:
mode:
authorHeikki Linnakangas2024-02-05 09:01:23 +0000
committerHeikki Linnakangas2024-02-05 09:01:23 +0000
commit5a9167c3971211d6fe65ecdd83025625e4af0b8b (patch)
tree9904c92e295dff7a0a4161fe3a5bdd288e81c120 /src/test/regress/expected/matview.out
parentdafbfed9efbe3d166f25df7e564bad716e9f8bfc (diff)
Run REFRESH MATERIALIZED VIEW CONCURRENTLY in right security context
The internal commands in REFRESH MATERIALIZED VIEW CONCURRENTLY are correctly executed in SECURITY_RESTRICTED_OPERATION mode, except for creating the temporary "diff" table, because you cannot create temporary tables in SRO mode. But creating the temporary "diff" table is a pretty complex CTAS command that selects from another temporary table created earlier in the command. If you can cajole that CTAS command to execute code defined by the table owner, the table owner can run code with the privileges of the user running the REFRESH command. The proof-of-concept reported to the security team relied on CREATE RULE to convert the internally-built temp table to a view. That's not possible since commit b23cd185fd, and I was not able to find a different way to turn the SELECT on the temp table into code execution, so as far as I know this is only exploitable in v15 and below. That's a fiddly assumption though, so apply this patch to master and all stable versions. Thanks to Pedro Gallegos for the report. Security: CVE-2023-5869 Reviewed-by: Noah Misch
Diffstat (limited to 'src/test/regress/expected/matview.out')
0 files changed, 0 insertions, 0 deletions