summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* libinput 1.18.21.18.21.18-branchPeter Hutterer2022-04-201-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* evdev: strip the device name of format directivesPeter Hutterer2022-04-207-12/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, which usually and eventually ends up being printf. If the device name contains a printf-style format directive, these ended up in the format string and thus get interpreted correctly, e.g. for a device "Foo%sBar" the log message vs printf invocation ends up being: evdev_log_message(device, "some message %s", "some argument"); printf("event9 - Foo%sBar: some message %s", "some argument"); This can enable an attacker to execute malicious code with the privileges of the process using libinput. To exploit this, an attacker needs to be able to create a kernel device with a malicious name, e.g. through /dev/uinput or a Bluetooth device. To fix this, convert any potential format directives in the device name by duplicating percentages. Pre-rendering the device to avoid the issue altogether would be nicer but the current log level hooks do not easily allow for this. The device name is the only user-controlled part of the format string. A second potential issue is the sysname of the device which is also sanitized. This issue was found by Albin Eldstål-Ahrens and Benjamin Svensson from Assured AB, and independently by Lukas Lamster. Fixes #752 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit a423d7d3269dc32a87384f79e29bb5ac021c83d1)
* libinput 1.18.11.18.1Peter Hutterer2021-08-031-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* quirks: Chuwi AeroBook Plus has a clickpad falsely claiming to have BTN_RIGHTsatrmb2021-08-021-0/+5
| | | | | Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org> (cherry picked from commit 1773973d4d0933be990d683a5ba0f79e7fe63b9c)
* Add section for Lenovo Yoga C930 tablet in 50-system-lenovo.quirks.Quytelda Kahja2021-08-021-0/+6
| | | | | | | Fixes #632. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> (cherry picked from commit fc24bba7b3f0453794fb22c2e354759e0f896c54)
* quirks: Add tablet smoothing attribute.Quytelda Kahja2021-08-025-8/+48
| | | | | | | | | | | | | https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/512 disables input smoothing for AES devices. However, some AES devices produce segmented/wobbly curves without smoothing. This change introduces an `AttrTabletSmoothing` boolean property, which overrides the default smoothing behavior. See #632 Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> (cherry picked from commit e6c4b1d16ead9c40599dcea30c1598ecb9760b7d)
* Update quirks/50-system-chuwi.quirksSanjiv2021-08-021-0/+4
| | | | | | | Author: Sanjiv <sanjerat@gmail.com> Date: Wed Jul 28 04:27:56 2021 +0000 Signed-off-by: Sanjiv Erat <sanjerat@gmail.com> (cherry picked from commit 8ee853749102cfd54be09148077edad153c45764)
* quirks: add Framework Touchpad QuirkKevin Anderson2021-08-021-0/+5
| | | | | | | Handle a bug that the touchpad announces BTN_RIGHT Signed-off-by: Kevin Anderson <andersonkw2@gmail.com> (cherry picked from commit eb2ed1863e88048bda7b15b839a51c19561332de)
* quirks: add a quirk for the X61 bezel buttonsPeter Hutterer2021-08-021-0/+5
| | | | | | | Fixes #628 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 29d311d634b8e0b249699c89107589a968ae53ac)
* quirks: add a quirk for the Purism Librem 14v1The_Observer2021-08-021-0/+7
| | | | | | | | Clickpad that announces BTN_RIGHT Fixes #629 Signed-off-by: The_Observer <The_Observer@lindemann.space> (cherry picked from commit 0a354dc16f5a6f316650dbee3064a590dc343f58)
* quirks: add pressure range for Dell Latitude 7480Mohamed Elsharnouby2021-08-021-0/+5
| | | | | | | | Pressing Ctrl/Shift on this model triggers light touches that causes random clicks. This doesn't occur on Windows 10 so adding this quirk to fix it Signed-off-by: sharno <sharnoby3@gmail.com> (cherry picked from commit 5a23665dfb66a846e116054d4ec7f875208c1248)
* quirks: add volume rocker quirk for Lenovo Duet 7iThomas Stenhouse-Pyne2021-08-021-0/+6
| | | | | Signed-off-by: Thomas Stenhouse-Pyne <tommpyne@gmail.com> (cherry picked from commit 0ddb26a068576fe7ce48731dc673f4f7f58c7f76)
* quirks: add a quirk for the Huawei Matebook 2020 touchpadPeter Hutterer2021-08-021-0/+7
| | | | | | | | | Clickpad that announces BTN_RIGHT https://bugzilla.redhat.com/show_bug.cgi?id=1972370 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 17783c24df991e6283c693050d6b0304b7307d3e)
* libinput 1.18.01.18.0Peter Hutterer2021-06-021-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Update 50-system-asus.quirks to include Asus G15 Zephyrus quirk.Neev Parikh2021-06-011-0/+9
| | | | Signed-off-by: Neev Parikh <neev.v.parikh@gmail.com>
* libinput 1.17.9011.17.901Peter Hutterer2021-05-261-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gitlab CI: use FDO_CI_CONCURRENT in our meson build scriptPeter Hutterer2021-05-251-0/+3
| | | | | | | | | | Always prefix the ninja args with the FDO_CI_CONCURRENT values (i.e. how many jobs the runner tells us). Note that this variable is currently not passed through to the qemu jobs, so inside the VM we'll still use the ninja default values. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* doc/user: #wayland is now on oftcPeter Hutterer2021-05-251-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: cleanup: remove fallthrough followed by breakJosé Expósito2021-05-241-84/+0
| | | | | | | Remove fallthrough comments followed by a break statement. No functional changes. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
* use more safety list_for_each_safe when remove element in traversing listweizhixiang2021-05-243-3/+3
| | | | Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
* use ARRAY_FOR_EACH when traverse arrayweizhixiang2021-05-242-13/+14
| | | | Signed-off-by: weizhixiang <weizhixiang@uniontech.com>
* evdev: restart debouncing timers after every eventsatrmb2021-05-193-2/+141
| | | | Signed-off-by: satrmb <10471-satrmb@users.noreply.gitlab.freedesktop.org>
* Increase pinch grace period to 300msnovenary2021-05-191-1/+1
| | | | | | | | | Windows allows "about a third of a second" to trigger a two-finger pinch. https://gitlab.freedesktop.org/libinput/libinput/-/issues/550#implementation-in-other-systems Signed-off-by: novenary <streetwalkermc@gmail.com>
* Allow reviving a thumb that moves sufficientlynovenary2021-05-193-0/+42
| | | | | | | | | When pinching, the thumb tends to move slower than the finger, so we may suppress it too early. Add a grace period during which it may be revived. Signed-off-by: novenary <streetwalkermc@gmail.com>
* Improve disambiguation between two-finger pinch and scrollnovenary2021-05-192-3/+42
| | | | | | | | | | | | | | | | | | A pinch is defined as two fingers moving in different directions, and a scroll as two fingers moving in the same direction. Often enough when the user is trying to pinch, we may initially see both fingers moving in the same direction and decide that they want to scroll. Add a grace period during which we may transition to a pinch in those situations. Test fix: touchpad_trackpoint_buttons_2fg_scroll emits movements that change the distance between fingers, which triggers this new transition and makes the test fail; correct this. Signed-off-by: novenary <streetwalkermc@gmail.com>
* quirks: add palm rejection support for all Razer Blade modelsdan g2021-05-191-7/+155
| | | | | | | | | | | | Generated with a script to scrape the openrazer project for Razer Blade internal keyboard VIDs, see `razer_quirk_util.py` [1] This allows us to potentially bulk-add all Razer Blade models to benefit from palm rejection, rather than processing individual requests and merges. [1] https://gist.github.com/danryu/ee0c24ac50af40321550462bbf9ab594 Signed-off-by: dan g <dan.garton@gmail.com>
* tools/record: narrow down the obfuscation rangePeter Hutterer2021-05-181-3/+12
| | | | | | | Let a few obvious modifiers through, including the F-key range. Especially left control is useful to know if it's down. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/replay: do not replay key repeat eventsPeter Hutterer2021-05-182-8/+29
| | | | | | | | | The kernel emulates key events on its own anyway, replaying key events with libinput replay as well just duplicates the events. Turning kernel repeat off is not an option, it makes the device look different (EV_REP changes). So let's just not replay those events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gitlab CI: add a JUnit XML report for scan-buildPeter Hutterer2021-05-124-12/+145
| | | | | | | | Use a scan-build wrapper to generate plist files, then parse those into a JUnit xml format. This makes the errors appear on the main MR page as opposed to being hidden in the artifacts somewhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* editorconfig: add settings for python filesPeter Hutterer2021-05-121-3/+9
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gitlab CI: bump from Fedora 32 to 34Peter Hutterer2021-05-123-56/+56
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/record: add support for hidraw recordingPeter Hutterer2021-05-054-5/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | New commandline switch --with-hidraw. This will open all hidraw devices associated with this device and add any reports to the output in the form: events: - hid: time: [0, 0] hidraw1: [0x01, 0x02, 0x03, 0x05, 0x06] hidraw2: [0x07, 0x08, 0x09, 0x0a, 0x0b] - evdev: ... i.e. there's a nesting of `hid` with a list of reports, each with the hidraw node as dictionary entry. Because hidraw events do not have timestamps and always occur before the evdev events, they are in a separate frame (as shown above). We could try to figure out how to match them with the upcoming evdev frame but it's not worth it for now. The timestamp itself is a special key in the hidraw with the timestamp from clock_gettime. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* meson.build: bump to 1.17.900Peter Hutterer2021-05-051-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* doc/user: Add instructions for using with CMakeNicolas Fella2021-05-041-0/+5
| | | | | | CMake provides a nice way to use libinput, let the world now. Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
* Add quirk for Lenovo Legion 5 Pro.Hans Gaiser2021-05-041-0/+8
| | | | Signed-off-by: Hans Gaiser <hansg91@gmail.com>
* tools/record: linebreak the hid report descriptor every 16 bytesPeter Hutterer2021-04-301-2/+16
| | | | | | | | | | | | New output: hid: [ 0x05, 0x0d, 0x09, 0x04, 0xa1, 0x01, 0x85, 0x01, 0x09, 0x22, 0xa1, 0x02, 0x09, 0x42, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x01, 0x81, 0x02, 0x75, 0x01, 0x81, 0x03, 0x75, 0x06, 0x09, 0x51, 0x25, 0x3f, 0x81, 0x02, 0x26, 0xff, 0x00, 0x75, 0x08, 0x09, 0x48, 0x81, 0x02, 0x09, 0x49, 0x81, ... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/record: print the HID report descriptor as hexPeter Hutterer2021-04-301-2/+1
| | | | | | | | | YAML does support hex as long as it's 0x-prefixed. The comment here (probably) dates from an in-development version of libinput-record that used JSON. Anyway, let's print the HID report descriptor as hex because that's the common format for it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools/record: fix a strlen assumptionPeter Hutterer2021-04-301-1/+1
| | | | | | We want to be able to print single-character strings. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Change various references to the master branch to mainPeter Hutterer2021-04-297-12/+12
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* doc/user: fix a link to the system hwdb filePeter Hutterer2021-04-291-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gitlab CI: switch to Ubuntu 21.04Peter Hutterer2021-04-232-15/+15
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: if we have a right button, let's assume it's not a clickpadPeter Hutterer2021-04-212-14/+32
| | | | | | | | | | | | | | | | | | This assumption dates back roughly a decade when INPUT_PROP_BUTTONPAD was introduced into the kernel. To my knowledge, devices right now erroneously advertise INPUT_PROP_BUTTONPAD when they are not a clickpad (but then they have BTN_RIGHT) or they lack INPUT_PROP_BUTTONPAD (and only have BTN_LEFT). So let's change our assumption here - if a clickpad has a right button log the kernel bug and continue with the assumption the device is a touchpad with physical buttons. To disable that warning, fix the kernel or add an AttrInputPropDisable quirk for the device. Fixes #595 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: a touchpad with only one button is a clickpadPeter Hutterer2021-04-212-1/+61
| | | | | | | | | | | | | | | | There is only one touchpad with a physical left button but no right button and that is the old Apple touchpad, discontinued in 2008. Not a huge number of those left, I assume. So let's change our assumptions because these days the vast majority of touchpads are clickpads - any touchpad that only has a left button is treated as clickpad, even where the kernel doesn't set the INPUT_PROP_BUTTONPAD. We do need to check for BTN_LEFT as well though, because Wacom touchpads (i.e. the touch part of non-integrated Wacom tablets) don't have a left button either. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: use some helper variables to make the code easier to readPeter Hutterer2021-04-211-3/+6
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* touchpad: factor out clickpad assignment to a helperPeter Hutterer2021-04-211-12/+22
| | | | | | No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* quirks: add quirk for Lenovo Yoga Slim 9 TouchpadUdo Rader2021-04-201-0/+9
| | | | | | | | | This touchpad is a pressure pad and needs the pressure handling disabled. Fixes #604 Signed-off-by: Udo Rader <udo.rader@bestsolution.at>
* quirks: add palm size quirk for the Gigabyte Aero 15Peter Hutterer2021-04-141-0/+5
| | | | | | Fixes #599 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* gestures: move the logic to detect gestures to its own functionJoseExposito2021-04-131-64/+70
| | | | | | | Move the code in used to detect motion based gestures (scroll, swipe and pinch) to tp_gesture_detect_motion_gestures. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
* gestures: move up some functions to use them laterJoseExposito2021-04-131-36/+37
| | | | | | | Move tp_gesture_same_directions, tp_gesture_mm_moved and tp_gesture_init_pinch to be able to use them in future commits. Signed-off-by: José Expósito <jose.exposito89@gmail.com>
* gestures: move the code to get raw pointer motion to its own functionJoseExposito2021-04-131-3/+12
| | | | Signed-off-by: José Expósito <jose.exposito89@gmail.com>