https://nostarttls.secvuln.info/ pointed out a common implementation flaw in various SMTP and IMAP servers with regards to improperly caching plaintext state across the STARTTLS encryption boundary. It turns out that nbdkit has the same vulnerability in regards to the NBD protocol: an attacker is able to inject a plaintext NBD_OPT_STRUCTURED_REPLY before proxying everything else a client sends to the server; if the server then acts on that plaintext request (as nbdkit did before this patch), then the server ends up sending structured replies to at least NBD_CMD_READ, even though the client was not expecting them. The NBD spec has been recently tightened to declare the nbdkit behavior to be a security hole. Depending on how the client handles unexpected structured replies, the attacker can use this to form a denial of service attack on the client, distinct from a trivial protocol downgrade attack. Please refer to the upstream announcement (comment#10) for additional details.
Created nbdkit tracking bugs for this issue: Affects: fedora-all [bug 1994928]
This bug was introduced in nbdkit v1.11.8 (March 2019) with the first implementation of NBD Structured Replies: https://github.com/libguestfs/nbdkit/commit/eaa4c6e9a
Upstream fix is: https://listman.redhat.com/archives/libguestfs/2021-August/msg00077.html There's no upstream commit yet, I'll add a comment here when the final patch has been pushed upstream.
The fixes are: https://gitlab.com/nbdkit/nbdkit/-/commit/09a13dafb7bb3a38ab52eb5501cba786365ba7fd https://gitlab.com/nbdkit/nbdkit/-/commit/6c5faac6a37077cf2366388a80862bb00616d0d8
Upstream announcement: https://listman.redhat.com/archives/libguestfs/2021-August/msg00083.html
This issue has been addressed in the following products: Advanced Virtualization for RHEL 8.5.0.Z Via RHSA-2022:0397 https://access.redhat.com/errata/RHSA-2022:0397
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2021-3716
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2022:1759 https://access.redhat.com/errata/RHSA-2022:1759