Fuzzing Crash: VortexError in file_corruption

未關閉
#12,244 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
42/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
rust
領域
databases

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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

主要語言
Rust
星號
3.2k
分支
239
平均合併
1 天 4 小時
30 天內合併 PR
684

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

vortex-data/vortex 的其他 Issue

查看 vortex-data/vortex 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。