fwupd/plugins/unifying
Richard Hughes 5308ea4fae Never use memcpy() in a possibly unsafe way
There are several subtle bugs in various places in fwupd caused by not treating
user-provided offsets into buffers as unsafe. As fwupd runs as root we have to
assume that all user firmware is evil, and also that devices cannot be trusted.

Make a helper to put all the logic into one place and convert all users.
2019-08-12 09:22:09 -05:00
..
data Add support for Logitech Unifying devices 2016-12-12 15:36:53 +00:00
fu-plugin-unifying.c Allow handling FORCE for devices that subclass FuDevice 2019-05-05 15:29:00 -05:00
fu-unifying-bootloader-nordic.c Use FuFirmware as a container for firmware images 2019-08-08 13:10:57 +01:00
fu-unifying-bootloader-nordic.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-bootloader-texas.c Use FuFirmware as a container for firmware images 2019-08-08 13:10:57 +01:00
fu-unifying-bootloader-texas.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-bootloader.c Never use memcpy() in a possibly unsafe way 2019-08-12 09:22:09 -05:00
fu-unifying-bootloader.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-common.c Add shared functionality for reading and writing with O_NONBLOCK 2018-12-06 14:07:02 +00:00
fu-unifying-common.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-hidpp-msg.c unifying: Use the new daemon-provided functionality 2018-09-07 16:22:38 +01:00
fu-unifying-hidpp-msg.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-hidpp.c Add shared functionality for reading and writing with O_NONBLOCK 2018-12-06 14:07:02 +00:00
fu-unifying-hidpp.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-peripheral.c Use FuFirmware as a container for firmware images 2019-08-08 13:10:57 +01:00
fu-unifying-peripheral.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-runtime.c Never use memcpy() in a possibly unsafe way 2019-08-12 09:22:09 -05:00
fu-unifying-runtime.h Use '#pragma once' to avoid a lot of boilerplate 2019-02-09 08:42:30 -06:00
fu-unifying-self-test.c unifying: Use the new daemon-provided functionality 2018-09-07 16:22:38 +01:00
meson.build trivial: Fix potential compile failures for high -j values 2019-02-01 16:52:16 +00:00
README.md Fix some typos spotted using codespell 2019-04-08 12:47:53 +01:00
unifying.quirk trivial: Add InstallDuration values for Unifying devices 2018-11-15 15:43:43 +00:00

Unifying Support

Introduction

This plugin can flash the firmware on Logitech Unifying dongles, both the Nordic (U0007) device and the Texas Instruments (U0008) version.

This plugin will not work with the different "Nano" dongle (U0010) as it does not use the Unifying protocol.

Some bootloader protocol information was taken from the Mousejack[1] project, specifically logitech-usb-restore.py and unifying.py. Other documentation was supplied by Logitech.

Additional constants were taken from the Solaar[2] project.

Firmware Format

The daemon will decompress the cabinet archive and extract a firmware blob in a vendor-specific format that appears to be a subset of the Intel HEX format.

This plugin supports the following protocol IDs:

  • com.logitech.unifying
  • com.logitech.unifyingsigned

GUID Generation

These devices use the standard USB DeviceInstanceId values when in DFU mode:

  • USB\VID_046D&PID_AAAA&REV_0001
  • USB\VID_046D&PID_AAAA
  • USB\VID_046D

When in runtime mode, the HID raw DeviceInstanceId values are used:

  • HIDRAW\VEN_046D&DEV_C52B
  • HIDRAW\VEN_046D

Design Notes

When a dongle is detected in bootloader mode we detach the hidraw driver from the kernel and use raw control transfers. This ensures that we don't accidentally corrupt the uploading firmware. For application firmware we use hidraw which means the hardware keeps working while probing, and also allows us to detect paired devices.

[1] https://www.mousejack.com/ [2] https://pwr.github.io/Solaar/