[ 
https://issues.apache.org/jira/browse/SPARK-59831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

L. C. Hsieh resolved SPARK-59831.
---------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

Issue resolved by pull request 59118
[https://github.com/apache/spark/pull/59118]

> Validate bounds in the vectorized BYTE_STREAM_SPLIT reader
> ----------------------------------------------------------
>
>                 Key: SPARK-59831
>                 URL: https://issues.apache.org/jira/browse/SPARK-59831
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.3.0, 4.4.0
>            Reporter: L. C. Hsieh
>            Assignee: L. C. Hsieh
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> Follow-up of SPARK-59812. The vectorized BYTE_STREAM_SPLIT reader 
> (VectorizedByteStreamSplitValuesReader, added by SPARK-56894) does not 
> validate its position against the page, so a corrupt page can be decoded 
> silently:
> * The skip methods (skipIntegers, skipLongs, skipFloats, skipDoubles, 
> skipBytes, skipShorts, skipBinary, skipFixedLenByteArray) only do `offset += 
> total`, without checking that the page has that many values. The read paths 
> index pageData without a bound check either, so reading past the end reads 
> bytes from the next stream or fails with an ArrayIndexOutOfBoundsException 
> instead of a ParquetDecodingException.
> * initFromPage derives the value count as `totalBytes / typeWidth` and does 
> not reject `totalBytes % typeWidth != 0`. For such a page, every stream 
> starts at the wrong offset, so every value is silently decoded from the wrong 
> bytes.
> SPARK-56894 is in branch-4.3 and v4.3.0-rc1, so this should be fixed before 
> 4.3.0 is released.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to