Empty search_path in logical replication apply worker and walsender.
authorNoah Misch <noah@leadboat.com>
Mon, 10 Aug 2020 16:22:54 +0000 (09:22 -0700)
committerNoah Misch <noah@leadboat.com>
Mon, 10 Aug 2020 16:22:59 +0000 (09:22 -0700)
commitdd5d9951618831aa8f015c6a0ebd3a8f96a9ac32
tree72cd025f17a8a532a89abca0522886ea691020ca
parent670050d68f32b4945528ace8dcef9eb4aabcbd8a
Empty search_path in logical replication apply worker and walsender.

This is like CVE-2018-1058 commit
582edc369cdbd348d68441fc50fa26a84afd0c1a.  Today, a malicious user of a
publisher or subscriber database can invoke arbitrary SQL functions
under an identity running replication, often a superuser.  This fix may
cause "does not exist" or "no schema has been selected to create in"
errors in a replication process.  After upgrading, consider watching
server logs for these errors.  Objects accruing schema qualification in
the wake of the earlier commit are unlikely to need further correction.
Back-patch to v10, which introduced logical replication.

Security: CVE-2020-14349
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/logical/worker.c
src/test/subscription/t/001_rep_changes.pl