CVE-2026-90041 PUBLISHED

HID: sony: clean up device list on probe failure

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

HID: sony: clean up device list on probe failure

sony_input_configured() adds some controllers to sony_device_list before HID core registers their input devices. input_register_device() can fail after the callback returns successfully. sony_probe() then observes that HID_CLAIMED_INPUT is clear and unwinds, but only stops the HID hardware. The devres-managed sony_sc is freed while its list node remains linked, so the next matching controller traverses freed memory.

Initialize the list node and device ID to inactive states. Make list removal idempotent and run the driver-private cleanup on every probe failure path. This also makes a second cleanup safe when sony_input_configured() already unwound a partial initialization before sony_probe() handles the missing input claim.

Found by 0sec (https://0sec.ai) using automated source analysis; verified against the HID input registration and probe unwind paths.

Metrics

CVSS Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 8.8

AV:A - hid-sony binds HID_BLUETOOTH_DEVICE IDs for Sixaxis/DualShock 3 (Sony 0x0268), Navigation, Motion, and related controllers, so a nearby Bluetooth HID/HIDP peer spoofing those identities reaches sony_probe() and sony_check_add() over L2CAP; USB enumeration is only a lower-severity physical path. AC:L - A rogue controller fully controls the HID descriptor and feature-report replies used in sony_input_configured(), which links sony_sc onto sony_device_list before input_register_device(); the attacker then reconnects a second matching device so sony_check_add_dev_list() walks the dangling node, with no race outside its control. PR:N - A malicious Bluetooth HID peripheral is sufficient: hidp/usbhid enumerates the device and sony_probe() runs during bind, with no local account, capability, or init-namespace privilege required on the victim. UI:N - sony_input_configured() and the HID_CLAIMED_INPUT unwind run from hid_hw_start() as soon as the spoofed Sixaxis/Motion/Navigation device connects or auto-reconnects; no extra victim open, mount, or confirmation is required. S:U - The use-after-free is of driver-private sony_sc on the host kernel HID list and does not cross a VM, IOMMU, or other separate security authority. C:H - After probe fails, devres frees sony_sc while sony_device_list still points at it; the next sony_check_add_dev_list() list_for_each_entry() reads mac_address and list pointers from the freed heap object, and UAF of this structure enables arbitrary kernel disclosure via spray/reuse. I:H - The dangling list_node is embedded in sony_sc alongside send_output_report, work_struct, and hid_device pointers; a second probe's list walk and later driver callbacks on a sprayed object yield an attacker-controlled kernel write and control-flow hijack primitive. A:H - Walking the freed list_node in sony_check_add_dev_list() is a KASAN slab-use-after-free and causes a kernel oops or panic when the slot is not reused, so any trigger of this UAF is a full host denial of service.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 4f967f6d73746f66514528cc1191025f0b5d69b3 to 3b4709e4864908bb06c48c500cc8db8d3d55d139 (excl.)
  • affected from 4f967f6d73746f66514528cc1191025f0b5d69b3 to d044d796e2a369c6051c7e83dce88c7baa2494d4 (excl.)
  • affected from 4f967f6d73746f66514528cc1191025f0b5d69b3 to 7c65699a3a311198a07659a614fe64d45924839e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.10 is affected
  • unaffected from 0 to 4.10 (excl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References