REDHAT-BUG-2575655: Medium severity vulnerability
A flaw was found in nbdkit's qcow2dec filter. The zstdcompressedcluster() function sets the ZSTD input buffer size to clustersize (the uncompressed cluster size) instead of compressedsize (the actual allocated buffer size). The equivalent zlib/deflate path correctly uses compressedsize. A crafted QCOW2 image with ZSTD-compressed clusters can cause a heap over-read of up to approximately 2 MB past a small compressed allocation, leading to a crash (denial of service) and potentially disclosing heap memory if the process survives.
This does not affect RHEL, which does not ship the qcow2dec filter. Fedora was affected and has been fixed upstream (commit c84da7612cff7a56d842ccfe96b2a9e19bf8fea4).
Public report: https://lists.libguestfs.org/archives/list/guestfs@lists.libguestfs.org/thread/LXZQCFZQQVSA2G47FMNQ3KJBMJBUVYJP/ Fix: https://gitlab.com/nbdkit/nbdkit/-/commit/c84da7612cff7a56d842ccfe96b2a9e19bf8fea4 Tracker: PSIRTSUPT-26022
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch c84da7612cff7a56d842ccfe96b2a9e19bf8fea4