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.
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.
| Attack Vector |
Adjacent Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
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.
CVSS 3.1