ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1025
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • Fully Compatible
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      The vendored zstd (1.5.5) computes a prefetch address in ZSTD_prefetchMatch (lib/decompress/zstd_decompress_block.c) as dictEnd + prefetchPos - offset. On corrupt input with no dictionary, dictEnd is NULL, which UBSan reports as "applying non-zero offset to null pointer". The address is only passed to PREFETCH_L1 and never dereferenced. Upstream fixed this in zstd 1.5.6 with ZSTD_wrappedPtrAdd/ZSTD_wrappedPtrSub.

      The libfuzzer variant hits this within seconds in protocol_fuzzer (see linked BF).

      Scope of Work

      • etc/ubsan.denylist — add a [pointer-overflow] section for src/third_party/zstandard/zstd/lib/decompress/zstd_decompress_block.c, with a note to remove it once zstd is upgraded to 1.5.6+.

      Follow-up

      Upgrading the vendored zstd to 1.5.6+ is the proper long-term fix and would let this entry be removed.

            Assignee:
            Sergei Bazhenov
            Reporter:
            Sergei Bazhenov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: