Opened 3 years ago

Closed 3 years ago

#4917 closed defect (fixed)

_postgis_index_extent() crashes server

Reported by: Robins Owned by: pramsey
Priority: medium Milestone: PostGIS 3.0.4
Component: postgis Version: 3.0.x
Keywords: _postgis_index_extent Cc:

Description

Providing bogus inputs to _postgis_index_extent() crashes server.

$ psql
psql (13beta2, server 13.3)
Type "help" for help.

regression=> \x
Expanded display is on.

regression=> \dx postgis
List of installed extensions
-[ RECORD 1 ]--------------------------------------------------------------------
Name        | postgis
Version     | 3.0.3
Schema      | public
Description | PostGIS geometry, geography, and raster spatial types and functions

regression=> select public._postgis_index_extent(cast('-' as regclass), version()) as c3;
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!?> \q

Change History (9)

comment:1 by pramsey, 3 years ago

Milestone: PostGIS 3.1.23.1.3

comment:2 by pramsey, 3 years ago

Milestone: 3.1.3PostGIS 3.1.3

Milestone renamed

comment:3 by robe, 3 years ago

Milestone: PostGIS 3.1.3PostGIS 3.1.4

In prep for 3.1.3 release

comment:4 by robe, 3 years ago

Milestone: PostGIS 3.1.4PostGIS 3.0.4

Still crashes on pg14, backtrace gives me this:

Thread 1 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16088.0x4d28]
RelationGetIndexList (relation=relation@entry=0x0) at relcache.c:4584
4584            if (relation->rd_indexvalid)

comment:5 by Paul Ramsey <pramsey@…>, 3 years ago

In 4481969/git:

Catch special "no oid" regclass before passing in to index search, references #4917

comment:6 by Paul Ramsey <pramsey@…>, 3 years ago

In 4580ed1/git:

Catch special "no oid" regclass before passing in to index search, references #4917

comment:7 by Paul Ramsey <pramsey@…>, 3 years ago

In 1ffd49d/git:

Catch special "no oid" regclass before passing in to index search, references #4917

comment:8 by pramsey, 3 years ago

That's incredibly specifically obscure. Why would you ever do that?

comment:9 by pramsey, 3 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.