Commit 2b23edee authored by Eric Vidal's avatar Eric Vidal 💬
Browse files

upgrel : 1.20.0-5

parent 93779ec5
From ec7e2b54c5b4a34b2a077082967bc3ead30e227e Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Tue, 5 Jun 2018 13:05:39 +0300
Subject: [PATCH] Xext/shm: Refuse to work for remote clients
Avoid access to System V shared memory segment on the X server side
for clients forwarded via SSH. Also prevent them from hanging while
waiting for the reply from the ShmCreateSegment request.
v2: Allow ShmQueryVersion request even for remote clients
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=11080
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
---
Xext/shm.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/Xext/shm.c b/Xext/shm.c
index fc8441c..896a966 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -1302,9 +1302,14 @@ static int
ProcShmDispatch(ClientPtr client)
{
REQUEST(xReq);
- switch (stuff->data) {
- case X_ShmQueryVersion:
+
+ if (stuff->data == X_ShmQueryVersion)
return ProcShmQueryVersion(client);
+
+ if (!client->local)
+ return BadRequest;
+
+ switch (stuff->data) {
case X_ShmAttach:
return ProcShmAttach(client);
case X_ShmDetach:
@@ -1461,9 +1466,14 @@ static int _X_COLD
SProcShmDispatch(ClientPtr client)
{
REQUEST(xReq);
- switch (stuff->data) {
- case X_ShmQueryVersion:
+
+ if (stuff->data == X_ShmQueryVersion)
return SProcShmQueryVersion(client);
+
+ if (!client->local)
+ return BadRequest;
+
+ switch (stuff->data) {
case X_ShmAttach:
return SProcShmAttach(client);
case X_ShmDetach:
--
2.17.1
......@@ -7,7 +7,7 @@ pkgbase=xorg-server
pkgname=('xorg-server-rootless' 'xorg-server-xephyr-rootless' 'xorg-server-xdmx-rootless' 'xorg-server-xvfb-rootless'
'xorg-server-xnest-rootless' 'xorg-server-xwayland-rootless' 'xorg-server-common-rootless' 'xorg-server-devel-rootless')
pkgver=1.20.0
pkgrel=4
pkgrel=5
arch=('x86_64')
license=('custom')
groups=('xorg')
......@@ -30,7 +30,10 @@ source=(https://xorg.freedesktop.org/releases/individual/xserver/${pkgbase}-${pk
xserver-2-2-glamor-Propagate-glamor_fds_from_pixmap-error-in-glamor_fd_from_pixmap.patch
0001-v2-FS-58644.patch
0002-fix-libshadow-2.patch
0003_Use_PictureMatchFormat_for_source-only_picture_format.diff)
0003_Use_PictureMatchFormat_for_source-only_picture_format.diff
0001-Xext-shm-Refuse-to-work-for-remote-clients.patch
meson-Add-configuration-of-listening-on-tcp-unix-and-local.patch
xserver-modesetting-use-drmmode_bo_import-for-rotate_fb.patch)
validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
'C383B778255613DFDB409D91DB221A6900000011'
'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3'
......@@ -44,7 +47,10 @@ sha512sums=('1489e8511c9da682ef0460182dfeeddd241c72d4ef4d206d9706f1e39572c09953d
'fc259a0a4acb7b70209fc599b0f4bc94942316bbc8c6995f783026b7cd455900bcb7527615d76c99bd2e0155e0035cbd619939a1f7ddf3af32ed854afe45b631'
'f05c18354a3cf5b5b0fa97c4a887cfd688297e39d7ddc93b5900357119a689a060321019aeec9ca9c1366ea4b65b7875b2a9cadb84e46d2c193c15e6df22fcd8'
'9cb9a979dfc2de4fac384a1044b368bb97c8b0b524523aa2a96ef55c673ab5350c50cc79ad103655f40c2e0002cdcc2e1646fade3ac78641616d182e7c500be7'
'b85a109e8bdfad04d1ba9a9dce3607bb12f014b63d24b95b2659658b1547b5391efdf816a74f36591a23c28fb75773edcc270a379b5b4032c1baa98aa5e890d2')
'b85a109e8bdfad04d1ba9a9dce3607bb12f014b63d24b95b2659658b1547b5391efdf816a74f36591a23c28fb75773edcc270a379b5b4032c1baa98aa5e890d2'
'69db49586cb6c638922b32cfaa7700c210b37bbc1046b2237b5500ce3d5c009a18ce524813721dea4674af1035603753772357459783d9d4d649169205a9232d'
'1990daa38f2eba161ecc2f310711af85e3d76c78ca45e002dff3697da2f8a2dc53d9371b1e7e55be80a002ef9cb095c6675e19021f270d06cf2b4ea728407aea'
'e6339cb1c41e26a43caae7f3e991e9f528000676c29f5bc5a29c99bab2a5f5529efba2b9226a63d138700e6228b234eccd2982d40052b4ee41cfdff96dcc1521')
prepare() {
cp xwayland-config.h.meson.in ${pkgbase}-${pkgver}/include/
......@@ -70,6 +76,14 @@ prepare() {
# FS#i58662
patch -Np1 -i ../0003_Use_PictureMatchFormat_for_source-only_picture_format.diff
# Display incorrect when rotated 90 degree - FS#58637
patch -Np1 -i ../xserver-modesetting-use-drmmode_bo_import-for-rotate_fb.patch
# xserver by default listens on tcp sockets - FS#59025
patch -Np1 -i ../meson-Add-configuration-of-listening-on-tcp-unix-and-local.patch
# SSH X11 forwarding no longer works for Qt apps - FS#58962
patch -Np1 -i ../0001-Xext-shm-Refuse-to-work-for-remote-clients.patch
}
build() {
......
diff --git a/include/meson.build b/include/meson.build
index f76f557..dfca3c3 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -153,10 +153,10 @@ conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION'))
conf_data.set('_XTYPEDEF_POINTER', '1')
conf_data.set('_XITYPEDEF_POINTER', '1')
+conf_data.set('LISTEN_TCP', get_option('listen_tcp'))
+conf_data.set('LISTEN_UNIX', get_option('listen_unix'))
+conf_data.set('LISTEN_LOCAL', get_option('listen_local'))
# XXX: Configurable?
-conf_data.set('LISTEN_TCP', '1')
-conf_data.set('LISTEN_UNIX', '1')
-conf_data.set('LISTEN_LOCAL', '1')
conf_data.set('XTRANS_SEND_FDS', '1')
conf_data.set('TCPCONN', '1')
diff --git a/meson_options.txt b/meson_options.txt
index 86fca46..3453b8d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -45,6 +45,13 @@ option('vendor_name_short', type: 'string', value: 'X.Org')
option('vendor_web', type: 'string', value: 'http://wiki.x.org')
option('os_vendor', type: 'string', value: '')
+option('listen_tcp', type: 'boolean', value: false,
+ description: 'Listen on TCP by default')
+option('listen_unix', type: 'boolean', value: true,
+ description: 'Listen on Unix by default')
+option('listen_local', type: 'boolean', value: true,
+ description: 'Listen on local by default')
+
option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'],
value: 'auto',
description: 'Xorg int10 backend (default: usually x86emu)')
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 859a21a9d..ec11b3f56 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1794,11 +1794,8 @@ drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
return NULL;
}
- ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
- drmmode->kbpp,
- drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
- drmmode_bo_get_handle(&drmmode_crtc->rotate_bo),
- &drmmode_crtc->rotate_fb_id);
+ ret = drmmode_bo_import(drmmode, &drmmode_crtc->rotate_bo,
+ &drmmode_crtc->rotate_fb_id);
if (ret) {
ErrorF("failed to add rotate fb\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment