pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent stack overflow in exprLocation()
6+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b4548161b94567d8e57bf0efdb8005623e1639da

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
REL_19_STABLE

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

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
REL_18_STABLE

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

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f296a4148f429ae69359ed65c85417a3bd9f6f56

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e4090e4a3bd10bc5b900c620176e8b4ec803833c

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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

* pgsql: Prevent stack overflow in exprLocation()
@ 2026-11-26 13:21 Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-11-26 13:21 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent stack overflow in exprLocation()

exprLocation() recurses down to the leftmost token of an expression
without checking the stack depth.  A statement like:

    (SELECT 1 ORDER BY 1) ORDER BY 1+1+...+1

with a million terms therefore crashed the backend while computing the
error position for "multiple ORDER BY clauses not allowed".

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://www.postgresql.org/message-id/CAN4CZFOJzyQ73OxeyRs2QCh7FfBDWqEAsNDiKm1G0hB9Cn6fhw@mail.gmail...
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9c82763b966d11e238645ea1081b94d1d037a5a0

Modified Files
--------------
src/backend/nodes/nodeFuncs.c | 4 ++++
1 file changed, 4 insertions(+)



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


end of thread, other threads:[~2026-11-26 13:21 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-11-26 13:21 pgsql: Prevent stack overflow in exprLocation() Heikki Linnakangas <heikki.linnakangas@iki.fi>

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