Commit 4ba70c5
authored
### Rationale for this change
The logic for loading a Union array from a IPC file was inquiring whether a validity bitmap is present in a V4 metadata file (i.e. `buffers[0] != nullptr`). However, in the pre-buffering case, the buffers haven't been populated yet at the point, so the check would be ignored and the IPC file reader could happily create a Union array with a top validity bitmap. This could crash later in `UnionArray::SetData`.
Found by OSS-Fuzz in https://issues.oss-fuzz.com/issues/482161154
### Are these changes tested?
By integration test and fuzz regression file. There are no unit tests in the C++ test suite that exercise V4 metadata IPC files with top-level union validity bitmaps.
### Are there any user-facing changes?
No.
**This PR contains a "Critical Fix".** This fixes a controlled crash when reading a pre-V5 IPC file with a top-level union validity bitmap and pre-buffering enabled. Instead a regular error will be returned. There are no known security implications.
* GitHub Issue: #49229
Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 1d76e1e commit 4ba70c5
2 files changed
+17
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
| |||
471 | 477 | | |
472 | 478 | | |
473 | 479 | | |
474 | | - | |
475 | | - | |
476 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
477 | 484 | | |
478 | 485 | | |
479 | 486 | | |
| |||
482 | 489 | | |
483 | 490 | | |
484 | 491 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
| |||
0 commit comments