Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xwayland for openSUSE:Factory 
checked in at 2023-10-25 18:02:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xwayland (Old)
 and      /work/SRC/openSUSE:Factory/.xwayland.new.24901 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xwayland"

Wed Oct 25 18:02:10 2023 rev:25 rq:1120261 version:23.2.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/xwayland/xwayland.changes        2023-09-22 
21:47:48.657724750 +0200
+++ /work/SRC/openSUSE:Factory/.xwayland.new.24901/xwayland.changes     
2023-10-25 18:02:56.766692060 +0200
@@ -1,0 +2,23 @@
+Wed Oct 25 10:39:17 UTC 2023 - Stefan Dirsch <sndir...@suse.com>
+
+- Update to version 23.2.2
+  * This release contains the fix for CVE-2023-5367 and CVE-2023-5574
+    in today's security advisory: 
+      https://lists.x.org/archives/xorg-announce/2023-October/003430.html
+    Xwayland does not support multiple protocol screens (Zaphod) and is thus
+    not affected by CVE-2023-5380.
+  * Additionally, there is a change in the default behaviour of Xwayland:
+    Since version 23.2.0 Xwayland (via liboeffis) automatically tries to
+    connect to the XDG Desktop Portal's RemoteDesktop interface to obtain
+    the EI socket. That socket is used to send XTest events to the
+    compositor.
+  * However, the connection to the session-wide Portal is unsuitable when
+    Xwayland is running in a nested compositor. Xwayland cannot tell whether
+    it's running on a nested compositor and to keep backwards compatibility
+    with Xwayland prior to 23.2.0, Xwayland must now be started with
+    "-enable-ei-portal" to connect to the portal.
+  * Compositors (who typically spawn Xwayland rootless) must now pass this
+    option to get the same behaviour as 23.2.x.
+  * Finally, Xwayland now uses libbsd-overlay instead of libbsd.
+
+-------------------------------------------------------------------

Old:
----
  xwayland-23.2.1.tar.xz
  xwayland-23.2.1.tar.xz.sig

New:
----
  xwayland-23.2.2.tar.xz
  xwayland-23.2.2.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xwayland.spec ++++++
--- /var/tmp/diff_new_pack.fuU8ai/_old  2023-10-25 18:02:58.154738742 +0200
+++ /var/tmp/diff_new_pack.fuU8ai/_new  2023-10-25 18:02:58.170739281 +0200
@@ -24,7 +24,7 @@
 %endif
 
 Name:           xwayland
-Version:        23.2.1
+Version:        23.2.2
 Release:        0
 URL:            http://xorg.freedesktop.org
 Summary:        Xwayland Xserver

++++++ xwayland-23.2.1.tar.xz -> xwayland-23.2.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/Xi/xiproperty.c 
new/xwayland-23.2.2/Xi/xiproperty.c
--- old/xwayland-23.2.1/Xi/xiproperty.c 2023-09-20 10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/Xi/xiproperty.c 2023-10-25 03:52:55.000000000 +0200
@@ -730,7 +730,7 @@
                 XIDestroyDeviceProperty(prop);
             return BadAlloc;
         }
-        new_value.size = len;
+        new_value.size = total_len;
         new_value.type = type;
         new_value.format = format;
 
@@ -747,7 +747,7 @@
         case PropModePrepend:
             new_data = new_value.data;
             old_data = (void *) (((char *) new_value.data) +
-                                  (prop_value->size * size_in_bytes));
+                                  (len * size_in_bytes));
             break;
         }
         if (new_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/glamor/glamor.c 
new/xwayland-23.2.2/glamor/glamor.c
--- old/xwayland-23.2.1/glamor/glamor.c 2023-09-20 10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/glamor/glamor.c 2023-10-25 03:52:55.000000000 +0200
@@ -307,6 +307,10 @@
 {
     unsigned i;
 
+    /* If there is no quads to draw, just exit */
+    if (count == 0)
+        return;
+
     /* For a single quad, don't bother with an index buffer. */
     if (count ==  1)
         goto fallback;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/glamor/glamor_xv.c 
new/xwayland-23.2.2/glamor/glamor_xv.c
--- old/xwayland-23.2.1/glamor/glamor_xv.c      2023-09-20 10:10:03.000000000 
+0200
+++ new/xwayland-23.2.2/glamor/glamor_xv.c      2023-10-25 03:52:55.000000000 
+0200
@@ -291,10 +291,10 @@
             pitches[0] = size;
         size *= *h;
         if (offsets)
-            offsets[1] = offsets[2] = size;
+            offsets[1] = size;
         tmp = ALIGN(*w, 4);
         if (pitches)
-            pitches[1] = pitches[2] = tmp;
+            pitches[1] = tmp;
         tmp *= (*h >> 1);
         size += tmp;
         break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/man/Xwayland.man 
new/xwayland-23.2.2/hw/xwayland/man/Xwayland.man
--- old/xwayland-23.2.1/hw/xwayland/man/Xwayland.man    2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/man/Xwayland.man    2023-10-25 
03:52:55.000000000 +0200
@@ -61,6 +61,15 @@
 by the Wayland server. Without this option, \fIXwayland\fP tries the GBM
 backend first, and fallback to EGLStream if GBM is not usable.
 .TP 8
+.B \-enable-ei-portal
+Enable support for the XDG portal for input emulation.
+
+A Wayland compositor running nested should not use that command line
+option with Xwayland.
+
+This option has no effect if the compositor doesn't support the relevant
+XDG portal or if Xwayland was not compiled with EI and OEFFIS support.
+.TP 8
 .B \-fullscreen
 Set the Xwayland window fullscreen when running rootful.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/meson.build 
new/xwayland-23.2.2/hw/xwayland/meson.build
--- old/xwayland-23.2.1/hw/xwayland/meson.build 2023-09-20 10:10:03.000000000 
+0200
+++ new/xwayland-23.2.2/hw/xwayland/meson.build 2023-10-25 03:52:55.000000000 
+0200
@@ -186,6 +186,7 @@
     'have_fullscreen=true',
     'have_host_grab=true',
     'have_decorate=' + have_libdecor.to_string(),
+    'have_enable_ei_portal=' + build_ei_portal.to_string(),
     'have_byteswappedclients=true',
 ]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland-glamor-gbm.c 
new/xwayland-23.2.2/hw/xwayland/xwayland-glamor-gbm.c
--- old/xwayland-23.2.1/hw/xwayland/xwayland-glamor-gbm.c       2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland-glamor-gbm.c       2023-10-25 
03:52:55.000000000 +0200
@@ -284,6 +284,8 @@
     struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
     struct gbm_bo *bo = NULL;
     PixmapPtr pixmap = NULL;
+    uint32_t num_modifiers = 0;
+    uint64_t *modifiers = NULL;
 
     if (width > 0 && height > 0 && depth >= 15 &&
         (hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP ||
@@ -294,8 +296,6 @@
 
 #ifdef GBM_BO_WITH_MODIFIERS
         if (xwl_gbm->dmabuf_capable) {
-            uint32_t num_modifiers = 0;
-            uint64_t *modifiers = NULL;
             Bool supports_scanout = FALSE;
 
             if (drawable) {
@@ -324,7 +324,6 @@
                                                   format, modifiers, 
num_modifiers);
 #endif
             }
-            free(modifiers);
         }
 #endif
         if (bo == NULL) {
@@ -332,6 +331,22 @@
             implicit = TRUE;
             if (implicit_scanout)
                 usage |= GBM_BO_USE_SCANOUT;
+
+            if (num_modifiers > 0) {
+                Bool has_mod_invalid = FALSE, has_mod_linear = FALSE;
+                int i;
+
+                for (i = 0; i < num_modifiers; i++) {
+                    if (modifiers[i] == DRM_FORMAT_MOD_INVALID)
+                        has_mod_invalid = TRUE;
+                    else if (modifiers[i] == DRM_FORMAT_MOD_LINEAR)
+                        has_mod_linear = TRUE;
+                }
+
+                if (!has_mod_invalid && has_mod_linear)
+                    usage |= GBM_BO_USE_LINEAR;
+            }
+
             bo = gbm_bo_create(xwl_gbm->gbm, width, height, format, usage);
         }
 
@@ -350,6 +365,7 @@
     if (!pixmap)
         pixmap = glamor_create_pixmap(xwl_screen->screen, width, height, 
depth, hint);
 
+    free(modifiers);
     return pixmap;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland-present.c 
new/xwayland-23.2.2/hw/xwayland/xwayland-present.c
--- old/xwayland-23.2.1/hw/xwayland/xwayland-present.c  2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland-present.c  2023-10-25 
03:52:55.000000000 +0200
@@ -414,9 +414,11 @@
         xwl_present_window->sync_callback = NULL;
     }
 
-    /* Clear remaining events */
-    xorg_list_for_each_entry_safe(event, tmp, &window_priv->vblank, 
vblank.window_list)
-        xwl_present_free_event(event);
+    if (window_priv) {
+        /* Clear remaining events */
+        xorg_list_for_each_entry_safe(event, tmp, &window_priv->vblank, 
vblank.window_list)
+            xwl_present_free_event(event);
+    }
 
     /* Clear timer */
     xwl_present_free_timer(xwl_present_window);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland-screen.c 
new/xwayland-23.2.2/hw/xwayland/xwayland-screen.c
--- old/xwayland-23.2.1/hw/xwayland/xwayland-screen.c   2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland-screen.c   2023-10-25 
03:52:55.000000000 +0200
@@ -814,6 +814,13 @@
             ErrorF("This build does not have libdecor support\n");
 #endif
         }
+        else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
+#ifdef XWL_HAS_EI_PORTAL
+            xwl_screen->enable_ei_portal = 1;
+#else
+            ErrorF("This build does not have XDG portal support\n");
+#endif
+        }
     }
 
     if (!xwl_screen->rootless) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland-screen.h 
new/xwayland-23.2.2/hw/xwayland/xwayland-screen.h
--- old/xwayland-23.2.1/hw/xwayland/xwayland-screen.h   2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland-screen.h   2023-10-25 
03:52:55.000000000 +0200
@@ -67,6 +67,7 @@
     int host_grab;
     int has_grab;
     int decorate;
+    int enable_ei_portal;
 
     CreateScreenResourcesProcPtr CreateScreenResources;
     CloseScreenProcPtr CloseScreen;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland-xtest.c 
new/xwayland-23.2.2/hw/xwayland/xwayland-xtest.c
--- old/xwayland-23.2.1/hw/xwayland/xwayland-xtest.c    2023-09-20 
10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland-xtest.c    2023-10-25 
03:52:55.000000000 +0200
@@ -200,6 +200,7 @@
     struct xwl_abs_device *abs, *tmp;
     ClientPtr client = xwl_ei_client->client;
 
+    TimerCancel(xwl_ei_client->disconnect_timer);
     xorg_list_del(&xwl_ei_client->link);
 
     debug_ei("Removing EI fd=%d\n", xwl_ei_client->ei_fd);
@@ -334,12 +335,14 @@
 static struct xwl_ei_client *
 setup_ei(ClientPtr client)
 {
+    ScreenPtr pScreen = screenInfo.screens[0];
     struct xwl_ei_client *xwl_ei_client = NULL;
+    struct xwl_screen *xwl_screen = xwl_screen_get(pScreen);
     struct ei *ei = NULL;
     char buffer[PATH_MAX];
     const char *cmdname;
     char *client_name = NULL;
-    bool status;
+    bool status = false;
 
     cmdname = GetClientCmdName(client);
     if (cmdname) {
@@ -375,7 +378,8 @@
     xorg_list_init(&xwl_ei_client->pending_emulated_events);
     xorg_list_init(&xwl_ei_client->abs_devices);
 
-    status = setup_oeffis(xwl_ei_client);
+    if (xwl_screen->enable_ei_portal)
+        status = setup_oeffis(xwl_ei_client);
     if (!status)
         status = setup_ei_from_socket(xwl_ei_client);
 
@@ -384,6 +388,8 @@
         xwl_ei_client = NULL;
         ei_unref(ei);
         error_ei("EI setup failed\n");
+        /* We failed to setup EI using either backends, give up on EI. */
+        xwayland_restore_xtest();
     }
 
  out:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/hw/xwayland/xwayland.c 
new/xwayland-23.2.2/hw/xwayland/xwayland.c
--- old/xwayland-23.2.1/hw/xwayland/xwayland.c  2023-09-20 10:10:03.000000000 
+0200
+++ new/xwayland-23.2.2/hw/xwayland/xwayland.c  2023-10-25 03:52:55.000000000 
+0200
@@ -109,6 +109,9 @@
 #ifdef XWL_HAS_LIBDECOR
     ErrorF("-decorate              add decorations to Xwayland when 
rootful\n");
 #endif
+#ifdef XWL_HAS_EI_PORTAL
+    ErrorF("-enable-ei-portal      use the XDG portal for input emulation\n");
+#endif
 }
 
 static int init_fd = -1;
@@ -246,6 +249,9 @@
     else if (strcmp(argv[i], "-decorate") == 0) {
         return 1;
     }
+    else if (strcmp(argv[i], "-enable-ei-portal") == 0) {
+        return 1;
+    }
 
     return 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/include/os.h 
new/xwayland-23.2.2/include/os.h
--- old/xwayland-23.2.1/include/os.h    2023-09-20 10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/include/os.h    2023-10-25 03:52:55.000000000 +0200
@@ -50,16 +50,13 @@
 #include "misc.h"
 #include <stdarg.h>
 #include <stdint.h>
+#if defined(HAVE_REALLOCARRAY)
+#include <stdlib.h>       /* for reallocarray */
+#endif
 #include <string.h>
 #ifdef MONOTONIC_CLOCK
 #include <time.h>
 #endif
-#if defined(HAVE_LIBBSD) && defined(HAVE_REALLOCARRAY)
-#include <bsd/stdlib.h>       /* for reallocarray */
-#endif
-#if defined(HAVE_LIBBSD) && defined(HAVE_STRLCPY)
-#include <bsd/string.h>       /* for strlcpy, strlcat */
-#endif
 
 #define SCREEN_SAVER_ON   0
 #define SCREEN_SAVER_OFF  1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/meson.build 
new/xwayland-23.2.2/meson.build
--- old/xwayland-23.2.1/meson.build     2023-09-20 10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/meson.build     2023-10-25 03:52:55.000000000 +0200
@@ -3,10 +3,10 @@
             'buildtype=debugoptimized',
             'c_std=gnu99',
         ],
