GeometryCollection with strict-winding polygon causes server crash during 2dsphere index key generation
MongoDB Server
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| MongoDB MongoDB Server |
| No fix yet |
Original description
An authorized user could trigger a server crash by running a query with a 2dsphere index on a field that stores a GeoJSON GeometryCollection containing a Polygon with a strict-winding CRS.
Strict-winding polygons are intentionally unsupported for indexing, but the guard that rejects them does not inspect members of a GeometryCollection, allowing the unsafe path to be reached which ends with an ensuing null-pointer dereference.