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
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_DecryptUpdatebeing 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_,kNonceLengthandkGcmTagLength.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