Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Petr Písař
9412c1c05b Fix CVE-2020-29074 (insecure permissions on a shared memory) 2021-03-01 18:00:19 +01:00
Petr Písař
4fbf1e1bc3 Indent a spec file 2021-03-01 17:59:49 +01:00
Tom Stellard
c523411667 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-03-01 17:59:49 +01:00
2 changed files with 38 additions and 1 deletions

View file

@ -0,0 +1,29 @@
From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr>
Date: Wed, 18 Nov 2020 08:40:45 +0100
Subject: [PATCH] scan: limit access to shared memory segments to current user
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scan.c b/src/scan.c
index 43e00d2..12994d5 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h,
#if HAVE_XSHM
shm->shmid = shmget(IPC_PRIVATE,
- xim->bytes_per_line * xim->height, IPC_CREAT | 0777);
+ xim->bytes_per_line * xim->height, IPC_CREAT | 0600);
if (shm->shmid == -1) {
rfbErr("shmget(%s) failed.\n", name);
--
2.26.2

View file

@ -1,6 +1,6 @@
Name: x11vnc
Version: 0.9.16
Release: 2%{?dist}
Release: 3%{?dist}
Summary: VNC server for the current X11 session
Summary(ru): VNC-сервер для текущей сессии X11
# COPYING: GPLv2 text
@ -57,6 +57,9 @@ Patch2: x11vnc-0.9.16-Fix-build-with-fno-common.patch
# Fix a NULL pointer dereference in a cursor handler, upstream bug #123, in
# upstream after 0.9.16
Patch3: x11vnc-0.9.16-src-cursor-fix-xfc-NULL-pointer-dereference.patch
# Fix CVE-2020-29074 (insecure permissions on a shared memory), bug #1933603,
# in upstream after 0.9.16
Patch4: x11vnc-0.9.16-scan-limit-access-to-shared-memory-segments-to-curre.patch
BuildRequires: autoconf
BuildRequires: automake
# for autogen.sh script
@ -70,6 +73,7 @@ BuildRequires: libXfixes-devel
BuildRequires: libXinerama-devel
BuildRequires: libXrandr-devel
BuildRequires: libXtst-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pkgconf-pkg-config
BuildRequires: pkgconfig(avahi-client) >= 0.6.4
@ -113,6 +117,7 @@ a versatile and productive while still easy to use program.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf -fi
@ -153,6 +158,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/x11vnc.desktop
%{_mandir}/man1/x11vnc.1*
%changelog
* Mon Mar 01 2021 Petr Pisar <ppisar@redhat.com> - 0.9.16-3
- Fix CVE-2020-29074 (insecure permissions on a shared memory) (bug #1933603)
* Mon Apr 06 2020 Petr Pisar <ppisar@redhat.com> - 0.9.16-2
- Modernize a spec file
- License corrected from GPLv2 to GPLv2+