Skip to content

fix: reject null list slots and empty geohashes - #42

Merged
mailletf merged 1 commit into
mainfrom
fix/reject-degenerate-inputs
Sep 16, 2026
Merged

mailletf merged 1 commit into
mainfrom
fix/reject-degenerate-inputs

Conversation

@mailletf

@mailletf mailletf commented Sep 1, 2026

Copy link
Copy Markdown
Member

Two pre-existing input-validation gaps surfaced by an adversarial review of the stack (they pre-date PRs #31–#40, so they get their own PR on top):

  • Null geohash_lists slots in expand_geohash_mapping_arrow were silently read through their offsets and became empty groups. pyarrow happens to write equal offsets under a null slot, but the Arrow spec allows them to span arbitrary positions of the values buffer, so foreign-written data could expand undefined bytes as geohashes. Null geog_ids and null list elements already errored; null list slots now do too.
  • The empty geohash "" decodes to the whole-world bbox in the geohash crate, so an empty value from an upstream join quietly became a planet-sized polygon (or expansion sample). Every decode of user input now goes through a checked wrapper that refuses it — list, Arrow, and expansion entry points.

Both come with Rust and Python tests.

🤖 Generated with Claude Code

@mailletf
mailletf force-pushed the fix/reject-degenerate-inputs branch from 5db1d0a to 842112c Compare September 1, 2026 18:33
@mailletf
mailletf force-pushed the perf/parallel-polygon-cover branch 2 times, most recently from 4b47991 to 3eda41c Compare September 1, 2026 18:54
@mailletf
mailletf force-pushed the fix/reject-degenerate-inputs branch from 842112c to 6419e79 Compare September 1, 2026 18:54
@mailletf
mailletf force-pushed the perf/parallel-polygon-cover branch from 3eda41c to 8ae07d8 Compare September 16, 2026 19:13
@mailletf
mailletf force-pushed the fix/reject-degenerate-inputs branch from 6419e79 to 94bd11a Compare September 16, 2026 19:13
A null slot in geohash_lists was read straight through its offsets and
silently became an empty group. With pyarrow-produced data a null slot
happens to have equal offsets, but the Arrow spec lets them span
arbitrary positions of the values buffer, so foreign-written data could
expand undefined bytes as geohashes. Null geog_ids and null list
elements already error; null list slots now do too.

Squashed with:
- fix: reject the empty geohash instead of decoding the whole world

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mailletf
mailletf force-pushed the fix/reject-degenerate-inputs branch from 94bd11a to 61b9687 Compare September 16, 2026 19:19
@mailletf
mailletf merged commit 57162d2 into main Sep 16, 2026
2 checks passed
@mailletf
mailletf deleted the fix/reject-degenerate-inputs branch September 16, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant