These are the release notes for libnbd stable release 1.20. This describes the major changes since 1.18.
libnbd 1.20.0 was released on 5April2024.
Security
Fuzzing found and Eric Blake fixed an assertion which could be triggered by connecting to a malicious
server. This was assigned CVE-2023-5871 (low severity). See the announcement here:
https://lists.libguestfs.org/archives/list/guestfs@lists.libguestfs.org/thread/5CRC7LRTN35WPZZ4BT6NAMH4JGMF47IK/
If you find a security issue, please read SECURITY in the source (online here:
https://gitlab.com/nbdkit/libnbd/blob/master/SECURITY). To find out about previous security issues in
libnbd, see libnbd-security(3).
EnhancementstoexistingAPIsnbd_connect_uri(3) now correctly supports case insensitive URIs.
Protocol
Improve interop with nbd-server(1) which supports structured replies but not meta context (Eric Blake).
Toolsnbdinfo(1) adds support for --isnt, --cannot, --hasnt, which lets you check if features of an NBD server
are not supported.
nbdinfo(1) adds support for --uri which just prints the canonical URI of the server.
nbdinfo(1) now prints human sizes for block size constraints (Eric Blake).
Languagebindings
New libnbd-rust(3) manual page added, providing an overview for writing Rust programs using libnbd.
Rust documentation has been improved by using a custom translator from our own documentation format (Perl
POD) to rustdoc.
Some Rust compiler warnings were fixed (Eric Blake).
OCaml bindings now support zero-copy in AIO pread and pwrite functions. This change is backwards
compatible with existing code. (Thanks Nicolas Ojeda Bar, Anil Madhavapeddy, Simon Cruanes).
OCaml bindings now use "Gc.finalize" (OCaml-level finalizers instead of C-level finalizers) which
improves compatibility in OCaml 5.1.1 and above (Guillaume Munch-Maccagnoni).
OCaml ≥ 4.05 is formally required and checked in ./configure. Previously we did not specify a minimum
version of OCaml, but in practice versions older than 4.05 probably didn't work.
Tests
Fuzzing approach was changed to use asynchronous commands. This improves speed of fuzzing greatly and
should find more issues.
Multiple CI fixes (Eric Blake).
Respect the user's choice of qemu-nbd, nbdkit and other binaries from (eg)
"./configure NBDKIT=/some/nbdkit". Previously we would often test against binaries found on the path
even if the user had specified other binaries to use.
Otherimprovementsandbugfixesnbdinfo(1) now gracefully disconnects from the server in error cases, improving output (Eric Blake).
"struct nbd_handle" now contains a magic value which is checked on entry to libnbd, which should identify
mistakes where programs calling libnbd pass in an incorrect pointer.
Documentation
An example was added of how to use userfaultfd to mmap an NBD-backed drive. See examples/userfault-map.c
in the libnbd sources.
Documentation of acceptable handle states in the man pages has been improved.
Buildcontrib/libnbd.m4 is a contributed configure test for libnbd (Bruno Haible).
"./configure --with-bash-completions" will now fail if the required bash-completions package is not
installed.