Fuzzing Crash: VortexError in file_corruption

Open
#12,244 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
databases

Research direction

Start by reproducing the file_corruption fuzz crash with the supplied artifact and command. Read vortex-io/src/segments/file.rs around BufferSegmentSource::request (line 541) and trace how corrupted file input reaches that request through the flat reader. Identify why this input drives memory use past the limit, then add a regression case and confirm the fuzz target handles it without exhausting memory.

Written by the indexing model from the issue text.

Description

bug fuzzer

Fuzzing Crash Report

Analysis

Crash Location: realloc

Error Message:

libFuzzer: out-of-memory (used: 2061Mb; limit: 2048Mb)
Stack Trace
#0 0xc56c6379aef0 in realloc asan_malloc_linux.cpp
#1 0xc56c6e94b0bc in alloc::alloc::realloc_nonnull /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/alloc.rs:260:14
#2 0xc56c6e94b0bc in <alloc::alloc::Global>::grow_impl_runtime /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/alloc.rs:384:31
#3 0xc56c6e94b0bc in <alloc::alloc::Global>::grow_impl /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/alloc.rs:487:9
#4 0xc56c6e94b0bc in <alloc::alloc::Global as core::alloc::Allocator>::grow /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/alloc.rs:600:23
#5 0xc56c6e94b0bc in <alloc::raw_vec::RawVecInner>::finish_grow /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/raw_vec/mod.rs:580:28
#6 0xc56c6e94a484 in <alloc::raw_vec::RawVecInner>::grow_amortized /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/raw_vec/mod.rs:550:33
#7 0xc56c6e94a484 in <alloc::raw_vec::RawVecInner>::grow_one /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/raw_vec/mod.rs:514:41
#8 0xc56c6e94a484 in <alloc::raw_vec::RawVec<std::backtrace_rs::symbolize::gimli::Library>>::grow_one /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/raw_vec/mod.rs:198:29
#9 0xc56c6e941b24 in <alloc::vec::Vec<std::backtrace::BacktraceFrame>>::push_mut /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/vec/mod.rs:1003:22
#10 0xc56c6e941b24 in <alloc::vec::Vec<std::backtrace::BacktraceFrame>>::push /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/alloc/src/vec/mod.rs:966:22
#11 0xc56c6e941b24 in <std::backtrace::Backtrace>::create::{closure#0} /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/std/src/backtrace.rs:332:24
#12 0xc56c6e95d004 in <&mut dyn for<'a> core::ops::function::FnMut<(&'a std::backtrace_rs::backtrace::Frame,), Output = bool> as core::ops::function::FnMut<(&std::backtrace_rs::backtrace::Frame,)>>::call_mut /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/core/src/ops/function.rs:298:21
#13 0xc56c6e95d004 in std::backtrace_rs::backtrace::libunwind::trace::trace_fn /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/std/src/../../backtrace/src/backtrace/libunwind.rs:130:26
#14 0xffeea5f27e40 in _Unwind_Backtrace /build/gcc-16-ULHTEd/gcc-16-16-20260322/build/aarch64-linux-gnu/libgcc/../../../src/libgcc/unwind.inc:309:12
#15 0x29c56c6e947b04  (<unknown module>)
#16 0xc56c6e947e08 in <std::backtrace::Backtrace>::capture /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/std/src/backtrace.rs:296:9
#17 0xc56c6e800ea8 in <vortex_error::VortexError>::from_parts /home/runner/work/vortex/vortex/vortex-error/src/lib.rs:140:28
#18 0xc56c6e804a44 in new<alloc::string::String> /home/runner/work/vortex/vortex/vortex-error/src/lib.rs:118:9
#19 0xc56c6e804a44 in vortex_error::__private::fmt_err /home/runner/work/vortex/vortex/vortex-error/src/lib.rs:516:9
#20 0xc56c66e0b720 in <vortex_io::segments::file::BufferSegmentSource as vortex_io::segments::SegmentSource>::request /home/runner/work/vortex/vortex/vortex-io/src/segments/file.rs:541:42
#21 0xc56c647412c0 in <vortex_layout::layouts::flat::reader::FlatReader>::array_future /home/runner/work/vortex/vortex/vortex-layout/src/layouts/flat/reader.rs:71:47
#22 0xc56c64b307a8 in <vortex_layout::layouts::flat::reader::FlatReader as vortex_layout::reader::LayoutReader>::projection_evaluation /home/runner/work/vortex/vortex/vortex-layout/src/layouts/flat/reader.rs:198:26
#23 0xc56c6488b5b4 in split_projection<false> /home/runner/work/vortex/vortex/vortex-layout/src/scan/tasks/mod.rs:74:14
#24 0xc56c6488b5b4 in split_exec_inner<false> /home/runner/work/vortex/vortex/vortex-layout/src/scan/tasks/mod.rs:46:16
#25 0xc56c6488b5b4 in vortex_layout::scan::tasks::split_exec /home/runner/work/vortex/vortex/vortex-layout/src/scan/tasks/mod.rs:35:9
#26 0xc56c63af8678 in execute_stream<vortex_array::array::erased::ArrayRef> /home/runner/work/vortex/vortex/vortex-layout/src/scan/repeated_scan.rs:356:42
#27 0xc56c63af8678 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:76
#28 0xc56c63a55cec 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
#29 0xc56c63a55cec 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
#30 0xc56c63e01ebc in __rust_try vortex_fuzz.10478703933afde7-cgu.0
#31 0xc56c63b03ec0 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
#32 0xc56c63b03ec0 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
#33 0xc56c63b03ec0 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
#34 0xc56c63b03ec0 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
#35 0xc56c66e1e4d8 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
#36 0xc56c66e1e4d8 in {async_block#0} /home/runner/work/vortex/vortex/vortex-io/src/runtime/smol.rs:49:70
#37 0xc56c66e1e4d8 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
#38 0xc56c66d69f48 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
#39 0xc56c66d69f48 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
... (471 more frames truncated)
Summary
Reproduce
cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-454099bfe3e4807faaff586b60117233d409ede6 -- -rss_limit_mb=2048
Reproduction Steps
  1. Download the crash artifact: https://github.com/vortex-data/vortex/actions/runs/46069778433/artifacts/15232572251

  2. 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
  1. Reproduce the crash:
cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-454099bfe3e4807faaff586b60117233d409ede6 -- -rss_limit_mb=2048

If you want a backtrace:

RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-454099bfe3e4807faaff586b60117233d409ede6 -- -rss_limit_mb=2048
RUST_BACKTRACE=full cargo +nightly fuzz run -D --sanitizer=none file_corruption ./fuzz/artifacts/file_corruption/oom-454099bfe3e4807faaff586b60117233d409ede6 -- -rss_limit_mb=2048
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-454099bfe3e4807faaff586b60117233d409ede6 -- -rss_limit_mb=2048

Auto-created by fuzzing workflow

Dominant language
Rust
Stars
3.2k
Forks
239
Avg merge
1d 4h
Merged PRs (30d)
684

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vortex-data/vortex

All issues in vortex-data/vortex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.