-        version: '23.2.1',
+        version: '23.2.2',
         meson_version: '>= 0.52.0',
 )
-release_date = '2023-09-20'
+release_date = '2023-10-25'
 
 add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
 cc = meson.get_compiler('c')
@@ -94,7 +94,7 @@
 xwaylandproto_dep = dependency('xwaylandproto', version: '>= 1.0', fallback: 
['xorgproto', 'ext_xorgproto'], required: false)
 
 pixman_dep = dependency('pixman-1')
-libbsd_dep = dependency('libbsd', required: false)
+libbsd_dep = dependency('libbsd-overlay', required: false)
 xkbcomp_dep = dependency('xkbcomp', required: false)
 xkbfile_dep = dependency('xkbfile')
 xfont2_dep = dependency('xfont2', version: '>= 2.0')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/os/auth.c 
new/xwayland-23.2.2/os/auth.c
--- old/xwayland-23.2.1/os/auth.c       2023-09-20 10:10:03.000000000 +0200
+++ new/xwayland-23.2.2/os/auth.c       2023-10-25 03:52:55.000000000 +0200
@@ -46,9 +46,7 @@
 #ifdef WIN32
 #include    <X11/Xw32defs.h>
 #endif
-#ifdef HAVE_LIBBSD
-#include   <bsd/stdlib.h>       /* for arc4random_buf() */
-#endif
+#include   <stdlib.h>       /* for arc4random_buf() */
 
 struct protocol {
     unsigned short name_length;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xwayland-23.2.1/randr/rrproperty.c 
new/xwayland-23.2.2/randr/rrproperty.c
--- old/xwayland-23.2.1/randr/rrproperty.c      2023-09-20 10:10:03.000000000 
+0200
+++ new/xwayland-23.2.2/randr/rrproperty.c      2023-10-25 03:52:55.000000000 
+0200
@@ -209,7 +209,7 @@
                 RRDestroyOutputProperty(prop);
             return BadAlloc;
         }
-        new_value.size = len;
+        new_value.size = total_len;
         new_value.type = type;
         new_value.format = format;
 
@@ -226,7 +226,7 @@
         case PropModePrepend:
             new_data = new_value.data;
             old_data = (void *) (((char *) new_value.data) +
-                                  (prop_value->size * size_in_bytes));
+                                  (len * size_in_bytes));
             break;
         }
         if (new_data)

++++++ xwayland.keyring ++++++
Binary files /var/tmp/diff_new_pack.fuU8ai/_old and 
/var/tmp/diff_new_pack.fuU8ai/_new differ

Reply via email to