most: usb: hdm_probe: Fix calling put_device() before device initialization
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 97a6f772f36b7f52bcfa56a581bbd2470cffe23d · < 4af0eedbdb4df7936bf43a28e31af232744d2620| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
most: usb: hdm_probe: Fix calling put_device() before device initialization
The early error path in hdm_probe() can jump to err_free_mdev before &mdev->dev has been initialized with device_initialize(). Calling put_device(&mdev->dev) there triggers a device core WARN and ends up invoking kref_put(&kobj->kref, kobject_release) on an uninitialized kobject.
In this path the private struct was only kmalloc'ed and the intended release is effectively kfree(mdev) anyway, so free it directly instead of calling put_device() on an uninitialized device.
This removes the WARNING and fixes the pre-initialization error path.
From the CVE record · Linux
The Linux kernel’s MOST USB hdm_probe() can call put_device() before the device is initialized if an early error occurs. This triggers a device-core warning and operates on an uninitialized kobject. The input does not describe an attacker scenario, authentication requirement, or user interaction.
Engineers running the Linux kernel should check whether their kernel includes this fix; affected versions are not specified.