You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2026/08/24 16:04:02 UTC

[I] [C++][Parquet] Unsanitized usage of uint32_t lengths accross Parquet metadata reads [arrow]

pitrou opened a new issue, #50971:
URL: https://github.com/apache/arrow/issues/50971

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   The Parquet reader uses disparate types for handling lengths of file components: most of the time `int64_t`, but sometimes also `uint32_t` or `int32_t` (especially when Thrift deserialization is involved, due to the Thrift C++ APIs).
   
   This leads to fragilities and potential issues. This can be seen here:
   https://github.com/apache/arrow/blob/8b469b179da3bda89d5e8d24c82523553f5aca5c/cpp/src/parquet/file_reader.cc#L448
   
   where we are adding two `uint32_t`s without regard for potential addition overflow.
   
   We should strive to use `int64_t` almost everywhere, only switching to narrower types when calling into third-party APIs that use such types.
   
   Kudos to Ada Logics and Claude for submitting a more detailed example of invalid pointer read.
   
   ### Component(s)
   
   C++, Parquet


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Parquet] Unsanitized usage of uint32_t lengths accross Parquet metadata reads [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #50971: [C++][Parquet] Unsanitized usage of uint32_t lengths accross Parquet metadata reads
URL: https://github.com/apache/arrow/issues/50971


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Parquet] Unsanitized usage of uint32_t lengths accross Parquet metadata reads [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #50971:
URL: https://github.com/apache/arrow/issues/50971#issuecomment-5397909017

   @DavidKorczynski


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Parquet] Unsanitized usage of uint32_t lengths accross Parquet metadata reads [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #50971:
URL: https://github.com/apache/arrow/issues/50971#issuecomment-5407037219

   Issue resolved by pull request 50972
   https://github.com/apache/arrow/pull/50972


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org