Skip to content

[C++][Parquet] Reading corrupted encrypted Parquet files can cause a segfault #43070

@adamreeve

Description

@adamreeve

Describe the bug, including details regarding any error messages, version, and platform.

We experienced a segfault reading an encrypted Parquet file and traced this down to EVP_DecryptUpdate being called here with a negative value for the last parameter, which is the ciphertext length.

By debugging the problem I found that the length was being read from the file as zero, which became negative after subtracting length_buffer_length_, kNonceLength and kGcmTagLength.

This file was written with PyArrow but we suspect it may have become corrupted somehow. I would expect that this should result in a catchable exception rather than a segfault though.

Component(s)

C++, Parquet

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions