Fuzzing Crash: VortexError in file_corruption

Open
#12,570 3 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
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
databases

Research direction

Start by reproducing the file_corruption fuzzing crash with the provided artifact and command. Trace the allocation from constant_canonical_byte_view in vortex-array/src/arrays/constant/vtable/canonical.rs and inspect the Shared execution path in vortex-scan/src/arrays/shared/vtable.rs. Done means the crashing input no longer triggers an excessive allocation and the regression is covered by a test.

Written by the indexing model from the issue text.

Description

bug fuzzer

Target crashed at malloc:

libFuzzer: out-of-memory (malloc(19058917648))
Stack trace
#0 0xb9a0cd5d5654 in __sanitizer_print_stack_trace asan_stack.cpp
#1 0xb9a0d822c158 in fuzzer::PrintStackTrace() /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libfuzzer-sys-0.4.13/libfuzzer/FuzzerUtil.cpp:210:38
#2 0xb9a0d8250e50 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 0xb9a0d8250e50 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 0xb9a0d8250ec0 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 0xb9a0cd5db0dc in __sanitizer::RunMallocHooks(void*, unsigned long) sanitizer_common.cpp
#6 0xb9a0cd543918 in __asan::Allocator::AllocateImpl(unsigned long, unsigned long, __sanitizer::BufferedStackTrace*, __asan::AllocType, bool, bool) asan_allocator.cpp
#7 0xb9a0cd53e7c0 in __asan::asan_malloc(unsigned long, __sanitizer::BufferedStackTrace*) asan_allocator.cpp
#8 0xb9a0cd5cdad0 in malloc asan_malloc_linux.cpp
#9 0xb9a0d80effb8 in alloc /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:158:9
#10 0xb9a0d80effb8 in alloc_impl /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/allocator-api2-0.2.22/src/stable/alloc/global.rs:35:21
#11 0xb9a0d80effb8 in allocate /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/allocator-api2-0.2.22/src/stable/alloc/global.rs:100:14
#12 0xb9a0d80effb8 in allocate /home/runner/work/vortex/vortex/vortex-buffer/src/allocation.rs:105:28
#13 0xb9a0d80effb8 in <vortex_buffer::allocation::Allocation>::allocate_impl /home/runner/work/vortex/vortex/vortex-buffer/src/allocation.rs:286:23
#14 0xb9a0d6936fd8 in <vortex_buffer::buffer_mut::BufferMut<vortex_array::arrays::varbinview::view::BinaryView>>::with_capacity_preferred_aligned_in /home/runner/work/vortex/vortex/vortex-buffer/src/buffer_mut.rs:146:26
#15 0xb9a0d6937bc4 in with_capacity_aligned_in<vortex_array::arrays::varbinview::view::BinaryView> /home/runner/work/vortex/vortex/vortex-buffer/src/buffer_mut.rs:90:9
#16 0xb9a0d6937bc4 in with_capacity_in<vortex_array::arrays::varbinview::view::BinaryView> /home/runner/work/vortex/vortex/vortex-buffer/src/buffer_mut.rs:67:9
#17 0xb9a0d6937bc4 in <vortex_buffer::buffer_mut::BufferMut<vortex_array::arrays::varbinview::view::BinaryView>>::full_in /home/runner/work/vortex/vortex/vortex-buffer/src/buffer_mut.rs:305:26
#18 0xb9a0d71fb148 in full_in<vortex_array::arrays::varbinview::view::BinaryView> /home/runner/work/vortex/vortex/vortex-buffer/src/buffer.rs:279:9
#19 0xb9a0d71fb148 in vortex_array::arrays::constant::vtable::canonical::constant_canonical_byte_view /home/runner/work/vortex/vortex/vortex-array/src/arrays/constant/vtable/canonical.rs:267:25
#20 0xb9a0d795904c in constant_canonicalize /home/runner/work/vortex/vortex/vortex-array/src/arrays/constant/vtable/canonical.rs:116:35
#21 0xb9a0d795904c in <vortex_array::arrays::constant::vtable::Constant as vortex_array::array::vtable::VTable>::execute /home/runner/work/vortex/vortex/vortex-array/src/arrays/constant/vtable/mod.rs:136:34
#22 0xb9a0d41a2ecc in vortex_array::array::execute_encoding::<vortex_array::arrays::constant::vtable::Constant> /home/runner/work/vortex/vortex/vortex-array/src/array/mod.rs:271:5
#23 0xb9a0d7b030f8 in execute_encoding_unchecked /home/runner/work/vortex/vortex/vortex-array/src/array/erased.rs:752:9
#24 0xb9a0d7b030f8 in execute_until<vortex_array::canonical::AnyCanonical> /home/runner/work/vortex/vortex/vortex-array/src/executor/mod.rs:455:40
#25 0xb9a0d7b030f8 in <vortex_array::canonical::Canonical as vortex_array::executor::Executable>::execute /home/runner/work/vortex/vortex/vortex-array/src/canonical.rs:576:28
#26 0xb9a0d2e1a83c in execute<vortex_array::canonical::Canonical> /home/runner/work/vortex/vortex/vortex-array/src/executor/mod.rs:109:9
#27 0xb9a0d2e1a83c in {closure#0} /home/runner/work/vortex/vortex/vortex-scan/src/arrays/shared/vtable.rs:105:53
#28 0xb9a0d2e1a83c in {closure#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}> /home/runner/work/vortex/vortex/vortex-scan/src/arrays/shared/array.rs:66:29
#29 0xb9a0d2e1a83c in {closure#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, vortex_scan::arrays::shared::array::SharedArrayExt::get_or_compute::{closure_env#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once_lock.rs:350:50
#30 0xb9a0d2e1a83c in {closure#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, std::sync::once_lock::{impl#0}::get_or_init::{closure_env#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, vortex_scan::arrays::shared::array::SharedArrayExt::get_or_compute::{closure_env#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}>>, !> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once_lock.rs:572:19
#31 0xb9a0d2e1a83c in <std::sync::once::Once>::call_once_force::<<std::sync::once_lock::OnceLock<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError>>>>::initialize<<std::sync::once_lock::OnceLock<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError>>>>::get_or_init<<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared> as vortex_scan::arrays::shared::array::SharedArrayExt>::get_or_compute<<vortex_scan::arrays::shared::vtable::Shared as vortex_array::array::vtable::VTable>::execute::{closure#0}>::{closure#0}>::{closure#0}, !>::{closure#0}>::{closure#0} /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once.rs:227:40
#32 0xb9a0d828ab4c in <std::sys::sync::once::futex::Once>::call /rustc/8eb778d04094d3af4b26580cab327e0413eb1e02/library/std/src/sys/sync/once/futex.rs:183:21
#33 0xb9a0d2d1382c in call_once_force<std::sync::once_lock::{impl#0}::initialize::{closure_env#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, std::sync::once_lock::{impl#0}::get_or_init::{closure_env#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, vortex_scan::arrays::shared::array::SharedArrayExt::get_or_compute::{closure_env#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}>>, !>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once.rs:227:20
#34 0xb9a0d2d1382c in <std::sync::once_lock::OnceLock<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError>>>>::initialize::<<std::sync::once_lock::OnceLock<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError>>>>::get_or_init<<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared> as vortex_scan::arrays::shared::array::SharedArrayExt>::get_or_compute<<vortex_scan::arrays::shared::vtable::Shared as vortex_array::array::vtable::VTable>::execute::{closure#0}>::{closure#0}>::{closure#0}, !> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once_lock.rs:571:19
#35 0xb9a0d2f55e88 in get_or_try_init<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, std::sync::once_lock::{impl#0}::get_or_init::{closure_env#0}<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, vortex_scan::arrays::shared::array::SharedArrayExt::get_or_compute::{closure_env#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}>>, !> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once_lock.rs:439:14
#36 0xb9a0d2f55e88 in get_or_init<core::result::Result<vortex_array::array::erased::ArrayRef, alloc::rcs::arc::Arc<vortex_error::VortexError, alloc::alloc::Global>>, vortex_scan::arrays::shared::array::SharedArrayExt::get_or_compute::{closure_env#0}<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}>> /home/runner/.rustup/toolchains/nightly-2026-11-13-aarch64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once_lock.rs:350:20
#37 0xb9a0d2f55e88 in get_or_compute<vortex_array::array::typed::Array<vortex_scan::arrays::shared::vtable::Shared>, vortex_scan::arrays::shared::vtable::{impl#2}::execute::{closure_env#0}> /home/runner/work/vortex/vortex/vortex-scan/src/arrays/shared/array.rs:66:14
#38 0xb9a0d2f55e88 in <vortex_scan::arrays::shared::vtable::Shared as vortex_array::array::vtable::VTable>::execute /home/runner/work/vortex/vortex/vortex-scan/src/arrays/shared/vtable.rs:105:14
#39 0xb9a0d2d651f0 in vortex_array::array::execute_encoding::<vortex_scan::arrays::shared::vtable::Shared> /home/runner/work/vortex/vortex/vortex-array/src/array/mod.rs:271:5
... (23 more frames truncated)

To reproduce, download the crash artifact to ~/Downloads and run these
commands from the repository root:

unzip ~/Downloads/file_corruption-crash-artifacts.zip -d fuzz-artifacts
RUST_BACKTRACE=1 cargo +nightly fuzz run -D --sanitizer=none \
  file_corruption \
  fuzz-artifacts/file_corruption/oom-a663a573cca47b5ac465a7c0d4945bdefe89ee97 \
  -- -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.