pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2bb6bdbe5da77eab44abf6512779a4aa04419700

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/95f7ddfdad99c5ea0500d90ce52075814e10ed8c

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5feb3d0b3f6bf2f65757acbad6578cc8318f1f70

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e1e630d004e1d7dc31949c31137831d6f893359

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/39491aa0da48efabea5f16eb5104a0eb0ae0b251

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel.
@ 2020-03-28 21:10  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2020-03-28 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Protect against overflow of ltree.numlevel and lquery.numlevel.

These uint16 fields could be overflowed by excessively long input,
producing strange results.  Complain for invalid input.

Likewise check for out-of-range values of the repeat counts in lquery.
(We don't try too hard on that one, notably not bothering to detect
if atoi's result has overflowed.)

Also detect length overflow in ltree_concat.

In passing, be more consistent about whether "syntax error" messages
include the type name.  Also, clarify the documentation about what
the size limit is.

This has been broken for a long time, so back-patch to all supported
branches.

Nikita Glukhov, reviewed by Benjie Gillam and Tomas Vondra

Discussion: https://postgr.es/m/CAP_rww=waX2Oo6q+MbMSiZ9ktdj6eaJj0cQzNu=Ry2cCDij5fw@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2618ac6c6535171f4993a38e3410955e1c2a2073

Modified Files
--------------
contrib/ltree/expected/ltree.out | 46 ++++++++++++++++++++++++++++++++++
contrib/ltree/ltree.h            |  2 ++
contrib/ltree/ltree_io.c         | 54 ++++++++++++++++++++++++++--------------
contrib/ltree/ltree_op.c         |  9 ++++++-
contrib/ltree/sql/ltree.sql      | 11 ++++++++
doc/src/sgml/ltree.sgml          |  3 +--
6 files changed, 104 insertions(+), 21 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2020-03-28 21:10 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>
2020-03-28 21:10 pgsql: Protect against overflow of ltree.numlevel and lquery.numlevel. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox