CVE-2024-56545
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
27/12/2024
Last modified:
08/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
HID: hyperv: streamline driver probe to avoid devres issues<br />
<br />
It was found that unloading &#39;hid_hyperv&#39; module results in a devres<br />
complaint:<br />
<br />
...<br />
hv_vmbus: unregistering driver hid_hyperv<br />
------------[ cut here ]------------<br />
WARNING: CPU: 2 PID: 3983 at drivers/base/devres.c:691 devres_release_group+0x1f2/0x2c0<br />
...<br />
Call Trace:<br />
<br />
? devres_release_group+0x1f2/0x2c0<br />
? __warn+0xd1/0x1c0<br />
? devres_release_group+0x1f2/0x2c0<br />
? report_bug+0x32a/0x3c0<br />
? handle_bug+0x53/0xa0<br />
? exc_invalid_op+0x18/0x50<br />
? asm_exc_invalid_op+0x1a/0x20<br />
? devres_release_group+0x1f2/0x2c0<br />
? devres_release_group+0x90/0x2c0<br />
? rcu_is_watching+0x15/0xb0<br />
? __pfx_devres_release_group+0x10/0x10<br />
hid_device_remove+0xf5/0x220<br />
device_release_driver_internal+0x371/0x540<br />
? klist_put+0xf3/0x170<br />
bus_remove_device+0x1f1/0x3f0<br />
device_del+0x33f/0x8c0<br />
? __pfx_device_del+0x10/0x10<br />
? cleanup_srcu_struct+0x337/0x500<br />
hid_destroy_device+0xc8/0x130<br />
mousevsc_remove+0xd2/0x1d0 [hid_hyperv]<br />
device_release_driver_internal+0x371/0x540<br />
driver_detach+0xc5/0x180<br />
bus_remove_driver+0x11e/0x2a0<br />
? __mutex_unlock_slowpath+0x160/0x5e0<br />
vmbus_driver_unregister+0x62/0x2b0 [hv_vmbus]<br />
...<br />
<br />
And the issue seems to be that the corresponding devres group is not<br />
allocated. Normally, devres_open_group() is called from<br />
__hid_device_probe() but Hyper-V HID driver overrides &#39;hid_dev->driver&#39;<br />
with &#39;mousevsc_hid_driver&#39; stub and basically re-implements<br />
__hid_device_probe() by calling hid_parse() and hid_hw_start() but not<br />
devres_open_group(). hid_device_probe() does not call __hid_device_probe()<br />
for it. Later, when the driver is removed, hid_device_remove() calls<br />
devres_release_group() as it doesn&#39;t check whether hdev->driver was<br />
initially overridden or not.<br />
<br />
The issue seems to be related to the commit 62c68e7cee33 ("HID: ensure<br />
timely release of driver-allocated resources") but the commit itself seems<br />
to be correct.<br />
<br />
Fix the issue by dropping the &#39;hid_dev->driver&#39; override and using<br />
hid_register_driver()/hid_unregister_driver() instead. Alternatively, it<br />
would have been possible to rely on the default handling but<br />
HID_CONNECT_DEFAULT implies HID_CONNECT_HIDRAW and it doesn&#39;t seem to work<br />
for mousevsc as-is.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.5 (including) | 6.6.64 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.11.11 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.12 (including) | 6.12.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



