Skip to content

Fuzzing Crash: Registry missing encoding with id vortex.zstd #5658

@github-actions

Description

@github-actions

Fuzzing Crash Report

Analysis

Crash Location: vortex-array/src/context.rs:41 in function that creates VTableContext from encoding IDs

Error Message:

Registry missing encoding with id vortex.zstd

Stack Trace:

   0: __rustc::rust_begin_unwind
             at /rustc/37aa2135b5d0936bd13aa699d941aaa94fbaa645/library/std/src/panicking.rs:689:5
   1: core::panicking::panic_fmt
             at /rustc/37aa2135b5d0936bd13aa699d941aaa94fbaa645/library/core/src/panicking.rs:80:14
   2: panic_display<vortex_error::VortexError>
             at /rustc/37aa2135b5d0936bd13aa699d941aaa94fbaa645/library/core/src/panicking.rs:259:5
   3: {closure#1}<vortex_file::file::VortexFile, vortex_error::VortexError>
             at ./vortex-error/src/lib.rs:490:9
   4: unwrap_or_else<vortex_file::file::VortexFile, vortex_error::VortexError, vortex_error::{impl#11}::vortex_unwrap::{closure_env#1}<vortex_file::file::VortexFile, vortex_error::VortexError>>
             at /rustc/37aa2135b5d0936bd13aa699d941aaa94fbaa645/library/core/src/result.rs:1622:23
   5: vortex_unwrap<vortex_file::file::VortexFile, vortex_error::VortexError>
             at ./vortex-error/src/lib.rs:328:14
   6: __libfuzzer_sys_run
             at ./fuzz/fuzz_targets/file_io.rs:84:10

Root Cause: The fuzzer generated a file_io operation that includes a ChunkedArray with data compressed using the zstd encoding. When the fuzzer tries to read back the written buffer using SESSION.open_options().open_buffer(), the session's encoding registry doesn't include the zstd encoding. This causes the VTableContext creation to fail when trying to resolve the encoding ID "vortex.zstd".

The issue occurs at vortex-array/src/context.rs:41:

.ok_or_else(|| vortex_err!("Registry missing encoding with id {}", id))

This appears to be a configuration issue with the fuzzer's SESSION object - it needs to have all encodings that might be written registered in its encoding registry.

Debug Output
FuzzFileAction {
    array: ChunkedArray {
        dtype: Utf8(
            Nullable,
        ),
        len: 1,
        chunk_offsets: PrimitiveArray {
            dtype: Primitive(
                U64,
                NonNullable,
            ),
            buffer: Buffer<u8> {
                length: 32,
                alignment: Alignment(
                    8,
                ),
                as_slice: [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, ...],
            },
            validity: NonNullable,
            stats_set: ArrayStats {
                inner: RwLock {
                    data: StatsSet {
                        values: [],
                    },
                },
            },
        },
        chunks: [
            VarBinArray {
                dtype: Utf8(
                    Nullable,
                ),
                bytes: Buffer<u8> {
                    length: 0,
                    alignment: Alignment(
                        1,
                    ),
                    as_slice: [],
                },
                offsets: PrimitiveArray {
                    dtype: Primitive(
                        U32,
                        NonNullable,
                    ),
                    buffer: Buffer<u8> {
                        length: 8,
                        alignment: Alignment(
                            4,
                        ),
                        as_slice: [0, 0, 0, 0, 0, 0, 0, 0],
                    },
                    validity: NonNullable,
                    stats_set: ArrayStats {
                        inner: RwLock {
                            data: StatsSet {
                                values: [
                                    (
                                        IsSorted,
                                        Exact(
                                            ScalarValue(
                                                Bool(
                                                    true,
                                                ),
                                            ),
                                        ),
                                    ),
                                ],
                            },
                        },
                    },
                },
                validity: AllInvalid,
                stats_set: ArrayStats {
                    inner: RwLock {
                        data: StatsSet {
                            values: [],
                        },
                    },
                },
            },
            VarBinArray {
                dtype: Utf8(
                    Nullable,
                ),
                bytes: Buffer<u8> {
                    length: 0,
                    alignment: Alignment(
                        1,
                    ),
                    as_slice: [],
                },
                offsets: PrimitiveArray {
                    dtype: Primitive(
                        U32,
                        NonNullable,
                    ),
                    buffer: Buffer<u8> {
                        length: 4,
                        alignment: Alignment(
                            4,
                        ),
                        as_slice: [0, 0, 0, 0],
                    },
                    validity: NonNullable,
                    stats_set: ArrayStats {
                        inner: RwLock {
                            data: StatsSet {
                                values: [
                                    (
                                        IsSorted,
                                        Exact(
                                            ScalarValue(
                                                Bool(
                                                    true,
                                                ),
                                            ),
                                        ),
                                    ),
                                ],
                            },
                        },
                    },
                },
                validity: AllValid,
                stats_set: ArrayStats {
                    inner: RwLock {
                        data: StatsSet {
                            values: [],
                        },
                    },
                },
            },
            VarBinArray {
                dtype: Utf8(
                    Nullable,
                ),
                bytes: Buffer<u8> {
                    length: 0,
                    alignment: Alignment(
                        1,
                    ),
                    as_slice: [],
                },
                offsets: PrimitiveArray {
                    dtype: Primitive(
                        U32,
                        NonNullable,
                    ),
                    buffer: Buffer<u8> {
                        length: 4,
                        alignment: Alignment(
                            4,
                        ),
                        as_slice: [0, 0, 0, 0],
                    },
                    validity: NonNullable,
                    stats_set: ArrayStats {
                        inner: RwLock {
                            data: StatsSet {
                                values: [
                                    (
                                        IsSorted,
                                        Exact(
                                            ScalarValue(
                                                Bool(
                                                    true,
                                                ),
                                            ),
                                        ),
                                    ),
                                ],
                            },
                        },
                    },
                },
                validity: AllValid,
                stats_set: ArrayStats {
                    inner: RwLock {
                        data: StatsSet {
                            values: [],
                        },
                    },
                },
            },
        ],
        stats_set: ArrayStats {
            inner: RwLock {
                data: StatsSet {
                    values: [],
                },
            },
        },
    },
    projection_expr: None,
    filter_expr: None,
    compressor_strategy: Compact,
}

Summary

  • Target: file_io
  • Crash File: crash-453754fc6ac9bc511801e591e7f22d3799a70322
  • Branch: $BRANCH
  • Commit: $COMMIT
  • Crash Artifact: $ARTIFACT_URL

Reproduction

  1. Download the crash artifact:

    • Direct download: $ARTIFACT_URL
    • Or find $ARTIFACT_NAME at: $WORKFLOW_RUN
    • Extract the zip file
  2. Reproduce locally:

# The artifact contains file_io/crash-453754fc6ac9bc511801e591e7f22d3799a70322
cargo +nightly fuzz run --sanitizer=none file_io file_io/crash-453754fc6ac9bc511801e591e7f22d3799a70322
  1. Get full backtrace:
RUST_BACKTRACE=full cargo +nightly fuzz run --sanitizer=none file_io file_io/crash-453754fc6ac9bc511801e591e7f22d3799a70322

Auto-created by fuzzing workflow with Claude analysis

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug issuefuzzerIssues detected by the fuzzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions