[Bug 267082] sys/geom/uzip/g_uzip_zstd.c: guz_zstd_decompress error when mounting

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 15 Oct 2022 14:20:49 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267082

            Bug ID: 267082
           Summary: sys/geom/uzip/g_uzip_zstd.c: guz_zstd_decompress error
                    when mounting
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: probono@puredarwin.org

When trying to mount *some* zstandard-compressed uzip files in 14.0-CURRENT, we
get a kernel panic:

mdconfig -a -t vnode-o readonly -f /boot/rootfs.uzip
(...)
panic: guz_zstd_decompress: Expected 262144 bytes, got 163840
(...)
KDB: stack backtrace:
(...)

Adding a file with just some random data before making the uzip image can
*sometimes* "fix" this:
dd if=/dev/random of="${uzip}"/random.data bs=1M count=2

References:
* https://github.com/helloSystem/ISO/issues/389
* https://github.com/freebsd/freebsd-src/blob/main/sys/geom/uzip/g_uzip_zstd.c

-- 
You are receiving this mail because:
You are the assignee for the bug.