Compare commits

..

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
8 changed files with 182 additions and 125 deletions

2
.gitignore vendored
View file

@ -3,5 +3,3 @@
/x11vnc-0.9.8-disableRpath.patch
/x11vnc-0.9.14-dev.tar.gz
/x11vnc-0.9.16.tar.gz
/x11vnc-a61f364.tar.gz
/x11vnc-0.9.17.tar.gz

View file

@ -1 +1 @@
SHA512 (x11vnc-0.9.17.tar.gz) = 687c41e03cca43dbca6ffdeb40960dddfba54ba00cf890f89f63fd66b9559a4c09602f84c1d4b7ffd7ac58818b90893013925d94a45a6feb83ab8cf7a02c1fe8
SHA512 (x11vnc-0.9.16.tar.gz) = 69f65ee312f8dede6051b401304987502a213c6c28c7f41e855734f11de1fae14d5d493dc9c28b2e4b7c0be55f8dbd3b35dd2610aae910183772c3e626736fec

View file

@ -0,0 +1,50 @@
From a48b0b1cd887d7f3ae67f525d7d334bd2feffe60 Mon Sep 17 00:00:00 2001
From: Alexander Tsoy <alexander@tsoy.me>
Date: Tue, 28 Jan 2020 22:21:01 +0300
Subject: [PATCH] Fix build with -fno-common
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 10 defaults to -fno-common
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/util.c | 3 +++
src/util.h | 6 +++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/util.c b/src/util.c
index a82a1a4..6a52ebf 100644
--- a/src/util.c
+++ b/src/util.c
@@ -47,6 +47,9 @@ int hxl = 0;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
MUTEX(x11Mutex);
MUTEX(scrollMutex);
+MUTEX(clientMutex);
+MUTEX(inputMutex);
+MUTEX(pointerMutex);
#endif
int nfix(int i, int n);
diff --git a/src/util.h b/src/util.h
index 35c1afd..99b5dd1 100644
--- a/src/util.h
+++ b/src/util.h
@@ -102,9 +102,9 @@ extern struct timeval _mysleep;
#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
extern MUTEX(x11Mutex);
extern MUTEX(scrollMutex);
-MUTEX(clientMutex);
-MUTEX(inputMutex);
-MUTEX(pointerMutex);
+extern MUTEX(clientMutex);
+extern MUTEX(inputMutex);
+extern MUTEX(pointerMutex);
#endif
#define X_INIT INIT_MUTEX(x11Mutex)
--
2.21.1

View file

