The zstd blob decompression code assumed ZSTD_getFrameContentSize() always returns the decompressed size, which holds for the journal and coredump blobs systemd compresses itself with the one-shot ZSTD_compress(). Frames produced by the streaming API, however, don't record the decompressed size in their header, so ZSTD_getFrameContentSize() returns ZSTD_CONTENTSIZE_UNKNOWN. Per the zstd documentation this is not an error, but decompress_blob_zstd() and decompress_startswith_zstd() bailed out with -EBADMSG regardless. This broke kexec of kernel images compressed with 'zstd' (e.g. zstd -22), whose ZBOOT payload is decompressed via decompress_blob(). Treat only ZSTD_CONTENTSIZE_ERROR as fatal and, when the size is unknown, grow the output buffer as we stream the frame out instead of relying on the recorded size. Add a regression test that feeds a streaming-compressed (hence unknown-size) zstd frame through decompress_blob() and decompress_startswith().
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
