pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: pg_trgm: fix crash in 2-item picksplit
7+ messages / 1 participants
[nested] [flat]

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7f69ed4aebe342365dc7db96f33b473dec9f054b

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7e3dc147d0a8364fb39f3229031cd6bf44180307

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/48ab1fa304fe51d563bea11f1334572a7f2832b1

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/068de9dd40340517e7e5954b3eeb17cdcc834180

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3836d4b643369310dc2f98ad311baeac307590d7

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/245a35f96e3a12b7fe19bad88671d75dcbec133c

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)



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

* pgsql: pg_trgm: fix crash in 2-item picksplit
@ 2020-11-12 16:01  Andrew Gierth <rhodiumtoad@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Andrew Gierth @ 2020-11-12 16:01 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

pg_trgm: fix crash in 2-item picksplit

Whether from size overflow in gistSplit or from secondary splits,
picksplit is (rarely) called with exactly two items to split.

Formerly, due to special-case handling of the last item, this would
lead to access to an uninitialized cache entry; prior to PG 13 this
might have been harmless or at worst led to an incorrect union datum,
but in 13 onwards it can cause a backend crash from using an
uninitialized pointer.

Repair by removing the special case, which was deemed not to have been
appropriate anyway. Backpatch all the way, because this bug has
existed since pg_trgm was added.

Per report on IRC from user "ftzdomino". Analysis and testing by me,
patch from Alexander Korotkov.

Discussion: https://postgr.es/m/87k0usfdxg.fsf@news-spur.riddles.org.uk

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4b212b7c87754095d4f89b03a3aaec6e32d09342

Modified Files
--------------
contrib/pg_trgm/trgm_gist.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)



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


end of thread, other threads:[~2020-11-12 16:01 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>
2020-11-12 16:01 pgsql: pg_trgm: fix crash in 2-item picksplit Andrew Gierth <rhodiumtoad@postgresql.org>

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