]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Reject CancelRequestPacket having unexpected length.
authorNoah Misch <noah@leadboat.com>
Sat, 21 Jan 2023 14:08:00 +0000 (06:08 -0800)
committerNoah Misch <noah@leadboat.com>
Sat, 21 Jan 2023 14:08:04 +0000 (06:08 -0800)
commite75b5c85549df2294dfaee988be9c7b2a08f0b85
tree3b4bcfa290efcdabebf96acf9e94754e67d4bb48
parent6d066d56ba126b046944f42350e993e1d5bf92a1
Reject CancelRequestPacket having unexpected length.

When the length was too short, the server read outside the allocation.
That yielded the same log noise as sending the correct length with
(backendPID,cancelAuthCode) matching nothing.  Change to a message about
the unexpected length.  Given the attacker's lack of control over the
memory layout and the general lack of diversity in memory layouts at the
code in question, we doubt a would-be attacker could cause a segfault.
Hence, while the report arrived via security@postgresql.org, this is not
a vulnerability.  Back-patch to v11 (all supported versions).

Andrey Borodin, reviewed by Tom Lane.  Reported by Andrey Borodin.
src/backend/postmaster/postmaster.c