Skip to content

[Security] Clamp file-controlled bit_width in cencoding RLE decode (SIGSEGV, fixes #985) - #989

Open
plotarmordev wants to merge 1 commit into
dask:mainfrom
plotarmordev:c-ext-clamp
Open

plotarmordev wants to merge 1 commit into
dask:mainfrom
plotarmordev:c-ext-clamp

Conversation

@plotarmordev

Copy link
Copy Markdown

Ties to #985: bit_width from schema type_length is file-controlled, passed unvalidated into the boundscheck=False Cython RLE decode; a crafted parquet with huge type_length segfaults (exit 139). Clamp [1,64] before decode; verified 3x-cured locally, no regression on normal files.

bit_width for RLE/PLAIN_DICTIONARY columns comes from schema type_length and
was passed unvalidated into the cencoding RLE decode (boundscheck=False). A
crafted parquet with a huge type_length + short page caused SIGSEGV in
read_rle (OOB read/write). Clamp to the 64-bit max here before decoding.

Verified: crafted repro no longer crashes (3x) on a patched install; normal
files unaffected.
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