Inserting a document into a collection with a 2dsphere index crashes the server when the indexed field is a GeoJSON GeometryCollection containing a Polygon with the strict-winding CRS.
During index key generation, parseFromGeoJSON pushes a null s2Polygon pointer into the S2RegionUnion regions vector, which is later dereferenced in S2RegionUnion::GetRectBound(). A guard already exists to reject top-level strict-winding geometry, but it is bypassed for GeometryCollection because getNativeCRS() unconditionally returns SPHERE for collections without inspecting their members.
- related to
-
SERVER-127486 Harden geo code against GeoColl inputs with strict-winding polygons
-
- Backlog
-