Skip to content

Conversation

@reshke
Copy link
Contributor

@reshke reshke commented Dec 23, 2025

Cherry-picked from
https://git.postgresql.org/cgit/postgresql.git/commit/?id=3a9b18b3095366cd0c4305441d426d04572d88c1

Documentation says it cannot signal "a backend owned by a superuser". On the contrary, it could signal background workers, including the logical replication launcher. It could signal autovacuum workers and the autovacuum launcher. Block all that. Signaling autovacuum workers and those two launchers doesn't stall progress beyond what one could achieve other ways. If a cluster uses a non-core extension with a background worker that does not auto-restart, this could create a denial of service with respect to that background worker. A background worker with bugs in its code for responding to terminations or cancellations could experience those bugs at a time the pg_signal_backend member chooses. Back-patch to v11 (all supported versions).

Reviewed by Jelte Fennema-Nio. Reported by Hemanth Sandrana and Mahendrakar Srinivasarao.

Security: CVE-2023-5870

@reshke reshke added type: Backport type: Security Vulnerability disclosure or Fixing security issue labels Dec 23, 2025
@reshke
Copy link
Contributor Author

reshke commented Dec 23, 2025

Need to fix CI here.
UPD: fixed

@reshke reshke requested a review from my-ship-it December 25, 2025 12:03
@my-ship-it
Copy link
Contributor

It's better to keep linear commit history for future merge with upstream purpose.
image

@reshke
Copy link
Contributor Author

reshke commented Dec 30, 2025

It's better to keep linear commit history for future merge with upstream purpose. image

all of this will be single commit after rebase (merge commit option in disabled in this repo).

anyway, pushed properly rebased on current HEAD

Cherry-picked from
https://git.postgresql.org/cgit/postgresql.git/commit/?id=3a9b18b3095366cd0c4305441d426d04572d88c1

Documentation says it cannot signal "a backend owned by a superuser".
On the contrary, it could signal background workers, including the
logical replication launcher.  It could signal autovacuum workers and
the autovacuum launcher.  Block all that.  Signaling autovacuum workers
and those two launchers doesn't stall progress beyond what one could
achieve other ways.  If a cluster uses a non-core extension with a
background worker that does not auto-restart, this could create a denial
of service with respect to that background worker.  A background worker
with bugs in its code for responding to terminations or cancellations
could experience those bugs at a time the pg_signal_backend member
chooses.  Back-patch to v11 (all supported versions).

Reviewed by Jelte Fennema-Nio.  Reported by Hemanth Sandrana and
Mahendrakar Srinivasarao.

Security: CVE-2023-5870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Backport type: Security Vulnerability disclosure or Fixing security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants