qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/4] Misc crypto & UI patches
@ 2025-07-16 10:30 Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 1/4] ui: fix setting client_endian field defaults Daniel P. Berrangé
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-07-16 10:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Daniel P. Berrangé

The following changes since commit c079d3a31e45093286c65f8ca5350beb3a4404a9:

  Merge tag 'pull-10.1-rc0-maintainer-140725-1' of https://gitlab.com/stsquad/qemu into staging (2025-07-15 00:12:07 -0400)

are available in the Git repository at:

  https://gitlab.com/berrange/qemu tags/misc-next-pull-request

for you to fetch changes up to def71a6b12d817b95a81b622bad2ca096ed5a3ab:

  crypto: load all certificates in X509 CA file (2025-07-16 11:27:30 +0100)

----------------------------------------------------------------
* Fix endian defaults when no VNC pixel format message is set
* Add more trace events for VNC messages
* Fix checking of certificate loading
* Eliminate cert limit on loading CA certificates

----------------------------------------------------------------

Daniel P. Berrangé (2):
  ui: fix setting client_endian field defaults
  ui: add trace events for all client messages

Henry Kleynhans (1):
  crypto: load all certificates in X509 CA file

Peter Maydell (1):
  crypto/x509-utils: Check for error from gnutls_x509_crt_init()

 crypto/tlscredsx509.c | 23 +++++++++----------
 crypto/x509-utils.c   |  6 ++++-
 ui/trace-events       | 14 ++++++++++++
 ui/vnc.c              | 53 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 83 insertions(+), 13 deletions(-)

-- 
2.49.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PULL 1/4] ui: fix setting client_endian field defaults
  2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
@ 2025-07-16 10:30 ` Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 2/4] ui: add trace events for all client messages Daniel P. Berrangé
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-07-16 10:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrangé, Thomas Huth,
	Philippe Mathieu-Daudé

When a VNC client sends a "set pixel format" message, the
'client_endian' field will get initialized, however, it is
valid to omit this message if the client wants to use the
server's native pixel format. In the latter scenario nothing
is initializing the 'client_endian' field, so it remains set
to 0, matching neither G_LITTLE_ENDIAN nor G_BIG_ENDIAN. This
then results in pixel format conversion routines taking the
wrong code paths.

This problem existed before the 'client_be' flag was changed
into the 'client_endian' value, but the lack of initialization
meant it semantically defaulted to little endian, so only big
endian systems would potentially be exposed to incorrect pixel
translation.

The 'virt-viewer' / 'remote-viewer' apps always send a "set
pixel format" message so aren't exposed to any problems, but
the classical 'vncviewer' app will show the problem easily.

Fixes: 7ed96710e82c385c6cfc3d064eec7dde20f0f3fd
Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 ui/vnc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index e9c30aad62..a16be468b9 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2329,6 +2329,7 @@ static void pixel_format_message (VncState *vs) {
     char pad[3] = { 0, 0, 0 };
 
     vs->client_pf = qemu_default_pixelformat(32);
+    vs->client_endian = G_BYTE_ORDER;
 
     vnc_write_u8(vs, vs->client_pf.bits_per_pixel); /* bits-per-pixel */
     vnc_write_u8(vs, vs->client_pf.depth); /* depth */
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 2/4] ui: add trace events for all client messages
  2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 1/4] ui: fix setting client_endian field defaults Daniel P. Berrangé
@ 2025-07-16 10:30 ` Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 3/4] crypto/x509-utils: Check for error from gnutls_x509_crt_init() Daniel P. Berrangé
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-07-16 10:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrangé,
	Philippe Mathieu-Daudé

This lets us see the full flow of RFB messages received from the
client.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 ui/trace-events | 14 +++++++++++++
 ui/vnc.c        | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/ui/trace-events b/ui/trace-events
index 3da0d5e280..3eba9ca3a8 100644
--- a/ui/trace-events
+++ b/ui/trace-events
@@ -48,13 +48,27 @@ vnc_msg_server_ext_desktop_resize(void *state, void *ioc, int width, int height,
 vnc_msg_client_audio_enable(void *state, void *ioc) "VNC client msg audio enable state=%p ioc=%p"
 vnc_msg_client_audio_disable(void *state, void *ioc) "VNC client msg audio disable state=%p ioc=%p"
 vnc_msg_client_audio_format(void *state, void *ioc, int fmt, int channels, int freq) "VNC client msg audio format state=%p ioc=%p fmt=%d channels=%d freq=%d"
+vnc_msg_client_cut_text(void *state, void *ioc, int len) "VNC client msg cut text state=%p ioc=%p len=%u"
+vnc_msg_client_cut_text_ext(void *state, void *ioc, int len, int flags) "VNC client msg cut text state=%p ioc=%p len=%u flags=%u"
+vnc_msg_client_ext_key_event(void *state, void *ioc, int down, int sym, int keycode) "VNC client msg ext key event state=%p ioc=%p down=%u sym=%u keycode=%u"
+vnc_msg_client_framebuffer_update_request(void *state, void *ioc, int incremental, int x, int y, int w, int h) "VNC client msg framebuffer update request state=%p ioc=%p incremental=%u x=%u y=%u w=%u h=%u"
+vnc_msg_client_key_event(void *state, void *ioc, int down, int sym) "VNC client msg key event state=%p ioc=%p down=%u sym=%u"
+vnc_msg_client_pointer_event(void *state, void *ioc, int button_mask, int x, int y) "VNC client msg pointer event state=%p ioc=%p button_mask=%u x=%u y=%u"
 vnc_msg_client_set_desktop_size(void *state, void *ioc, int width, int height, int screens) "VNC client msg set desktop size  state=%p ioc=%p size=%dx%d screens=%d"
+vnc_msg_client_set_encodings(void *state, void *ioc, int limit) "VNC client msg set encodings state=%p ioc=%p limit=%u"
+vnc_msg_client_set_pixel_format(void *state, void *ioc, int bpp, int big_endian, int true_color) "VNC client msg set pixel format state=%p ioc=%p bpp=%u big_endian=%u true_color=%u"
+vnc_msg_client_set_pixel_format_rgb(void *state, void *ioc, int red_max, int green_max, int blue_max, int red_shift, int green_shift, int blue_shift) "VNC client msg set pixel format RGB state=%p ioc=%p red_max=%u green_max=%u blue_max=%u red_shift=%u green_shift=%u blue_shift=%u"
+vnc_msg_client_xvp(void *state, void *ioc, int version, int action) "VNC client msg XVP state=%p ioc=%p version=%u action=%u"
 vnc_client_eof(void *state, void *ioc) "VNC client EOF state=%p ioc=%p"
 vnc_client_io_error(void *state, void *ioc, const char *msg) "VNC client I/O error state=%p ioc=%p errmsg=%s"
 vnc_client_connect(void *state, void *ioc) "VNC client connect state=%p ioc=%p"
 vnc_client_disconnect_start(void *state, void *ioc) "VNC client disconnect start state=%p ioc=%p"
 vnc_client_disconnect_finish(void *state, void *ioc) "VNC client disconnect finish state=%p ioc=%p"
 vnc_client_io_wrap(void *state, void *ioc, const char *type) "VNC client I/O wrap state=%p ioc=%p type=%s"
+vnc_client_pixel_format(void *state, void *ioc, int bpp, int depth, int endian) "VNC client pixel format state=%p ioc=%p bpp=%u depth=%u endian=%u"
+vnc_client_pixel_format_red(void *state, void *ioc, int max, int bits, int shift, int mask) "VNC client pixel format red state=%p ioc=%p max=%u bits=%u shift=%u mask=%u"
+vnc_client_pixel_format_green(void *state, void *ioc, int max, int bits, int shift, int mask) "VNC client pixel format green state=%p ioc=%p max=%u bits=%u shift=%u mask=%u"
+vnc_client_pixel_format_blue(void *state, void *ioc, int max, int bits, int shift, int mask) "VNC client pixel format blue state=%p ioc=%p max=%u bits=%u shift=%u mask=%u"
 vnc_client_throttle_threshold(void *state, void *ioc, size_t oldoffset, size_t offset, int client_width, int client_height, int bytes_per_pixel, void *audio_cap) "VNC client throttle threshold state=%p ioc=%p oldoffset=%zu newoffset=%zu width=%d height=%d bpp=%d audio=%p"
 vnc_client_throttle_incremental(void *state, void *ioc, int job_update, size_t offset) "VNC client throttle incremental state=%p ioc=%p job-update=%d offset=%zu"
 vnc_client_throttle_forced(void *state, void *ioc, int job_update, size_t offset) "VNC client throttle forced state=%p ioc=%p job-update=%d offset=%zu"
diff --git a/ui/vnc.c b/ui/vnc.c
index a16be468b9..c309882ddb 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2314,6 +2314,25 @@ static void set_pixel_format(VncState *vs, int bits_per_pixel,
     vs->client_pf.bytes_per_pixel = bits_per_pixel / 8;
     vs->client_pf.depth = bits_per_pixel == 32 ? 24 : bits_per_pixel;
     vs->client_endian = big_endian_flag ? G_BIG_ENDIAN : G_LITTLE_ENDIAN;
+    trace_vnc_client_pixel_format(vs, vs->ioc,
+                                  vs->client_pf.bits_per_pixel,
+                                  vs->client_pf.depth,
+                                  vs->client_endian);
+    trace_vnc_client_pixel_format_red(vs, vs->ioc,
+                                      vs->client_pf.rmax,
+                                      vs->client_pf.rbits,
+                                      vs->client_pf.rshift,
+                                      vs->client_pf.rmask);
+    trace_vnc_client_pixel_format_green(vs, vs->ioc,
+                                        vs->client_pf.gmax,
+                                        vs->client_pf.gbits,
+                                        vs->client_pf.gshift,
+                                        vs->client_pf.gmask);
+    trace_vnc_client_pixel_format_blue(vs, vs->ioc,
+                                       vs->client_pf.bmax,
+                                       vs->client_pf.bbits,
+                                       vs->client_pf.bshift,
+                                       vs->client_pf.bmask);
 
     if (!true_color_flag) {
         send_color_map(vs);
@@ -2388,6 +2407,17 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
         if (len == 1)
             return 20;
 
+        trace_vnc_msg_client_set_pixel_format(vs, vs->ioc,
+                                              read_u8(data, 4),
+                                              read_u8(data, 6),
+                                              read_u8(data, 7));
+        trace_vnc_msg_client_set_pixel_format_rgb(vs, vs->ioc,
+                                                  read_u16(data, 8),
+                                                  read_u16(data, 10),
+                                                  read_u16(data, 12),
+                                                  read_u8(data, 14),
+                                                  read_u8(data, 15),
+                                                  read_u8(data, 16));
         set_pixel_format(vs, read_u8(data, 4),
                          read_u8(data, 6), read_u8(data, 7),
                          read_u16(data, 8), read_u16(data, 10),
@@ -2410,12 +2440,19 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
             memcpy(data + 4 + (i * 4), &val, sizeof(val));
         }
 
+        trace_vnc_msg_client_set_encodings(vs, vs->ioc, limit);
         set_encodings(vs, (int32_t *)(data + 4), limit);
         break;
     case VNC_MSG_CLIENT_FRAMEBUFFER_UPDATE_REQUEST:
         if (len == 1)
             return 10;
 
+        trace_vnc_msg_client_framebuffer_update_request(vs, vs->ioc,
+                                                        read_u8(data, 1),
+                                                        read_u16(data, 2),
+                                                        read_u16(data, 4),
+                                                        read_u16(data, 6),
+                                                        read_u16(data, 8));
         framebuffer_update_request(vs,
                                    read_u8(data, 1), read_u16(data, 2), read_u16(data, 4),
                                    read_u16(data, 6), read_u16(data, 8));
@@ -2424,12 +2461,19 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
         if (len == 1)
             return 8;
 
+        trace_vnc_msg_client_key_event(vs, vs->ioc,
+                                       read_u8(data, 1),
+                                       read_u32(data, 4));
         key_event(vs, read_u8(data, 1), read_u32(data, 4));
         break;
     case VNC_MSG_CLIENT_POINTER_EVENT:
         if (len == 1)
             return 6;
 
+        trace_vnc_msg_client_pointer_event(vs, vs->ioc,
+                                           read_u8(data, 1),
+                                           read_u16(data, 2),
+                                           read_u16(data, 4));
         pointer_event(vs, read_u8(data, 1), read_u16(data, 2), read_u16(data, 4));
         break;
     case VNC_MSG_CLIENT_CUT_TEXT:
@@ -2461,9 +2505,12 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
                 vnc_client_error(vs);
                 break;
             }
+            trace_vnc_msg_client_cut_text_ext(vs, vs->ioc,
+                                              dlen, read_u32(data, 8));
             vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12);
             break;
         }
+        trace_vnc_msg_client_cut_text(vs, vs->ioc, read_u32(data, 4));
         vnc_client_cut_text(vs, read_u32(data, 4), data + 8);
         break;
     case VNC_MSG_CLIENT_XVP:
@@ -2478,6 +2525,7 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
         if (len == 4) {
             uint8_t version = read_u8(data, 2);
             uint8_t action = read_u8(data, 3);
+            trace_vnc_msg_client_xvp(vs, vs->ioc, version, action);
 
             if (version != 1) {
                 error_report("vnc: xvp client message version %d != 1",
@@ -2511,6 +2559,10 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
             if (len == 2)
                 return 12;
 
+            trace_vnc_msg_client_ext_key_event(vs, vs->ioc,
+                                               read_u16(data, 2),
+                                               read_u32(data, 4),
+                                               read_u32(data, 8));
             ext_key_event(vs, read_u16(data, 2),
                           read_u32(data, 4), read_u32(data, 8));
             break;
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 3/4] crypto/x509-utils: Check for error from gnutls_x509_crt_init()
  2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 1/4] ui: fix setting client_endian field defaults Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 2/4] ui: add trace events for all client messages Daniel P. Berrangé
@ 2025-07-16 10:30 ` Daniel P. Berrangé
  2025-07-16 10:30 ` [PULL 4/4] crypto: load all certificates in X509 CA file Daniel P. Berrangé
  2025-07-17 15:17 ` [PULL 0/4] Misc crypto & UI patches Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-07-16 10:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, Daniel P. Berrangé, Peter Maydell

From: Peter Maydell <peter.maydell@linaro.org>

Coverity notes that in qcrypto_get_x509_cert_fingerprint() we
call gnutls_x509_crt_init() but don't check for an error return.
Add the missing check.

Coverity: CID 1593155
Fixes: 10a1d34fc0d ("crypto: Introduce x509 utils")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 crypto/x509-utils.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/crypto/x509-utils.c b/crypto/x509-utils.c
index 8bad00a51b..39bb6d4d8c 100644
--- a/crypto/x509-utils.c
+++ b/crypto/x509-utils.c
@@ -46,7 +46,11 @@ int qcrypto_get_x509_cert_fingerprint(uint8_t *cert, size_t size,
         return -1;
     }
 
-    gnutls_x509_crt_init(&crt);
+    if (gnutls_x509_crt_init(&crt) < 0) {
+        error_setg(errp, "Unable to initialize certificate: %s",
+                   gnutls_strerror(ret));
+        return -1;
+    }
 
     if (gnutls_x509_crt_import(crt, &datum, GNUTLS_X509_FMT_PEM) != 0) {
         error_setg(errp, "Failed to import certificate");
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 4/4] crypto: load all certificates in X509 CA file
  2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
                   ` (2 preceding siblings ...)
  2025-07-16 10:30 ` [PULL 3/4] crypto/x509-utils: Check for error from gnutls_x509_crt_init() Daniel P. Berrangé
@ 2025-07-16 10:30 ` Daniel P. Berrangé
  2025-07-17 15:17 ` [PULL 0/4] Misc crypto & UI patches Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrangé @ 2025-07-16 10:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marc-André Lureau, Daniel P. Berrangé, Henry Kleynhans

From: Henry Kleynhans <hkleynhans@fb.com>

Some CA files may contain multiple intermediaries and roots of trust.
These may not fit into the hard-coded limit of 16.

Extend the validation code to allocate enough space to load all of the
certificates present in the CA file and ensure they are cleaned up.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Henry Kleynhans <hkleynhans@fb.com>
[DB: drop MAX_CERTS constant & whitespace tweaks]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 crypto/tlscredsx509.c | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
index 63a72fe47c..143a4caef2 100644
--- a/crypto/tlscredsx509.c
+++ b/crypto/tlscredsx509.c
@@ -426,9 +426,8 @@ qcrypto_tls_creds_load_cert(QCryptoTLSCredsX509 *creds,
 static int
 qcrypto_tls_creds_load_ca_cert_list(QCryptoTLSCredsX509 *creds,
                                     const char *certFile,
-                                    gnutls_x509_crt_t *certs,
-                                    unsigned int certMax,
-                                    size_t *ncerts,
+                                    gnutls_x509_crt_t **certs,
+                                    unsigned int *ncerts,
                                     Error **errp)
 {
     gnutls_datum_t data;
@@ -449,20 +448,18 @@ qcrypto_tls_creds_load_ca_cert_list(QCryptoTLSCredsX509 *creds,
     data.data = (unsigned char *)buf;
     data.size = strlen(buf);
 
-    if (gnutls_x509_crt_list_import(certs, &certMax, &data,
-                                    GNUTLS_X509_FMT_PEM, 0) < 0) {
+    if (gnutls_x509_crt_list_import2(certs, ncerts, &data,
+                                     GNUTLS_X509_FMT_PEM, 0) < 0) {
         error_setg(errp,
                    "Unable to import CA certificate list %s",
                    certFile);
         return -1;
     }
-    *ncerts = certMax;
 
     return 0;
 }
 
 
-#define MAX_CERTS 16
 static int
 qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds,
                                     bool isServer,
@@ -471,12 +468,11 @@ qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds,
                                     Error **errp)
 {
     gnutls_x509_crt_t cert = NULL;
-    gnutls_x509_crt_t cacerts[MAX_CERTS];
-    size_t ncacerts = 0;
+    gnutls_x509_crt_t *cacerts = NULL;
+    unsigned int ncacerts = 0;
     size_t i;
     int ret = -1;
 
-    memset(cacerts, 0, sizeof(cacerts));
     if (certFile &&
         access(certFile, R_OK) == 0) {
         cert = qcrypto_tls_creds_load_cert(creds,
@@ -488,8 +484,9 @@ qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds,
     }
     if (access(cacertFile, R_OK) == 0) {
         if (qcrypto_tls_creds_load_ca_cert_list(creds,
-                                                cacertFile, cacerts,
-                                                MAX_CERTS, &ncacerts,
+                                                cacertFile,
+                                                &cacerts,
+                                                &ncacerts,
                                                 errp) < 0) {
             goto cleanup;
         }
@@ -526,6 +523,8 @@ qcrypto_tls_creds_x509_sanity_check(QCryptoTLSCredsX509 *creds,
     for (i = 0; i < ncacerts; i++) {
         gnutls_x509_crt_deinit(cacerts[i]);
     }
+    gnutls_free(cacerts);
+
     return ret;
 }
 
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PULL 0/4] Misc crypto & UI patches
  2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
                   ` (3 preceding siblings ...)
  2025-07-16 10:30 ` [PULL 4/4] crypto: load all certificates in X509 CA file Daniel P. Berrangé
@ 2025-07-17 15:17 ` Stefan Hajnoczi
  4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2025-07-17 15:17 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel, Marc-André Lureau, Peter Maydell

On Wed, Jul 16, 2025 at 6:39 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> The following changes since commit c079d3a31e45093286c65f8ca5350beb3a4404a9:
>
>   Merge tag 'pull-10.1-rc0-maintainer-140725-1' of https://gitlab.com/stsquad/qemu into staging (2025-07-15 00:12:07 -0400)
>
> are available in the Git repository at:
>
>   https://gitlab.com/berrange/qemu tags/misc-next-pull-request
>
> for you to fetch changes up to def71a6b12d817b95a81b622bad2ca096ed5a3ab:
>
>   crypto: load all certificates in X509 CA file (2025-07-16 11:27:30 +0100)
>
> ----------------------------------------------------------------
> * Fix endian defaults when no VNC pixel format message is set
> * Add more trace events for VNC messages
> * Fix checking of certificate loading
> * Eliminate cert limit on loading CA certificates
>
> ----------------------------------------------------------------
>
> Daniel P. Berrangé (2):
>   ui: fix setting client_endian field defaults
>   ui: add trace events for all client messages
>
> Henry Kleynhans (1):
>   crypto: load all certificates in X509 CA file
>
> Peter Maydell (1):
>   crypto/x509-utils: Check for error from gnutls_x509_crt_init()

Please take a look at the following test failure:

stderr:
../crypto/tlscredsx509.c:526:5: runtime error: control flow integrity
check for type 'void (void *)' failed during indirect function call
(/lib64/libc.so.6+0xa8e90): note: cfree@GLIBC_2.2.5 defined here
../crypto/tlscredsx509.c:526:5: note: check failed in
/builds/qemu-project/qemu/build/qemu-system-x86_64, destination
function located in /lib64/libc.so.6
#0 0x562e710ee7e0 in qcrypto_tls_creds_x509_load
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xc037e0)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#1 0x562e710c719a in user_creatable_add_type
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xbdc19a)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#2 0x562e710c74d0 in user_creatable_add_qapi
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xbdc4d0)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#3 0x562e712f634b in qmp_marshal_object_add.cfi
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe0b34b)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#4 0x562e7135dfac in do_qmp_dispatch_bh.cfi
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe72fac)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#5 0x562e71387d9e in aio_bh_call
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe9cd9e)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#6 0x562e71387f8b in aio_bh_poll
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe9cf8b)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#7 0x562e7136c0fb in aio_dispatch
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe810fb)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#8 0x562e71388f0a in aio_ctx_dispatch.cfi
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe9df0a)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#9 0x7f06fbde602b (/lib64/libglib-2.0.so.0+0x5d02b) (BuildId:
c1b2ab1d795f60de663adaf74140f09f2b2fd034)
#10 0x7f06fbde62f4 in g_main_context_dispatch
(/lib64/libglib-2.0.so.0+0x5d2f4) (BuildId:
c1b2ab1d795f60de663adaf74140f09f2b2fd034)
#11 0x562e7138a648 in main_loop_wait
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xe9f648)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#12 0x562e70d92b56 in qemu_main_loop
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0x8a7b56)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#13 0x562e7122510b in qemu_default_main.cfi
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xd3a10b)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#14 0x562e71225074 in main
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0xd3a074)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
#15 0x7f06f9e01087 in __libc_start_call_main
(/lib64/libc.so.6+0x2a087) (BuildId:
fc3b3c4da3283cd44c006682a30b9df3242de053)
#16 0x7f06f9e0114a in __libc_start_main@GLIBC_2.2.5
(/lib64/libc.so.6+0x2a14a) (BuildId:
fc3b3c4da3283cd44c006682a30b9df3242de053)
#17 0x562e709d9524 in _start
(/builds/qemu-project/qemu/build/qemu-system-x86_64+0x4ee524)
(BuildId: 62905ce6fa45c21d61eea8ffdcee6ca6b6a2af3d)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../crypto/tlscredsx509.c:526:5
Broken pipe
../tests/qtest/libqtest.c:208: kill_qemu() detected QEMU death from
signal 6 (Aborted) (core dumped)
(test program exited with status code -6)

https://gitlab.com/qemu-project/qemu/-/jobs/10717452444#L69

Thanks!

Stefan

>
>  crypto/tlscredsx509.c | 23 +++++++++----------
>  crypto/x509-utils.c   |  6 ++++-
>  ui/trace-events       | 14 ++++++++++++
>  ui/vnc.c              | 53 +++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 83 insertions(+), 13 deletions(-)
>
> --
> 2.49.0
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-07-17 18:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 10:30 [PULL 0/4] Misc crypto & UI patches Daniel P. Berrangé
2025-07-16 10:30 ` [PULL 1/4] ui: fix setting client_endian field defaults Daniel P. Berrangé
2025-07-16 10:30 ` [PULL 2/4] ui: add trace events for all client messages Daniel P. Berrangé
2025-07-16 10:30 ` [PULL 3/4] crypto/x509-utils: Check for error from gnutls_x509_crt_init() Daniel P. Berrangé
2025-07-16 10:30 ` [PULL 4/4] crypto: load all certificates in X509 CA file Daniel P. Berrangé
2025-07-17 15:17 ` [PULL 0/4] Misc crypto & UI patches Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).