Bug#838703: libinput10: leads to a crash of X when working in a virtual tty
Package: libinput10
Version: 1.5.0-1
Severity: important
Tags: upstream patch
When starting an X session with startx and changing to a virtual console using
ctl+alt+f<number>, X is crashing after a while. Looking at the libinput code,
there's a null pointer in the code, which is dereferenced without a check.
The attached patch fixes the problem.
I've set the priority to important, since I use virtual consoles for most of my
daily work (due to accessibility reasons) and need to switch to an X session
frequently to access the web. Restarting the X server every time means a
considerable overhead.
-- System Information:
Debian Release: stretch/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libinput10 depends on:
ii libc6 2.23-5
ii libevdev2 1.5.4+dfsg-1
ii libinput-bin 1.5.0-1
ii libmtdev1 1.1.5-1
ii libudev1 231-4
ii libwacom2 0.19-1
libinput10 recommends no packages.
libinput10 suggests no packages.
-- no debconf information
Index: libinput/src/evdev.c
===================================================================
--- libinput.orig/src/evdev.c
+++ libinput/src/evdev.c
@@ -259,7 +259,9 @@ evdev_device_led_update(struct evdev_dev
struct input_event ev[ARRAY_LENGTH(map) + 1];
unsigned int i;
- if (!(device->seat_caps & EVDEV_DEVICE_KEYBOARD))
+ if (device == NULL)
+ return;
+ else if (!(device->seat_caps & EVDEV_DEVICE_KEYBOARD))
return;
memset(ev, 0, sizeof(ev));
Reply to: