import xorg-x11-drv-wacom-0.38.0-1.el8
This commit is contained in:
parent
f54316d039
commit
d47d4c9379
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/xf86-input-wacom-0.36.1.tar.bz2
|
SOURCES/xf86-input-wacom-0.38.0.tar.bz2
|
||||||
|
@ -1 +1 @@
|
|||||||
51d1b198f86bf7609b0464ce34a93c90f1ef557c SOURCES/xf86-input-wacom-0.36.1.tar.bz2
|
b153c976365a54af3d5265e50e7a1e6eb415851d SOURCES/xf86-input-wacom-0.38.0.tar.bz2
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
From 2a7af30793f9aa6e36acdc7c8b908d0965585437 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jason Gerecke <killertofu@gmail.com>
|
||||||
|
Date: Thu, 10 Oct 2019 12:13:39 -0700
|
||||||
|
Subject: [PATCH] tools: Fix potential buffer overflow when reading from serial
|
||||||
|
tablet
|
||||||
|
|
||||||
|
The read_data() function has a "min_len" number of bytes to read
|
||||||
|
to ensure that a complete data structure is read, regardless of garbage
|
||||||
|
that may be on the line. When garbage is present, however, it can
|
||||||
|
potentially overflow the buffer.
|
||||||
|
|
||||||
|
The function already has code to memmove the good data over garbage and
|
||||||
|
perform re-reads until "min_len" bytes of good data are available. All
|
||||||
|
we need to do to avoid the buffer overflow is ensure that the maximum
|
||||||
|
number of bytes we read() in one call is no more than the number of
|
||||||
|
bytes free at the end of the buffer.
|
||||||
|
|
||||||
|
Ref: https://github.com/linuxwacom/xf86-input-wacom/issues/86
|
||||||
|
Fixes: 3546d8ab1b ("tools: add isdv4-serial-debugger test program")
|
||||||
|
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
|
||||||
|
---
|
||||||
|
tools/tools-shared.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/tools-shared.c b/tools/tools-shared.c
|
||||||
|
index c55e8ca1..c10d8e86 100644
|
||||||
|
--- a/tools/tools-shared.c
|
||||||
|
+++ b/tools/tools-shared.c
|
||||||
|
@@ -219,7 +219,7 @@ int read_data(int fd, unsigned char* buffer, int min_len)
|
||||||
|
TRACE("Reading %d bytes from device.\n", min_len);
|
||||||
|
redo:
|
||||||
|
do {
|
||||||
|
- int l = read(fd, &buffer[len], min_len);
|
||||||
|
+ int l = read(fd, &buffer[len], min_len - len);
|
||||||
|
|
||||||
|
if (l == -1) {
|
||||||
|
if (errno != EAGAIN) {
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
@ -1,91 +0,0 @@
|
|||||||
From ba21208fadd9588ef61a6165480ce1092ba7e699 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Hutterer <peter.hutterer@who-t.net>
|
|
||||||
Date: Mon, 10 Dec 2018 11:03:22 +1000
|
|
||||||
Subject: [PATCH] xsetwacom: error if we're running this under Wayland
|
|
||||||
|
|
||||||
xsetwacom cannot work under Wayland, even with XWayland because there is no
|
|
||||||
xf86-input-wacom driver. So let's not continue normally and not find any
|
|
||||||
devices because that'll be confusing to the user when the tablet is clearly
|
|
||||||
working.
|
|
||||||
|
|
||||||
Print an error and exit code of 1.
|
|
||||||
|
|
||||||
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
||||||
---
|
|
||||||
man/xsetwacom.man | 8 ++++++++
|
|
||||||
tools/xsetwacom.c | 26 ++++++++++++++++++++++++++
|
|
||||||
2 files changed, 34 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/man/xsetwacom.man b/man/xsetwacom.man
|
|
||||||
index 1c5e445..9674a6b 100644
|
|
||||||
--- a/man/xsetwacom.man
|
|
||||||
+++ b/man/xsetwacom.man
|
|
||||||
@@ -289,6 +289,14 @@ will require less distance and be more sensitive. Larger values will
|
|
||||||
require more distance and be less sensitive. Default: 1300 or 2600
|
|
||||||
depending on tablet resolution (corresponds to 13 mm of distance).
|
|
||||||
|
|
||||||
+.SH WAYLAND SUPPORT
|
|
||||||
+
|
|
||||||
+This tool provides access to the device properties implemented in the
|
|
||||||
+\fBxf86-input-wacom\fR X server input module. It does not work under a
|
|
||||||
+Wayland compositor as the input module is not active.
|
|
||||||
+.TP
|
|
||||||
+See https://github.com/linuxwacom/xf86-input-wacom/wiki/Wayland for details.
|
|
||||||
+
|
|
||||||
|
|
||||||
.SH "AUTHORS"
|
|
||||||
Peter Hutterer <peter.hutterer@redhat.com>
|
|
||||||
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
|
|
||||||
index 8b66944..cb5b7f0 100644
|
|
||||||
--- a/tools/xsetwacom.c
|
|
||||||
+++ b/tools/xsetwacom.c
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
+#include <stdbool.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
@@ -2795,6 +2796,24 @@ void argsfromstdin(int *argc, char ***argv)
|
|
||||||
}
|
|
||||||
#endif /* BUILD_FUZZINTERFACE */
|
|
||||||
|
|
||||||
+static bool check_for_wayland(Display *dpy)
|
|
||||||
+{
|
|
||||||
+ bool has_xwayland_devices = false;
|
|
||||||
+ XDeviceInfo *info;
|
|
||||||
+ int ndevices, i;
|
|
||||||
+
|
|
||||||
+ info = XListInputDevices(dpy, &ndevices);
|
|
||||||
+ for (i = 0; i < ndevices; i++) {
|
|
||||||
+ if (strncmp(info[i].name, "xwayland-", 9) == 0) {
|
|
||||||
+ has_xwayland_devices = true;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ XFreeDeviceList(info);
|
|
||||||
+
|
|
||||||
+ return has_xwayland_devices;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
int main (int argc, char **argv)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
@@ -2880,6 +2899,13 @@ int main (int argc, char **argv)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (check_for_wayland(dpy)) {
|
|
||||||
+ fprintf(stderr,
|
|
||||||
+ "Wayland devices found but this tool is incompatible with Wayland. See\n"
|
|
||||||
+ "https://github.com/linuxwacom/xf86-input-wacom/wiki/Wayland\n");
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!do_list && !do_get && !do_set)
|
|
||||||
{
|
|
||||||
if (optind < argc)
|
|
||||||
--
|
|
||||||
2.19.2
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
Summary: Xorg X11 wacom input driver
|
Summary: Xorg X11 wacom input driver
|
||||||
Name: xorg-x11-drv-wacom
|
Name: xorg-x11-drv-wacom
|
||||||
Version: 0.36.1
|
Version: 0.38.0
|
||||||
Release: 5%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: User Interface/X Hardware Support
|
Group: User Interface/X Hardware Support
|
||||||
@ -22,8 +22,7 @@ Source2: commitid
|
|||||||
Source0: https://github.com/linuxwacom/xf86-input-wacom/releases/download/xf86-input-wacom-%{version}/xf86-input-wacom-%{version}.tar.bz2
|
Source0: https://github.com/linuxwacom/xf86-input-wacom/releases/download/xf86-input-wacom-%{version}/xf86-input-wacom-%{version}.tar.bz2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Bug 1657568 - xsetwacom doesn't warn about Wayland
|
Patch01: 0001-tools-Fix-potential-buffer-overflow-when-reading-fro.patch
|
||||||
Patch01: 0001-xsetwacom-error-if-we-re-running-this-under-Wayland.patch
|
|
||||||
|
|
||||||
BuildRequires: xorg-x11-server-devel >= 1.10.99.902
|
BuildRequires: xorg-x11-server-devel >= 1.10.99.902
|
||||||
BuildRequires: xorg-x11-util-macros >= 1.3.0
|
BuildRequires: xorg-x11-util-macros >= 1.3.0
|
||||||
@ -108,6 +107,9 @@ will be available as normal evdev node.
|
|||||||
%{_unitdir}/wacom-inputattach@.service
|
%{_unitdir}/wacom-inputattach@.service
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 04 2019 Peter Hutterer <peter.hutterer@redhat.com> 0.38.0-1
|
||||||
|
- wacom 0.38.0 (#1728822)
|
||||||
|
|
||||||
* Fri Dec 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 0.36.1-5
|
* Fri Dec 14 2018 Peter Hutterer <peter.hutterer@redhat.com> 0.36.1-5
|
||||||
- Warn when running xsetwacom on Wayland (#1657568)
|
- Warn when running xsetwacom on Wayland (#1657568)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user