gpu: host1x: Fix device reference leak in host1x_device_parse_dt() error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f4c5cf88fbd50e4779042268947b2e2f90c20484 · < c4d6442ac3ed00041fe4e1df715717ed78a7d37f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gpu: host1x: Fix device reference leak in host1x_device_parse_dt() error path
After device_initialize(), the embedded struct device in struct host1x_device should be released through the device core with put_device().
In host1x_device_add(), if host1x_device_parse_dt() fails, the current error path frees the object directly with kfree(device). That bypasses the normal device lifetime handling and leaks the reference held on the embedded struct device.
The issue was identified by a static analysis tool I developed and confirmed by manual review.
Fix this by using put_device() in the host1x_device_parse_dt() failure path.
From the CVE record · Linux
The Linux kernel’s host1x driver leaks a device reference if host1x_device_parse_dt() fails during device setup. The input does not describe an attacker action or specify network access, authentication, or user interaction requirements.
Engineers running Linux kernels with the host1x driver should check their versions; affected versions are not specified.