pitrou opened a new pull request, #55634:
URL: https://github.com/apache/arrow/pull/55634

   ### Rationale for this change
   
   In the IPC reader, when a subset of column is asked for, we allocate an 
entire buffer with the same size as the body size advertised in the IPC message.
   
   That allocation uses the default memory pool instead of a user-configured 
memory pool, which defeats any user-defined protection against memory expansion 
attacks using e.g. `CappedMemoryPool`.
   
   ### What changes are included in this PR?
   
   Slightly refactor IPC message reading functions to allow passing a custom 
memory pool for the case where the message-reading function needs to allocate 
memory itself (instead of relying on the `RandomAccessFile` to do it).
   
   ### Are these changes tested?
   
   Only by existing unit tests.
   
   ### Are there any user-facing changes?
   
   An existing API is deprecated and superseded by a more flexible signature. 
These functions are unlikely to be called by user code, however.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [ ] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [ ] AI
   - [ ] Not reviewed
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to