BUG #8453: uninitialized memory access in pg_receivexlog and other bugs - Mailing list pgsql-bugs

From andrew@tao11.riddles.org.uk
Subject BUG #8453: uninitialized memory access in pg_receivexlog and other bugs
Date
Msg-id E1VLB2N-0003XN-7k@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #8453: uninitialized memory access in pg_receivexlog and other bugs  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8453
Logged by:          Andrew Gierth
Email address:      andrew@tao11.riddles.org.uk
PostgreSQL version: 9.3.0
Operating system:   any
Description:

The first snprintf in writeTimeLineHistoryFile in receivelog.c accesses
uninitialized data in the "path" variable, thus creating the .tmp file in a
random place (usually the current dir, leading to unexpected EXDEV errors on
the rename).


Also, receivexlog is ignoring .partial and .history files when determining
which timeline to start streaming from, which means that if there are two
timeline changes that are not separated by a WAL segment switch, it will
fail to operate due to attempting to start from a too-old timeline (for
which xlogs are not available on the server).


Found from my analysis of a report from irc.

pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BUG #8451: quantile extension: memory corruption?
Next
From: Tomas Vondra
Date:
Subject: Re: BUG #8451: quantile extension: memory corruption?