@ -31,11 +31,11 @@ diff --git a/src/sslhelper.c b/src/sslhelper.c
index 1a3e747..a145a70 100644
--- a/src/sslhelper.c
+++ b/src/sslhelper.c
@@ -1601,9 +1601,6 @@ static int switch_to_anon_dh(void) {
/* Security level must be set to 0 for unauthenticated suites. */
SSL_CTX_set_security_level(ctx, 0);
#endif
- if (!SSL_CTX_set_cipher_list(ctx, "ADH:@SECLEVEL=0")) {
@@ -1596,9 +1596,6 @@ static int switch_to_anon_dh(void) {
if (ssl_client_mode) {
return 1;
}
- if (!SSL_CTX_set_cipher_list(ctx, "ADH:@STRENGTH")) {
- return 0;
- }
if (!add_anon_dh()) {
@ -43,3 +43,4 @@ index 1a3e747..a145a70 100644
}
--
2.21.1

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

@ -0,0 +1,36 @@
From 95a10ab64c2dbbec2c8dad91a5ffb73a0d68474b Mon Sep 17 00:00:00 2001
From: Jonathan Liu <net147@gmail.com>
Date: Mon, 16 Mar 2020 20:04:06 +1100
Subject: [PATCH] src/cursor: fix xfc NULL pointer dereference
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
xfc->width and xfc->height for the XFixes cursor image returned from
XFixesGetCursorImage(dpy) are accessed without first checking that xfc
is not NULL. This can result in the server sometimes crashing when
moving a Google Chrome window.
Fixes: 37c946191a0f ("Broken cursor bugfix for 64 bit systems (#49)")
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
src/cursor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cursor.c b/src/cursor.c
index 39e73a6..74a08c6 100644
--- a/src/cursor.c
+++ b/src/cursor.c
@@ -1311,7 +1311,7 @@ static int get_exact_cursor(int init) {
/* retrieve the cursor info + pixels from server: */
xfc = XFixesGetCursorImage(dpy);
- {
+ if (xfc) {
/* 2017-07-09, Stephan Fuhrmann: This fixes an implementation flaw for 64 bit systems.
* The XFixesCursorImage structure says xfc->pixels is (unsigned long*) in the structure, but
* the protocol spec says it's 32 bit per pixel
--
2.21.1

View file

@ -1 +1,2 @@
addFilter('spelling-error .* ru (т|п)')
from Config import *
addFilter("spelling-error .* ru (т|п)");

View file

@ -1,54 +1,50 @@
Name: x11vnc
Version: 0.9.17
Release: 5%{?dist}
Version: 0.9.16
Release: 3%{?dist}
Summary: VNC server for the current X11 session
Summary(ru): VNC-сервер для текущей сессии X11
# COPYING: GPL-2.0-or-later text
# misc/Xdummy.in: GPL-2.0-or-later
# src/cleanup.c: GPL-2.0-or-later WITH x11vnc-openssl-exception
# src/help.c: GPL-2.0-or-later WITH x11vnc-openssl-exception AND GPL-2.0-or-later text
# src/help.h: GPL-2.0-or-later WITH x11vnc-openssl-exception
# src/tkx11vnc.h: GPL-2.0-or-later
# src/win_utils.c: GPL-2.0-or-later WITH x11vnc-openssl-exception
# src/xi2_devices.c: GPL-2.0-or-later
# src/xi2_devices.h: GPL-2.0-or-later
# src/xkb_bell.h: GPL-2.0-or-later WITH x11vnc-openssl-exception
# COPYING: GPLv2 text
# misc/Xdummy.in: GPLv2+
# src/cleanup.c: GPLv2+ with OpenSSL exception
# src/help.c: GPLv2+ with OpenSSL exception and GPLv2 text
# src/help.h: GPLv2+ with OpenSSL exception
# src/tkx11vnc.h: GPLv2+
# src/win_utils.c: GPLv2+ with OpenSSL exception
# src/xi2_devices.c: GPLv2+
# src/xi2_devices.h: GPLv2+
# src/xkb_bell.h: GPLv2+ with OpenSSL exception
## Not in any binary package
# m4/ax_type_socklen_t.m4: GPL-2.0-or-later WITH Autoconf-exception-macro
# m4/ax_type_socklen_t.m4: GPLv2+ with Autoconf exception
## Not used at all
# misc/blockdpy.c: GPL-2.0-or-later
# misc/connect_switch: GPL-2.0-or-later
# misc/desktop.cgi: GPL-2.0-or-later
# misc/deskshot: GPL-2.0-or-later
# misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer: GPL-2.0-or-later
# misc/enhanced_tightvnc_viewer/COPYING: GPL-2.0-or-later text
# misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1: GPL-1.0-or-later
# misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1: GPL-1.0-or-later
# misc/enhanced_tightvnc_viewer/README: GPL-1.0-or-later
# misc/blockdpy.c: GPLv2+
# misc/connect_switch: GPLv2+
# misc/desktop.cgi: GPLv2+
# misc/deskshot: GPLv2+
# misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer: GPLv2+
# misc/enhanced_tightvnc_viewer/COPYING: GPLv2 text
# misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1: GPL+
# misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1: GPL+
# misc/enhanced_tightvnc_viewer/README: GPL+
# misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch:
# GPL-2.0-or-later AND GPL-1.0-or-later AND
# LGPL-2.0-or-later WITH WxWindows-exception-3.1 AND
# BSD-3-Clause
# misc/inet6to4: GPL-2.0-or-later
# misc/LICENSE: GPL-2.0-or-later
# misc/qt_tslib_inject.pl: GPL-2.0-or-later
# misc/turbovnc/apply_turbovnc: LicenseRef-Fedora-Public-Domain
# This license has been approved
# <https://gitlab.com/fedora/legal/fedora-license-data/-/issues/62>.
# misc/turbovnc/convert: LicenseRef-Fedora-Public-Domain
# misc/turbovnc/convert_rfbserver: LicenseRef-Fedora-Public-Domain
# misc/turbovnc/Makefile.am: LicenseRef-Fedora-Public-Domain
# misc/turbovnc/README: LicenseRef-Fedora-Public-Domain
# misc/turbovnc/tight.c: GPL-2.0-or-later
# misc/turbovnc/turbojpeg.h: LGPL-2.0-or-later WITH WxWindows-exception-3.1
# misc/turbovnc/undo_turbovnc: LicenseRef-Fedora-Public-Domain
# misc/uinput.pl: GPL-2.0-or-later
# misc/ultravnc_repeater.pl: GPL-2.0-or-later
# misc/Xdummy.c: GPL-2.0-or-later WITH x11vnc-openssl-exception
# src/nox11.h: MIT-open-group
# tkx11vnc: GPL-2.0-or-later
License: GPL-2.0-or-later AND GPL-2.0-or-later WITH x11vnc-openssl-exception
SourceLicense: %{license} AND GPL-2.0-or-later WITH Autoconf-exception-macro AND LGPL-2.0-or-later WITH WxWindows-exception-3.1 AND BSD-3-Clause AND LicenseRef-Fedora-Public-Domain AND LGPL-2.0-or-later WITH WxWindows-exception-3.1 AND MIT-open-group
# GPLv2+ and and GPL+ and
# wxWindows version 3.1 or later and BSD
# misc/inet6to4: GPLv2+
# misc/LICENSE: GPLv2+
# misc/qt_tslib_inject.pl: GPLv2+
# misc/turbovnc/apply_turbovnc: Public Domain
# misc/turbovnc/convert: Public Domain
# misc/turbovnc/convert_rfbserver: Public Domain
# misc/turbovnc/Makefile.am: Public Domain
# misc/turbovnc/README: Public Domain
# misc/turbovnc/tight.c: GPLv2+
# misc/turbovnc/turbojpeg.h: wxWindows version 3 or later
# misc/turbovnc/undo_turbovnc: Public Domain
# misc/uinput.pl: GPLv2+
# misc/ultravnc_repeater.pl: GPLv2+
# misc/Xdummy.c: GPLv2+ with OpenSSL exception
# src/nox11.h: MIT
# tkx11vnc: GPLv2
License: GPLv2+
URL: https://github.com/LibVNC/x11vnc
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# Enforce system crypto policy
@ -56,7 +52,14 @@ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: x11vnc-0.9.16-Respect-a-system-crypto-policy.patch
# Normalize changlog encoding
Patch1: x11vnc-0.9.16-Convert-a-changelog-to-UTF-8.patch
# Fix building with GCC 10 properly, in upstream after 0.9.16
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,7 +73,6 @@ BuildRequires: libXfixes-devel
BuildRequires: libXinerama-devel
BuildRequires: libXrandr-devel
BuildRequires: libXtst-devel
BuildRequires: libxcrypt-devel
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pkgconf-pkg-config
@ -80,7 +82,6 @@ BuildRequires: pkgconfig(inputproto) >= 1.9.99.9
BuildRequires: pkgconfig(libvncclient) >= 0.9.8
BuildRequires: pkgconfig(libvncserver) >= 0.9.8
BuildRequires: pkgconfig(xi) >= 1.2.99
BuildRequires: pkgconfig(libdrm)
BuildRequires: sed
# Tests:
BuildRequires: desktop-file-utils
@ -111,7 +112,12 @@ a versatile and productive while still easy to use program.
в использовании.
%prep
%autosetup -p1 -n %{name}-%{version}
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
autoreconf -fi
@ -125,6 +131,7 @@ autoreconf -fi
--without-macosx-native \
--with-ssl \
--with-uinput \
--without-v4l \
--with-x \
--without-xcomposite \
--with-xdamage \
@ -144,81 +151,16 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/x11vnc.desktop
%files
%license COPYING
%doc ChangeLog doc/* NEWS README
%doc ChangeLog NEWS README
%{_bindir}/x11vnc
%{_bindir}/Xdummy
%{_datadir}/applications/x11vnc.desktop
%{_mandir}/man1/x11vnc.1*
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Sat Jun 13 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 0.9.17-4
- Rebuilt for openssl 4.0
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri May 02 2025 Petr Pisar <ppisar@redhat.com> - 0.9.17-1
- 0.9.17 bump
* Sat Feb 01 2025 Björn Esser <besser82@fedoraproject.org> - 0.9.16^20230801gita61f364-5
- Add explicit BR: libxcrypt-devel
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16^20230801gita61f364-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16^20230801gita61f364-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16^20230801gita61f364-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Nov 17 2023 Sérgio Basto <sergio@serjux.com> - 0.9.16^20230801gita61f364-1
- Update to a61f364e385d98677c04070a994397b287385219 git snapshot from
2023-08-01 (a support for acquiring a DRM framebuffer with a drm schema
in -rawfb option)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Feb 4 2023 Florian Weimer <fweimer@redhat.com> - 0.9.16-13
- Do not configure with --without-v4l
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Sep 13 2022 Petr Pisar <ppisar@redhat.com> - 0.9.16-11
- Convert a license tag to an SPDX format
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.9.16-8
- Rebuilt with OpenSSL 3.0.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Mar 01 2021 Petr Pisar <ppisar@redhat.com> - 0.9.16-6
* 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)
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0.9.16-3
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Mon Apr 06 2020 Petr Pisar <ppisar@redhat.com> - 0.9.16-2
- Modernize a spec file
- License corrected from GPLv2 to GPLv2+