Fuzzing Crash: VortexError in file_corruption
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #12471 @myrrc による — マージされずにクローズ
評価
調査の方向性
Start by reading vortex-layout/src/scan/split_by.rs, especially subdivide_large_spans around line 243 and SplitBy::splits around line 100; then trace its call from scan_builder.rs around line 411. Reproduce the out-of-memory abort with the fuzz/src/file/corruption.rs harness and inspect how corrupted files produce excessive spans. Done means the harness no longer triggers the 2 GiB allocation while valid scans still work.
索引モデルが issue の本文から書いたものです。
説明
Fuzzing Crash Report
Analysis
Crash Location: realloc
Error Message:
libFuzzer: deadly signal
Stack Trace
#0 0xbb7c22c99a94 in __sanitizer_print_stack_trace asan_stack.cpp
#1 0xbb7c2d2fd178 in fuzzer::PrintStackTrace() /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libfuzzer-sys-0.4.13/libfuzzer/FuzzerUtil.cpp:210:38
#2 0xbb7c2d321e70 in fuzzer::Fuzzer::HandleMalloc(unsigned long) /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libfuzzer-sys-0.4.13/libfuzzer/FuzzerLoop.cpp:131:18
#3 0xbb7c2d321e70 in fuzzer::Fuzzer::HandleMalloc(unsigned long) /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libfuzzer-sys-0.4.13/libfuzzer/FuzzerLoop.cpp:125:6
#4 0xbb7c2d321ee0 in fuzzer::MallocHook(void const volatile*, unsigned long) /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libfuzzer-sys-0.4.13/libfuzzer/FuzzerLoop.cpp:100:18
#5 0xbb7c22c9f51c in __sanitizer::RunMallocHooks(void*, unsigned long) sanitizer_common.cpp
#6 0xbb7c22c07d58 in __asan::Allocator::AllocateImpl(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType, bool, bool) asan_allocator.cpp
#7 0xbb7c22c02eac in __asan::Allocator::Reallocate(void*, unsigned long, __sanitizer::BufferedStackTrace*) asan_allocator.cpp
#8 0xbb7c22c02e38 in __asan::asan_realloc(void*, unsigned long, __sanitizer::BufferedStackTrace*) asan_allocator.cpp
#9 0xbb7c22c922d8 in realloc asan_malloc_linux.cpp
#10 0xbb7c2684f1e0 in realloc_nonnull /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:260:14
#11 0xbb7c2684f1e0 in grow_impl_runtime /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:384:31
#12 0xbb7c2684f1e0 in grow_impl /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:487:9
#13 0xbb7c2684f1e0 in grow /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:600:23
#14 0xbb7c2684f1e0 in <alloc::raw_vec::RawVecInner>::finish_grow /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:580:28
#15 0xbb7c2684ef08 in grow_amortized<alloc::alloc::Global> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:550:33
#16 0xbb7c2684ef08 in grow_one<alloc::alloc::Global> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:514:41
#17 0xbb7c2684ef08 in <alloc::raw_vec::RawVec<u64>>::grow_one /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:198:29
#18 0xbb7c23c29498 in push_mut<u64, alloc::alloc::Global> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:1003:22
#19 0xbb7c23c29498 in push<u64, alloc::alloc::Global> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:966:22
#20 0xbb7c23c29498 in subdivide_large_spans /home/runner/work/vortex/vortex/vortex-layout/src/scan/split_by.rs:243:21
#21 0xbb7c23c29498 in <vortex_layout::scan::split_by::SplitBy>::splits /home/runner/work/vortex/vortex/vortex-layout/src/scan/split_by.rs:100:17
#22 0xbb7c22f938e8 in prepare<vortex_array::array::erased::ArrayRef> /home/runner/work/vortex/vortex/vortex-layout/src/scan/scan_builder.rs:411:26
#23 0xbb7c22f938e8 in <vortex_layout::scan::scan_builder::LazyScanStream<vortex_array::array::erased::ArrayRef> as futures_core::stream::Stream>::poll_next::{closure#0} /home/runner/work/vortex/vortex/vortex-layout/src/scan/scan_builder.rs:497:65
#24 0xbb7c22f04be4 in call_once<core::result::Result<core::pin::Pin<alloc::boxed::Box<(dyn futures_core::stream::Stream<Item=core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send), alloc::alloc::Global>>, vortex_error::VortexError>, vortex_layout::scan::scan_builder::{impl#4}::poll_next::{closure_env#0}<vortex_array::array::erased::ArrayRef>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
#25 0xbb7c22f04be4 in std::panicking::catch_unwind::do_call::<core::panic::unwind_safe::AssertUnwindSafe<<vortex_layout::scan::scan_builder::LazyScanStream<vortex_array::array::erased::ArrayRef> as futures_core::stream::Stream>::poll_next::{closure#0}>, core::result::Result<core::pin::Pin<alloc::boxed::Box<dyn futures_core::stream::Stream<Item = core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send>>, vortex_error::VortexError>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:573:43
#26 0xbb7c2322b7ac in __rust_try vortex_fuzz.327295a9bec1910f-cgu.0
#27 0xbb7c22f9f63c in catch_unwind<core::result::Result<core::pin::Pin<alloc::boxed::Box<(dyn futures_core::stream::Stream<Item=core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send), alloc::alloc::Global>>, vortex_error::VortexError>, core::panic::unwind_safe::AssertUnwindSafe<vortex_layout::scan::scan_builder::{impl#4}::poll_next::{closure_env#0}<vortex_array::array::erased::ArrayRef>>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:541:19
#28 0xbb7c22f9f63c in catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<vortex_layout::scan::scan_builder::{impl#4}::poll_next::{closure_env#0}<vortex_array::array::erased::ArrayRef>>, core::result::Result<core::pin::Pin<alloc::boxed::Box<(dyn futures_core::stream::Stream<Item=core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send), alloc::alloc::Global>>, vortex_error::VortexError>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:359:14
#29 0xbb7c22f9f63c in {closure#0}<vortex_layout::scan::scan_builder::{impl#4}::poll_next::{closure_env#0}<vortex_array::array::erased::ArrayRef>, core::result::Result<core::pin::Pin<alloc::boxed::Box<(dyn futures_core::stream::Stream<Item=core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send), alloc::alloc::Global>>, vortex_error::VortexError>> /home/runner/work/vortex/vortex/vortex-io/src/runtime/handle.rs:168:30
#30 0xbb7c22f9f63c in <<vortex_io::runtime::handle::Handle>::spawn_cpu<<vortex_layout::scan::scan_builder::LazyScanStream<vortex_array::array::erased::ArrayRef> as futures_core::stream::Stream>::poll_next::{closure#0}, core::result::Result<core::pin::Pin<alloc::boxed::Box<dyn futures_core::stream::Stream<Item = core::result::Result<vortex_array::array::erased::ArrayRef, vortex_error::VortexError>> + core::marker::Send>>, vortex_error::VortexError>>::{closure#0} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
#31 0xbb7c261501fc in call_once<(), (dyn core::ops::function::FnOnce<(), Output=()> + core::marker::Send), alloc::alloc::Global> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:2466:9
#32 0xbb7c261501fc in {async_block#0} /home/runner/work/vortex/vortex/vortex-io/src/runtime/smol.rs:49:70
#33 0xbb7c261501fc in <async_executor::AsyncCallOnDrop<<vortex_io::runtime::smol::SmolExecutor as vortex_io::runtime::Executor>::spawn_cpu::{closure#0}, <async_executor::Executor>::spawn_inner<(), <vortex_io::runtime::smol::SmolExecutor as vortex_io::runtime::Executor>::spawn_cpu::{closure#0}>::{closure#0}> as core::future::future::Future>::poll /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-executor-1.14.0/src/lib.rs:1195:31
#34 0xbb7c2609b170 in {closure#1}<async_executor::AsyncCallOnDrop<vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}, async_executor::{impl#5}::spawn_inner::{closure_env#0}<(), vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}>>, (), async_executor::{impl#5}::schedule::{closure_env#0}, ()> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-task-4.7.1/src/raw.rs:550:21
#35 0xbb7c2609b170 in call_once<async_task::raw::{impl#3}::run::{closure_env#1}<async_executor::AsyncCallOnDrop<vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}, async_executor::{impl#5}::spawn_inner::{closure_env#0}<(), vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}>>, (), async_executor::{impl#5}::schedule::{closure_env#0}, ()>, ()> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
#36 0xbb7c2609b170 in call_once<core::task::poll::Poll<()>, async_task::raw::{impl#3}::run::{closure_env#1}<async_executor::AsyncCallOnDrop<vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}, async_executor::{impl#5}::spawn_inner::{closure_env#0}<(), vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}>>, (), async_executor::{impl#5}::schedule::{closure_env#0}, ()>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
#37 0xbb7c2609b170 in std::panicking::catch_unwind::do_call::<core::panic::unwind_safe::AssertUnwindSafe<<async_task::raw::RawTask<async_executor::AsyncCallOnDrop<<vortex_io::runtime::smol::SmolExecutor as vortex_io::runtime::Executor>::spawn_cpu::{closure#0}, <async_executor::Executor>::spawn_inner<(), <vortex_io::runtime::smol::SmolExecutor as vortex_io::runtime::Executor>::spawn_cpu::{closure#0}>::{closure#0}>, (), <async_executor::Executor>::schedule::{closure#0}, ()>>::run::{closure#1}>, core::task::poll::Poll<()>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:573:43
#38 0xbb7c26156cc4 in __rust_try vortex_io.69f013d23f606250-cgu.0
#39 0xbb7c260f3b60 in catch_unwind<core::task::poll::Poll<()>, core::panic::unwind_safe::AssertUnwindSafe<async_task::raw::{impl#3}::run::{closure_env#1}<async_executor::AsyncCallOnDrop<vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}, async_executor::{impl#5}::spawn_inner::{closure_env#0}<(), vortex_io::runtime::smol::{impl#3}::spawn_cpu::{async_block_env#0}>>, (), async_executor::{impl#5}::schedule::{closure_env#0}, ()>>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:541:19
... (31 more frames truncated)
Root Cause Analysis
This is an out-of-memory abort, not a panic. libFuzzer stopped the run when a single realloc asked for 2 GiB (malloc(2147483648) in the log). The VortexError variant in the crash fields is a guess from the extractor; no Rust error is returned. The allocation happens in Vec::push inside subdivide_large_spans at vortex-layout/src/scan/split_by.rs:243. The call comes from SplitBy::splits (split_by.rs:100), which LazyScanStream's prepare step calls in scan_builder.rs:411.
The file_corruption harness (fuzz/src/file/corruption.rs) changes bytes in a valid Vortex file and then runs a full default scan through read_corrupted. The default split strategy is SplitBy::LayoutSubSplitting with max_rows equal to IDEAL_SPLIT_SIZE (100,000). subdivide_large_spans divides every boundary gap wider than max_rows into pieces of at most max_rows rows, and it adds each interior point to a Vec. The number of points is therefore about the declared row count divided by 100,000, and nothing limits it. The corruption most likely changed a row count in the footer or layout metadata, which gave the root layout's row_range or a chunk boundary a very large value. A row count of about 2.7e13 is enough to produce roughly 268 million boundaries, or 2 GiB of u64 values, before any data is read. Nothing checks the declared row count against the data that is actually in the file, so the splitting code trusts metadata from an untrusted source.
The library is at fault. The harness is right to expect a corrupted file to produce an error, not to exhaust memory. There are two possible fixes. The first is to check row counts in the layout or footer when the file is opened: a flat or chunked layout cannot declare far more rows than its segments could encode, and chunk row counts must add up to the parent's row count. The second is to stop computing all splits up front. A scan could produce the sub-split ranges lazily from (lo, hi, sub_size) on demand, or subdivide_large_spans could cap the number of splits and return a VortexError when the total is unreasonably large. The lazy version also removes the memory cost for very large files that are legitimate.
Summary
- Target:
file_corruption - Crash File:
oom-330906d67b3e2ec921e1c9cef64265f3a51de80d - Branch: develop
- Commit: f7b7b90739d928489938dca8d020bb19c00cd1a3
- Crash Artifact: https://github.com/vortex-data/vortex/actions/runs/45875423320/artifacts/15144318879
Reproduce
cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-330906d67b3e2ec921e1c9cef64265f3a51de80d -- -rss_limit_mb=0
Reproduction Steps
-
Download the crash artifact: https://github.com/vortex-data/vortex/actions/runs/45875423320/artifacts/15144318879
-
Assuming you download the zipfile to
~/Downloads, and your working directory is the repository root:
# Create the artifacts directory if you haven't already.
mkdir -p ./fuzz/artifacts
# Move the zipfile.
mv ~/Downloads/file_corruption-crash-artifacts.zip ./fuzz/artifacts/
# Unzip the zipfile.
unzip ./fuzz/artifacts/file_corruption-crash-artifacts.zip -d ./fuzz/artifacts/
# You can remove the zipfile now if you want to.
rm ./fuzz/artifacts/file_corruption-crash-artifacts.zip
- Reproduce the crash:
cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-330906d67b3e2ec921e1c9cef64265f3a51de80d -- -rss_limit_mb=0
If you want a backtrace:
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-330906d67b3e2ec921e1c9cef64265f3a51de80d -- -rss_limit_mb=0
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-330906d67b3e2ec921e1c9cef64265f3a51de80d -- -rss_limit_mb=0
Single command to get a backtrace
mkdir -p ./fuzz/artifacts
mv ~/Downloads/file_corruption-crash-artifacts.zip ./fuzz/artifacts/
unzip ./fuzz/artifacts/file_corruption-crash-artifacts.zip -d ./fuzz/artifacts/
rm ./fuzz/artifacts/file_corruption-crash-artifacts.zip
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-330906d67b3e2ec921e1c9cef64265f3a51de80d -- -rss_limit_mb=0
Auto-created by fuzzing workflow
- 主要言語
- Rust
- スター
- 3.2k
- フォーク
- 239
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 684
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vortex-data/vortex のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vortex-data/vortex#12633 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
vortex-data/vortex#12628 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
vortex-data/vortex#12491 ·
メンテナーはふだん 1 日以内に返信
-
Fallible constructor for nested_case_when対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vortex-data/vortex#11425 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
vortex-data/vortex#12635 ·
メンテナーはふだん 1 日以内に返信
vortex-data/vortex の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
marklauter/tsong#110 ·
-
docs enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wasm-bindgen/wasm-bindgen#5503 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
area: engine bug needs milestone
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Mudcrab-Team/mudcrab#1197 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信