Skip to content
Snippets Groups Projects
Commit 615711a8 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

upgrel : 1.20.0-10

parent 77a36f18
No related branches found
No related tags found
No related merge requests found
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' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest'
'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel')
pkgver=1.20.0
pkgrel=8
pkgrel=10
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'
......@@ -69,6 +72,15 @@ 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");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment