SHA256
1
0
forked from pool/libnbd

43 Commits

Author SHA256 Message Date
6fa7c6c570 - bsc#1253059 - libnbd: Unsanitized hostnames in nbd+ssh URIs allow
remote execution
  uri-Sanitize-user-provided-hostnames.patch
2025-11-20 11:36:02 -07:00
17ee696f58 Accepting request 1277278 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1277278
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=19
2025-05-14 15:01:29 +00:00
6e28c3a3e1 - Update to version 1.22.2
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=39
2025-05-14 03:48:50 +00:00
7fbfba6fd8 Accepting request 1208903 from Virtualization
Updated libnbd package for Factory. A missing 'jsc' number was added
to an old changelog entry in order to submit the same package to
Factory, SLE15-SP7:GA, and SLFO:Main.

OBS-URL: https://build.opensuse.org/request/show/1208903
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=18
2024-10-20 08:04:34 +00:00
35b399270b - Update to version 1.20.3, jsc#PED-8910
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=37
2024-10-18 17:14:10 +00:00
2f540ab07e Accepting request 1191749 from Virtualization
- Update to version 1.20.2:
  * CVE-2024-7383 (bsc#1228872)

OBS-URL: https://build.opensuse.org/request/show/1191749
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=17
2024-08-06 07:08:02 +00:00
292474e6b5 Accepting request 1168944 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1168944
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=16
2024-04-19 17:14:34 +00:00
c1b29b222e Accepting request 1168942 from home:jfehlig:branches:Virtualization
- Update to version 1.18.4:
  * Version 1.18.4.
  * tests/connect-uri: Remove -DPIDFILE, generate it implicitly
  * rust: Make the struct Cookie internal field fully public
  * interop/block-status-64.c: Fix skip path under valgrind
  * Revert "valgrind: Add suppression for liblzma bug"
  * ocaml: Add ocamlfind -package to ocamldoc invocation
  * info/can.c: Assert that 'can' variable is set
  * info: Fix error message
  * info: Add note that --can/--is/--has are synonyms
  * info: Handle failure of call to file
  * fuzzing: Add a comment that the libfuzzer test is unmaintained
  * Version 1.18.3.
  * tests/opt-info.c: Free string returned by nbd_get_export_name
  * valgrind: Add suppression for liblzma bug
  * info: Try harder to report contents from nbd-server
  * copy: Add test for server without meta context support
  * api: Fix nbd_can_meta_context for server that lacks meta contexts
  * copy, info: Treat can_meta_context failures as unsupported
  * configure: Copy bash-completions test from nbdkit
  * podwrapper: Ignore check on older versions of Perl
  * podwrapper: Allow = (POD directive) followed by bare URL
  * podwrapper: Check for bare URLs and suggest replacement with L<> links
  * podwrapper: Move long lines and cross-reference checks earlier
  * tests: Missed another C test which didn't use NBDKIT
  * tests: Use $NBDKIT instead of plain 'nbdkit'
  * tests: Use 'source ./function.sh' consistently in this directory
  * ocaml/tests: Add replacement for Bytes.set_int64_be
  * ocaml/tests: Add explicit dependency on ocaml_test_config.cm{o,x}
  * build: Define the minimum required version of OCaml as 4.05

OBS-URL: https://build.opensuse.org/request/show/1168942
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=33
2024-04-18 21:09:23 +00:00
1f8f2598f9 Accepting request 1133223 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1133223
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=15
2023-12-15 20:48:41 +00:00
4bee7820cf Accepting request 1133018 from home:olh:branches:Virtualization
- Use ocaml-rpm-macros to track OCaml ABI

OBS-URL: https://build.opensuse.org/request/show/1133018
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=31
2023-12-15 00:10:14 +00:00
5fa83b5ca0 Accepting request 1125731 from Virtualization
- Fix assertion in ext-mode BLOCK_STATUS, CVE-2023-5871
  4451e5b6-CVE-2023-5871.patch
  bsc#1216769

OBS-URL: https://build.opensuse.org/request/show/1125731
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=14
2023-11-14 20:42:25 +00:00
1629758000 - Fix assertion in ext-mode BLOCK_STATUS, CVE-2023-5871
4451e5b6-CVE-2023-5871.patch
  bsc#1216769

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=29
2023-11-13 21:16:52 +00:00
db83d7108f Accepting request 1121701 from Virtualization
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1121701
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=13
2023-11-01 21:11:03 +00:00
ff827c471e update to libnbd 1.18.1
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=27
2023-10-25 19:34:30 +00:00
b9e034849b Accepting request 1114449 from Virtualization
- Update to version 1.18.0:
  * CVE-2023-5215 (bsc#1215799)
  * docs: Add link to nbd_get_size announcement in release notes
  * docs: Add URL to list post on nbd_get_size security
  * docs: Update release notes for nbd_get_size backport to 1.16.5
  * docs: Finalize release notes for release tomorrow
  * dump: Add more examples of running subprocesses from nbddump
  * info: Tolerate missing size
  * block_status: Fix assertion on bad 64-bit block status reply
  * block_status: Fix assertion with large server size
  * api: Sanitize sizes larger than INT64_MAX

OBS-URL: https://build.opensuse.org/request/show/1114449
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=12
2023-10-01 19:22:21 +00:00
3e5e77f3eb small changelog adjustment
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=25
2023-09-29 20:02:58 +00:00
308e530bfd Update to libnbd 1.18.0
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=24
2023-09-29 17:39:43 +00:00
866cbccbed Accepting request 1074037 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1074037
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=11
2023-03-24 14:21:24 +00:00
9376b896a5 Accepting request 1074006 from home:marxin:branches:Virtualization
- Enable LTO as it works fine.

OBS-URL: https://build.opensuse.org/request/show/1074006
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=22
2023-03-23 22:01:58 +00:00
600097a89e Accepting request 1011047 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/1011047
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=10
2022-10-15 14:38:08 +00:00
881fba574d Accepting request 1011044 from home:jfehlig:branches:Virtualization
- Update to version 1.14.1:
  * Version 1.14.1.
  * copy/copy-file-to-qcow2-compressed.sh: Alternate test for compressed clusters
  * ci: Expire artifacts after 1 week
  * sh: Add workaround for macOS SIP DYLD_* environment sanitiser
  * info: Tone down the colours in nbdinfo normal output
  * tests/make-pki.sh: Use Subject Alternative Name for server certificate
  * info: Improve error message when the export may be unknown to the server
  * info: Add limited colourized output
  * dump: Move ANSI colours to separate library under common/include
  * Version 1.14.0.
  * docs: Finalize release notes for 1.14
  * Version 1.13.9.
  * build: Document gmake instead of make on *BSD, macOS
  * build: Use GNUTLS_CFLAGS when checking for <gnutls/socket.h>
  * build: Remove use of $^
  * copy: Skip compressed qcow2 test on older qemu-nbd
  * interop: Skip interop-qemu-nbd-tls-psk if qemu-nbd doesn't support PSK
  * tests: Check nbdkit supports --tls-verify-peer before using
  * docs: Document signal handling
  * generator: Set SO_NOSIGPIPE on sockets
  * lib/crypto: Use GNUTLS_NO_SIGNAL if available
  * docs: Add outline release notes for libnbd 1.14
  * lib/crypto.c: Ignore TLS premature termination after write shutdown
  * lib/crypto.c: Check for <gnutls/socket.h> before including
  * Version 1.13.8.
  * generator: Add README.state-machine.md to EXTRA_DIST
  * generator: Fix reentry to REPLY.START when recv returns EAGAIN
  * generator: Move state machine documentation to a README file
  * tests: Avoid bash namerefs, for RHEL 7

OBS-URL: https://build.opensuse.org/request/show/1011044
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=20
2022-10-14 23:02:20 +00:00
204847235e Accepting request 988220 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/988220
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=9
2022-07-12 09:12:22 +00:00
1687673974 Accepting request 988218 from home:jfehlig:branches:Virtualization
- Update to version 1.12.4:
  * python: Correctly use PyGILState
  * olang: aio_buffer.go: Explicit panic() on invalid usage
  * python: Enhance tests of nbd.Buffer
  * python: Plug uninit leak in nbd.Buffer.to_bytearray
  * python: Avoid memleak on (unlikely) module failure
  * python: Accept buffers in nbd.Buffer.from_bytearray()
- Enable building python module and utilities

OBS-URL: https://build.opensuse.org/request/show/988218
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=18
2022-07-11 01:08:07 +00:00
5c041faea8 Accepting request 980135 from Virtualization
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/980135
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=8
2022-06-01 15:34:37 +00:00
24b95cd094 Accepting request 978761 from Virtualization
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/978761
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=7
2022-05-24 18:31:20 +00:00
435c7e5ef2 - Adjust _service file to coincide with recent manual update to
version 1.12.2

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=15
2022-05-24 16:33:20 +00:00
f863720517 Update to version 1.12.2
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=14
2022-05-16 17:02:13 +00:00
ca182658fe - Update to version 1.12.2:
* Version 1.12.2.
  * Fix for CVE-2022-0485 Silent data corruption when using
    nbdcopy(1).
  * New APIs
    get_pread_initialize
    set_pread_initialize
      Control whether libnbd clears the pread buffer to avoid
      leaking memory contents if the client does not properly
      handle errors. These were added as part of the fix for
      CVE-2022-0485 (Eric Blake).
    get_request_block_size
    set_request_block_size
      Control whether libnbd requests block size constraints from
      the server during negotiation (Eric Blake).
  * Error messages about incorrect URIs in nbd_connect_uri(3) have
    been improved to make common mistakes clearer for the user.
  * New syntax: nbdinfo [ CMD ... ] allowing you to query the
    properties of an NBD server directly.
  * nbdcopy(1) new --queue-size option to control the maximum
    size of the internal buffer (Nir Soffer).
  * nbdcopy(1) now names the source and destination handles to
    make it easier to understand debug output.
  * New OCaml NBD.with_handle helper which ensures that NBD.close
    is always called even if the inner code throws an exception.
  * The OCaml bindings now consistently use the correct types for
    buffer sizes everywhere (Laszlo Ersek).
  * Several improvements and fixes to the golang bindings and
    tests. The golang bindings have been relicensed to LGPLv2+
    like the rest of the library and are now published as a golang

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=13
2022-05-16 17:01:42 +00:00
33411e32cd - Enable building the ocaml bindings for libnbd.
virt-v2v has added a dependency on ocaml bindings from libnbd 
  beginning with virt-v2v version 2.0.0.
  libnbd.spec

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=12
2022-05-13 15:22:33 +00:00
cbfd0d516f Accepting request 952773 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/952773
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=6
2022-02-09 19:39:27 +00:00
d6ffee710e Accepting request 952771 from home:jfehlig:branches:Virtualization
- Update to version 1.10.4:
  * Version 1.10.4.
  * copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails (bsc#1195636)
  * copy: Pass in dummy variable rather than &errno to callback
  * docs: Clarify how callbacks should handle errors
  * ocaml: tests: Fix error handling
  * python: tests: Fix error handling
  * ocaml/helpers.c: Rearrange Assert_failure check
  * golang: tests: Fix error handling
  * docs: Fix typo in callback docs
  * ocaml: Update comment

OBS-URL: https://build.opensuse.org/request/show/952771
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=11
2022-02-08 17:30:19 +00:00
0f2e4f9a83 Accepting request 914305 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/914305
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=5
2021-08-26 21:15:06 +00:00
f69b940544 Accepting request 914303 from home:jfehlig:branches:Virtualization
- Update to version 1.9.3:
  * Version 1.9.3.
  * maint: Modernize configure.ac to silence autoreconf warnings
  * maint: Update to latest ax_pthread.m4
  * copy: Avoid potential divide by zero when source size is zero
  * copy: Test corner case of copying from zero-sized source
  * copy: Fix progress bar
  * Update CI files once more
  * ci: Allow failure when building fedora rawhide container
  * ci: Consolidate refresh scripts
  * macOS: Simple cloexec/nonblock fix
  * info: Require can_cache for info-can.sh
  * CI: Add testing on Alpine
  * Update CI files
  * macOS: Do not use --version_script
  * One more VSOCK include fix
  * m4: Remove *~ on make clean
  * ci: Rework the build script to run check-valgrind properly
  * fuse: move check-valgrind out from condition
  * qemu-storage-daemon 5.2.0 is still broken
  * Version 1.9.2.
  * python: Add missing test file to EXTRA_DIST
  * build: Warn about large stack frames
  * configure: Add a macro to test if compiler -W warning flags work
  * lib/uri.c: nbd_get_uri: Do not translate port name into service
  * python: Implement nbd.aio_connect for AF_UNIX
  * bash: Generate completion files during build
  * info: Add percentage after field in --map --totals
  * info: Add --can|--is options to test for NBD flags
  * info: Add --map --totals sub-mode to display summary of map

OBS-URL: https://build.opensuse.org/request/show/914303
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=10
2021-08-25 23:12:56 +00:00
a9b26b2484 Accepting request 903567 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/903567
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=4
2021-07-02 11:27:13 +00:00
b2c5e43354 Accepting request 903565 from home:jfehlig:branches:Virtualization
- Update to version 1.9.1:
  * Version 1.9.1.
  * ci: Update build files
  * ci: Also perform `brew upgrade` on MacOS
  * ci: Only run `make check` on Linux
  * ci: Skip some broken tests/distro combinations
  * ci: Rename build_script.sh to just build.sh
  * ci: Add support for test skipping
  * ci: Some build script fixes
  * ci: Fix run commands in README
  * ci: Add support for FreeBSD-13.0
  * ci: Remove debian-10-clang build
  * ci: Remove cross-compilation targets
  * ci: Change docker driver and archive logs
  * tests: Rename version to get-version
  * tests: Do not use magic parameter for some nbdkit plugins
  * tests: Require cap_sys_admin where root is required
  * tests: Fix port randomisation
  * tests: Enhance fuse probing
  * tests: Clean up qemu-nbd detection
  * tests: Fix hexdump probing
  * interop: Do not test against broken qemu-storage-daemon
  * fuse: Only support defined fallocate modes
  * Include sys/vsock.h if linux/vm_sockets.h is not available
  * info: Avoid ambiguous 'allocated' terminology in --map
  * run: Unset DEBUGINFOD_URLS
  * ci/cirrus: Update system before doing anything else

OBS-URL: https://build.opensuse.org/request/show/903565
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=9
2021-07-01 17:31:51 +00:00
c904431b45 Accepting request 898906 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/898906
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=3
2021-06-10 22:18:40 +00:00
9255784ef4 Accepting request 898902 from home:jfehlig:branches:Virtualization
- Update to version 1.8.0:
  * Version 1.8.0.
  * docs: Get release notes ready for a release today
  * copy/copy-file-to-qcow2.sh: Skip this test for old qemu-nbd
  * docs: Put links to release notes in a separate section
  * docs: Add preliminary release notes for libnbd 1.8
  * common/utils: Add test-vector.c (unit test for vectors) from nbdkit
  * copy, fuse, info: Synchronize --help output with manual
  * generator: Update copyright year in generated files.
  * Update README
  * Version 1.7.12.

OBS-URL: https://build.opensuse.org/request/show/898902
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=7
2021-06-09 22:25:00 +00:00
b297c46c8f Accepting request 885442 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/885442
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=2
2021-04-16 22:01:25 +00:00
78b0b2c168 Accepting request 885438 from home:susnux:branches:Virtualization
As requested: Bring back _service

OBS-URL: https://build.opensuse.org/request/show/885438
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=5
2021-04-14 16:36:25 +00:00
Richard Brown
99fe251b8e Accepting request 879260 from Virtualization
New package nbdkit for Factory. This package is required for the
Containerized Data Importer (CDI), which will be submitted in the
near future.

OBS-URL: https://build.opensuse.org/request/show/879260
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libnbd?expand=0&rev=1
2021-03-30 19:15:13 +00:00
5cd3cdcc60 Accepting request 878979 from home:jengelh:branches:Virtualization
factory new package, might as well use contemporary macros/syntaxes

OBS-URL: https://build.opensuse.org/request/show/878979
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=3
2021-03-15 01:31:59 +00:00
f3b58bb72c Accepting request 875242 from home:jfehlig:branches:Virtualization
- spec: Only enable system nbd interop tests if
  suse_version >= 1550

OBS-URL: https://build.opensuse.org/request/show/875242
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=2
2021-02-25 23:50:55 +00:00
8951fef0cd Accepting request 867557 from home:jfehlig:branches:Virtualization
Initial packaging of libnbd

OBS-URL: https://build.opensuse.org/request/show/867557
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libnbd?expand=0&rev=1
2021-01-28 18:12:48 +00:00
8 changed files with 204 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="manual">
<param name="filename">libnbd</param>
<param name="revision">v1.20.2</param>
<param name="revision">v1.22.2</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://gitlab.com/nbdkit/libnbd.git</param>

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://gitlab.com/nbdkit/libnbd.git</param>
<param name="changesrevision">30963227b281adab0017317e3eb17f4c3088f1fc</param></service></servicedata>
<param name="changesrevision">5f55a26f3a776c11049a27154b1f2b59b8c335da</param></service></servicedata>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c5d129ec5cbb189ca454218bf2283d2de684788300a0485f7f4378eaac95db58
size 440557

Binary file not shown.

BIN
libnbd-1.22.2.tar.bz2 LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,132 @@
-------------------------------------------------------------------
Wed Nov 5 11:03:52 MST 2025 - carnold@suse.com
- bsc#1253059 - libnbd: Unsanitized hostnames in nbd+ssh URIs allow
remote execution
uri-Sanitize-user-provided-hostnames.patch
-------------------------------------------------------------------
Tue May 06 22:48:02 UTC 2025 - jfehlig@suse.com
- Update to version 1.22.2:
* Version 1.22.2.
* copy: Test --allocated + --destination-is-zero options together
* copy: Test --destination-is-zero option
* copy: Test --allocated option more thoroughly
* copy: Add a test of the --flush option
* copy: Remove output file in a few tests
* build: Print rustc version in ./configure output
* rust: Use nbd.is_uri in examples
* ci: Skip go on FreeBSD 14
* ci: Update to latest
* copy: Fix file allocation when using --allocated
* copy: Fix file_sync_zero when allocate == true
* copy: Consider options when zeroing in synch mode
* copy: Hard error if sync_file_range fails
* info/info-uri-nbds.sh: Fix test if compiled without GnuTLS
* copy: Set the total size in bytes copied
* copy: progress: Add a comment about size and pipes
* info: Use magenta for export headings, instead of black
* Version 1.22.1.
* ocaml/{examples,tests}: Don't try to run OCAMLFIND if --disable-ocaml
* docs/libnbd-release-notes-1.22.pod: Set release date
* Version 1.22.0.
* ci: Update FreeBSD builds
* copy: Include pthread.h
* docs: Small revisions to the release notes
* golang: Replace () with correct argument decl, for GCC 15
* docs: Add outline release notes for libnbd 1.22
* ci: Update to latest
* dump: Add a test of --length and --offset
* dump: Add --offset for further limiting the dump
* dump: Document --length
* examples: Add simple program to benchmark connections
* Version 1.21.6.
* build: Use 'tar ztf' instead of 'zcat | tar'
* Revert "ci: Skip maintainer-check-extra-dist test on macOS"
* ci: Skip maintainer-check-extra-dist test on macOS
* ci: Install bash (from homebrew) in the CI environment
* configure: Check that bash is sufficiently new
* ci: Dump out failed log files when the tests fail
* golang, rust: Use env bash for FreeBSD
* python: Skip Python tests on macOS
* tests/newstyle-limited.c: Check truncate is GNU truncate before using
* ocaml/tests/test_220_opt_list.ml: Use correct nbdkit binary
* ocaml/tests/test_580_aio_connect.ml: Skip this test on macOS
* build: Test for GnuTLS certtool on macOS
* build: Use GNU alternatives on macOS and FreeBSD
* copy/copy-file-to-nbd.sh: Remove test for 'truncate'
* lib/test-fork-safe-execvpe.sh: Skip this test on macOS
* ci/build.sh: Set os_id on macOS which lacks /etc/os-release
* ci: Don't skip tests on non-Linux
* Version 1.21.5.
* interop: Skip nbd-server test on Alpine
* ci: Update CI files
* vsock: Document limitations and reserved vsock port numbers
* rust: Parse perlpod L<https://...> (external links) to rust markup
* generator: connect_uri: Document differences with qemu parsing
* podwrapper: Add some simple checks for cross-references within manual pages.
* docs/libnbd-release-notes-1.10.pod: Remove broken link to "nbd_connect(3)"
* docs/nbd_create.pod: Cross-reference nbd_shutdown(3)
* Version 1.21.4.
* docs: Use "oldstyle servers" in preference to "older servers"
* docs: Mention newstyle and oldstyle servers in main docs
* docs: Mention nbd_is_uri under "Connecting to an NBD URI" in main docs
* README: Fix bold markdown
* README: Mention 'make install DESTDIR=...'
* README: Mention the ./run script
* lib: Add nbd_get_subprocess_pid to return h->pid
* docs/libnbd-security.pod: Assign CVE-2024-7383
* Version 1.21.3.
* build: Prefer "for developers" in ./configure --help output
* build: Fix ./configure --help output for --enable-python-code-style
* copy: Fix URI detection
* lib: Add new nbd_is_uri API
* tests/requires.c: Don't fail to compile if NBDKIT is not defined
* Version 1.21.2.
* lib: Implement nbd+ssh:// and nbds+ssh:// URIs
* tests/connect-uri.c: Replace -DREQUIRES_NBDKIT_TLS_VERIFY_PEER=1
* lib/uri.c: Change socket required boolean into an enum
* generator/states-newstyle.c: Don't sign extend escaped chars
* rust: Add os-ext feature to get mio::unix
* generator/states-newstyle.c: Quote untrusted string from the server
* generator: Restore assignment to local 'err'
* .gitignore: Remove unused line
* lib: Don't overwrite error in nbd_opt_{go,info}
* generator: Print full error in handle_reply_error
* ci: Drop Alma Linux 8
* lib/crypto.c: Check <gnutls/socket.h> works before including it
* lib/uri.c: Append tls-hostname and tls-verify-peer when getting URI
* Version 1.21.1.
* docs: security: Add link to TLS server certificate checking announcement
* lib/uri.c: Allow tls-hostname to be overridden in URIs
* lib/uri.c: Allow tls-verify-peer to be overridden in URIs
* lib/crypto.c: Add API functions to get/set TLS hostname
-------------------------------------------------------------------
Fri Oct 18 16:42:38 UTC 2024 - jfehlig@suse.com
- Update to version 1.20.3:
* Version 1.20.3.
* interop: Skip nbd-server test on Alpine
* ci: Update CI files
* rust: Parse perlpod L<https://...> (external links) to rust markup
* podwrapper: Add some simple checks for cross-references within manual pages.
* docs/libnbd-release-notes-1.10.pod: Remove broken link to "nbd_connect(3)"
* docs/nbd_create.pod: Cross-reference nbd_shutdown(3)
* docs: Use "oldstyle servers" in preference to "older servers"
* docs: Mention newstyle and oldstyle servers in main docs
* README: Fix bold markdown
* README: Mention 'make install DESTDIR=...'
* README: Mention the ./run script
* build: Prefer "for developers" in ./configure --help output
* build: Fix ./configure --help output for --enable-python-code-style
* .gitignore: Remove unused line
* ci: Drop Alma Linux 8
* lib/crypto.c: Check <gnutls/socket.h> works before including it
* docs/libnbd-security.pod: Assign CVE-2024-7383
* jsc#PED-8910
-------------------------------------------------------------------
Mon Aug 05 16:08:37 UTC 2024 - jfehlig@suse.com
@@ -387,6 +516,7 @@ Fri Jul 8 17:59:24 UTC 2022 - James Fehlig <jfehlig@suse.com>
* python: Plug uninit leak in nbd.Buffer.to_bytearray
* python: Avoid memleak on (unlikely) module failure
* python: Accept buffers in nbd.Buffer.from_bytearray()
* jsc#ECO-3633
- Enable building python module and utilities
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package libnbd
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,12 +19,13 @@
%define sover 0
Name: libnbd
Version: 1.20.2
Version: 1.22.2
Release: 0
Summary: NBD client library in userspace
License: LGPL-2.1-or-later
URL: https://gitlab.com/nbdkit/libnbd
Source0: %{name}-%{version}.tar.bz2
Patch1: uri-Sanitize-user-provided-hostnames.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes

View File

@@ -0,0 +1,66 @@
Subject: uri: Sanitize user-provided hostnames
From: Eric Blake eblake@redhat.com Mon Oct 13 10:01:21 2025 -0500
Date: Tue Oct 21 15:30:19 2025 -0500:
Git: f461fe64d21fe8a6d32b56ccb50d06489d2e2698
Dan Berrangé ran a free trial of zeropath (http://zeropath.com/) AI
analysis on libnbd, and it highlighted the following:
"When using nbd+ssh:// URIs the library constructs an argv array for
ssh from parsed URI parts (server, port, user, unix socket, nbd-port)
and execs it. The server component is used directly as an ssh
argument; if it begins with '-' an attacker can inject ssh options
(e.g. -oProxyCommand=...) that cause ssh to run local commands. There
is no protection (such as rejecting leading '-' in server or inserting
a '--' to stop option parsing), so an attacker who can supply the URI
can cause local command execution in the client process."
eg with this.... "nbdinfo nbd+ssh://-oProxyCommand=rm%20run.in"
you'll get a failure to start the NBD connection, but it none the less
deletes the file 'run.in' in the local working directory
The RFCs are vague enough that it is not immediately obvious whether
there is any possibility of a valid hostname with a leading - (see
https://www.netmeister.org/blog/hostnames.html). Still, it is better
to pass the user's string on to ssh's determination of a valid
hostname (which does appear to reject leading -) rather than trying to
teach libnbd what patterns to allow, and thereby avoid risking any
pattern written in libnbd accidentally being too restrictive. Do this
by using "--" to end ssh options before the hostname, but that in turn
must come after any use of -oUser=. With this in place, we now get a
sane error rather than spawning a calculator with:
$ nbdinfo nbd+ssh://-oProxyCommand=gnome-calculator
hostname contains invalid characters
/home/eblake/libnbd/info/.libs/nbdinfo: nbd_connect_uri: recv: server disconnected unexpectedly
See also Libvirt commit e4cb8500 (Aug 2017), which in turn was
inspired by GIT security flaws
(http://blog.recurity-labs.com/2017-08-10/scm-vulns). We have put out
a request to Red Hat security on whether this warrants a CVE in
libnbd; however, as the problem was easy to identify using only free
AI resources, and the problem itself is relatively low priority (to
exploit it, an attacker has to convince an admin to run a program that
will use libnbd on an untrusted URI), so we are publishing this now
rather than waiting for any embargo. If a CVE is assigned, it will be
announced to the mailing list in a followup post.
Signed-off-by: Eric Blake <eblake@redhat.com>
CC: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit fffd87a3ba216cf2f9c212e5db96b13b98985edf)
Conflicts:
lib/uri.c - no username override, backport looks different
Signed-off-by: Eric Blake <eblake@redhat.com>
--- a/lib/uri.c
+++ b/lib/uri.c
@@ -446,7 +446,7 @@ nbd_unlocked_aio_connect_uri (struct nbd
case ssh: { /* SSH */
char port_str[32];
const char *ssh_command[] = {
- "ssh", "-p", port_str, uri->server,
+ "ssh", "-p", port_str, "--", uri->server,
"nc",
NULL, /* [5] "-U" or "localhost" */
NULL, /* [6] socket or "10809" */