pgsql: Prevent shm_mq_send from reading uninitialized memory.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent shm_mq_send from reading uninitialized memory.
Date: 2014-07-24 13:26:17
Message-ID: E1XAJ2H-0007bI-PJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent shm_mq_send from reading uninitialized memory.

shm_mq_send_bytes didn't invariably initialize *bytes_written before
returning, which would cause shm_mq_send to read from uninitialized
memory and add the value it found there to mqh->mqh_partial_bytes.
This could cause the next attempt to send a message via the queue to
fail an assertion (if the queue was detached) or copy data from a
garbage pointer value into the queue (if non-blocking mode was in use).

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1144ea3421e4bcc24dd7402a1f21ba94638d591b

Modified Files
--------------
src/backend/storage/ipc/shm_mq.c | 7 +++++++
1 file changed, 7 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2014-07-25 22:53:26 pgsql: Move PGAC_LDAP_SAFE to config/programs.m4.
Previous Message Robert Haas 2014-07-24 13:18:48 pgsql: Fix checkpointer crash in EXEC_BACKEND builds.