8000 fix: Fix potential OOB writes in unaligned IPC read by nameexhaustion · Pull Request #24550 · pola-rs/polars · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@nameexhaustion
Copy link
Collaborator
@nameexhaustion nameexhaustion commented Sep 19, 2025

No description provided.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Sep 19, 2025
values.as_mut_ptr() as *mut u8,
bytes.len(),
)
num_bytes,
Copy link
Collaborator Author
@nameexhaustion nameexhaustion Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure we copy based on allocated capacity rather than the source length

Expanding the diff above, check_bytes_len_and_is_aligned on L282 does only guarantees the source length is at least the required number of bytes; meaning that there could be more bytes.

if bytes.len() < size_of::<T>() * expected_len {

@nameexhaustion nameexhaustion changed the title fix: Fix potential OOB writes in IPC read fix: Fix potential OOB writes in unaligned IPC read Sep 19, 2025
@codecov
Copy link
codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.77%. Comparing base (f0fc158) to head (a3f964b).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/polars-arrow/src/mmap/array.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24550      +/-   ##
==========================================
- Coverage   81.81%   81.77%   -0.05%     
==========================================
  Files        1683     1684       +1     
  Lines      229051   229465     +414     
  Branches     2946     2952       +6     
==========================================
+ Hits       187406   187634     +228     
- Misses      40906    41088     +182     
- Partials      739      743       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nameexhaustion nameexhaustion marked this pull request as ready for review September 19, 2025 14:58
@ritchie46 ritchie46 merged commit f7c7129 into pola-rs:main Sep 22, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix python Related to Python Polars rust Related to Rust Polars

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0