pgsql: Prevent shm_mq_send from reading uninitialized memory. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Prevent shm_mq_send from reading uninitialized memory.
Date
Msg-id E1XAJ2H-0007bJ-PO@gemulon.postgresql.org
Whole thread Raw
List 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
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/df58a17df29f7ec0ffc8389deee46e81a2a58a60

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


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Prevent shm_mq_send from reading uninitialized memory.
Next
From: Noah Misch
Date:
Subject: pgsql: Move PGAC_LDAP_SAFE to config/programs.m4.