Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Check for valid variadic buffer counts #38738

Closed
bkietz opened this issue Nov 15, 2023 · 0 comments · Fixed by #38740
Closed

[C++] Check for valid variadic buffer counts #38738

bkietz opened this issue Nov 15, 2023 · 0 comments · Fixed by #38740
Assignees
Milestone

Comments

@bkietz
Copy link
Member

bkietz commented Nov 15, 2023

Describe the bug, including details regarding any error messages, version, and platform.

Variadic buffer count is stored as int64 and is used to presize vectors when reading IPC. These aren't validated for representability in a positive int32, which led to some fuzzer failures.

Component(s)

C++

@bkietz bkietz self-assigned this Nov 15, 2023
bkietz added a commit to bkietz/arrow that referenced this issue Nov 15, 2023
bkietz added a commit that referenced this issue Nov 27, 2023
### Rationale for this change

Invalid variadic buffer counts can cause allocating storage for variadic buffers to fail.

### What changes are included in this PR?

Check variadic buffer counts are valid before they are used as an allocator argument.

### Are these changes tested?

They pass with the fuzzer testcase.

### Are there any user-facing changes?

No

* Closes: #38738

Lead-authored-by: Benjamin Kietzman <bengilgit@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
@bkietz bkietz added this to the 15.0.0 milestone Nov 27, 2023
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…38740)

### Rationale for this change

Invalid variadic buffer counts can cause allocating storage for variadic buffers to fail.

### What changes are included in this PR?

Check variadic buffer counts are valid before they are used as an allocator argument.

### Are these changes tested?

They pass with the fuzzer testcase.

### Are there any user-facing changes?

No

* Closes: apache#38738

Lead-authored-by: Benjamin Kietzman <bengilgit@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant