postgresql/src
Tom Lane 462456d8d0 Fix possible read past end of string in to_timestamp().
to_timestamp() handles the TH/th format codes by advancing over two input
characters, whatever those are.  It failed to notice whether there were
two characters available to be skipped, making it possible to advance
the pointer past the end of the input string and keep on parsing.
A similar risk existed in the handling of "Y,YYY" format: it would advance
over three characters after the "," whether or not three characters were
available.

In principle this might be exploitable to disclose contents of server
memory.  But the security team concluded that it would be very hard to use
that way, because the parsing loop would stop upon hitting any zero byte,
and TH/th format codes can't be consecutive --- they have to follow some
other format code, which would have to match whatever data is there.
So it seems impractical to examine memory very much beyond the end of the
input string via this bug; and the input string will always be in local
memory not in disk buffers, making it unlikely that anything very
interesting is close to it in a predictable way.  So this doesn't quite
rise to the level of needing a CVE.

Thanks to Wolf Roediger for reporting this bug.
2016-05-06 12:09:20 -04:00
..
backend Fix possible read past end of string in to_timestamp(). 2016-05-06 12:09:20 -04:00
bin pg_upgrade: Fix indentation of if() block 2016-04-28 08:29:02 -04:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
include Fix mishandling of equivalence-class tests in parameterized plans. 2016-04-29 20:19:38 -04:00
interfaces Rename strtoi() to strtoint(). 2016-04-23 16:53:15 -04:00
makefiles Don't use deprecated dllwrap on Cygwin. 2014-02-01 16:13:32 -05:00
pl Fix freshly-introduced PL/Python portability bug. 2016-04-11 18:17:02 -04:00
port Add putenv support for msvcrt from Visual Studio 2013 2016-04-22 05:20:18 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:02:03 -04:00
test Fix mishandling of equivalence-class tests in parameterized plans. 2016-04-29 20:19:38 -04:00
timezone Update time zone data files to tzdata release 2016d. 2016-05-05 20:09:22 -04:00
tools Turn down MSVC compiler verbosity 2016-04-08 12:29:34 -04:00
tutorial Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Make numeric form of PG version number readily available in Makefiles. 2015-07-05 12:01:01 -04:00
Makefile.shlib Unlink static libraries before rebuilding them. 2015-03-01 13:06:39 -05:00
nls-global.mk NLS: Use msgmerge --previous option 2012-12-13 23:12:12 -05:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00