pgsql: Avoid reading past datum end when parsing JSON.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid reading past datum end when parsing JSON.
Date: 2013-06-12 23:57:16
Message-ID: E1Umuui-0007kp-SV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid reading past datum end when parsing JSON.

Several loops in the JSON parser examined a byte in memory just before
checking whether its address was in-bounds, so they could read one byte
beyond the datum's allocation. A SIGSEGV is possible. New in 9.3, so
no back-patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/66008564f8ce570f7ad6368fbde2138e946d328b

Modified Files
--------------
src/backend/utils/adt/json.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-06-13 17:13:15 pgsql: Only install a portal's ResourceOwner if it actually has one.
Previous Message Tom Lane 2013-06-12 21:53:53 pgsql: Improve updatability checking for views and foreign tables.