fwupd/plugins/wacom-usb
Richard Hughes 3162c8540d Add new API for splitting an untrusted string
Using fu_common_strnsplit() has the drawback that a malicious user (or
a fuzzer!) could create a file with 5,000,000 newlines, and then pass
that into any parser that tokenizes into lines. This causes millions of
tiny allocations and quickly dirties hundreds of megabytes of RSS due
to heap overheads.

Rather than splitting a huge array and then processing each line, set
up a callback to process each line and only allocate the next string if
the token was parsed correctly. This means that we don't even dup the
buffer before we start parsing, rather than allocating everything and
then failing at the first hurdle.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38696
2021-09-17 14:46:45 +01:00
..
data trivial: Add some debugging data to wacom-usb 2019-01-02 09:50:39 +00:00
fu-plugin-wacom-usb.c Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-self-test.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-android-device.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-android-device.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-common.c trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-common.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-device.c Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-wac-device.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-firmware.c Add new API for splitting an untrusted string 2021-09-17 14:46:45 +01:00
fu-wac-firmware.h trivial: reformat the whole tree to match new format 2021-08-24 11:18:40 -05:00
fu-wac-module-bluetooth.c Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-wac-module-bluetooth.h trivial: Set the context on FuWacModuleBluetooth 2021-09-08 12:08:33 +01:00
fu-wac-module-touch.c Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-wac-module-touch.h wacom-usb: Also set the context for FuWacModuleTouch 2021-09-08 15:49:19 +01:00
fu-wac-module.c Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
fu-wac-module.h Allow using a per-device global percentage completion 2021-09-13 14:28:15 +01:00
meson.build wacom-usb: Show the user how to switch out of Android-mode 2021-06-15 14:15:22 +01:00
README.md trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
wacom-usb.quirk wacom-usb: Add "no serial" flag to other CTL-X100 products 2021-06-18 16:55:33 +01:00

Wacom USB

Introduction

Wacom provides interactive pen displays, pen tablets, and styluses to equip and inspire everyone make the world a more creative place.

From 2016 Wacom has been using a HID-based proprietary flashing algorithm which has been documented by support team at Wacom and provided under NDA under the understanding it would be used to build a plugin under a LGPLv2+ license.

Wacom devices are actually composite devices, with the main ARM CPU being programmed using a more complicated erase, write, verify algorithm based on a historical update protocol. The "sub-module" devices use a newer protocol, again based on HID, but are handled differently depending on their type.

Firmware Format

The daemon will decompress the cabinet archive and extract a firmware blob in the following formats:

  • Touch module: Intel HEX file format
  • Bluetooth module: Unknown airoflash file format
  • EMR module: Plain SREC file format
  • Main module: SREC file format, with a custom WACOM vendor header

This plugin supports the following protocol ID:

  • com.wacom.usb

GUID Generation

These devices use the standard USB DeviceInstanceId values, e.g.

  • USB\VID_056A&PID_0378&REV_0001
  • USB\VID_056A&PID_0378
  • USB\VID_056A

Update Behavior

The firmware is deployed when the device is in normal runtime mode, and the device will reset when the new firmware has been written.

Vendor ID Security

The vendor ID is set from the USB vendor, for example set to USB:0x056A

External Interface Access

This plugin requires read/write access to /dev/bus/usb.