* [PATCH] nbd/server: Reject tls-authz without tls-creds
@ 2026-12-01 21:59 Eric Blake
2026-12-02 8:52 ` Daniel P. Berrangé
0 siblings, 1 reply; 2+ messages in thread
From: Eric Blake @ 2026-12-01 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Kevin Wolf, Hanna Reitz, Vladimir Sementsov-Ogievskiy,
open list:Block layer core
qemu-nbd already rejects --tls-authz without --tls-creds on the
command line. However, the QMP nbd-server-start command was silent
when requesting tls-authz without tls-creds, even though
authentication is only possible when coupled with a TLS handshake.
Although this is only a configuration bug on the part of the user, it
is worth being noisy about the inconsistent request.
Reported-by: Kathryn Walker
Fixes: https://gitlab.com/qemu-project/qemu/-/work-items/5028
Signed-off-by: Eric Blake <eblake@redhat.com>
---
blockdev-nbd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/blockdev-nbd.c b/blockdev-nbd.c
index 696474aea93..e92a76f471e 100644
--- a/blockdev-nbd.c
+++ b/blockdev-nbd.c
@@ -171,6 +171,11 @@ void nbd_server_start(SocketAddress *addr, uint32_t handshake_max_secs,
return;
}
+ if (tls_authz && !tls_creds) {
+ error_setg(errp, "tls-authz only makes sense with tls-creds");
+ return;
+ }
+
nbd_server = g_new0(NBDServerData, 1);
nbd_server->max_connections = max_connections;
nbd_server->handshake_max_secs = handshake_max_secs;
--
2.56.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nbd/server: Reject tls-authz without tls-creds
2026-12-01 21:59 [PATCH] nbd/server: Reject tls-authz without tls-creds Eric Blake
@ 2026-12-02 8:52 ` Daniel P. Berrangé
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrangé @ 2026-12-02 8:52 UTC (permalink / raw)
To: Eric Blake
Cc: qemu-devel, Kevin Wolf, Hanna Reitz, Vladimir Sementsov-Ogievskiy,
open list:Block layer core
On Tue, Dec 01, 2026 at 03:59:59PM -0600, Eric Blake wrote:
> qemu-nbd already rejects --tls-authz without --tls-creds on the
> command line. However, the QMP nbd-server-start command was silent
> when requesting tls-authz without tls-creds, even though
> authentication is only possible when coupled with a TLS handshake.
> Although this is only a configuration bug on the part of the user, it
> is worth being noisy about the inconsistent request.
>
> Reported-by: Kathryn Walker
> Fixes: https://gitlab.com/qemu-project/qemu/-/work-items/5028
> Signed-off-by: Eric Blake <eblake@redhat.com>
> ---
> blockdev-nbd.c | 5 +++++
> 1 file changed, 5 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-02 8:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 21:59 [PATCH] nbd/server: Reject tls-authz without tls-creds Eric Blake
2026-12-02 8:52 ` Daniel P. Berrangé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.