forked from pool/xorg-x11-server
- U_Xext-shm-Refuse-to-work-for-remote-clients.patch
* 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. (boo#1097227) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=705
This commit is contained in:
parent
ba153cf191
commit
c4f62cf965
59
U_Xext-shm-Refuse-to-work-for-remote-clients.patch
Normal file
59
U_Xext-shm-Refuse-to-work-for-remote-clients.patch
Normal file
@ -0,0 +1,59 @@
|
||||
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>
|
||||
---
|
||||
Xext/shm.c | 18 ++++++++++++++----
|
||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Xext/shm.c b/Xext/shm.c
|
||||
index fc8441c43..896a966e3 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.16.3
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 20 15:40:58 UTC 2018 - sndirsch@suse.com
|
||||
|
||||
- U_Xext-shm-Refuse-to-work-for-remote-clients.patch
|
||||
* 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. (boo#1097227)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 22 07:47:26 UTC 2018 - msrb@suse.com
|
||||
|
||||
|
@ -223,6 +223,8 @@ Patch1222: b_sync-fix.patch
|
||||
|
||||
Patch1401: u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch
|
||||
|
||||
Patch1500: U_Xext-shm-Refuse-to-work-for-remote-clients.patch
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
|
||||
@ -362,6 +364,8 @@ sh %{SOURCE92} --verify . %{SOURCE91}
|
||||
|
||||
%patch1401 -p1
|
||||
|
||||
%patch1500 -p1
|
||||
|
||||
%build
|
||||
test -e source-file-list || \
|
||||
find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \
|
||||
|
Loading…
Reference in New Issue
Block a user