drm/xe/hw_engine: Fix double-free of managed BO in error path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/xe/hw_engine: Fix double-free of managed BO in error path
The error path in hw_engine_init() explicitly frees a BO allocated with xe_managed_bo_create_pin_map() via xe_bo_unpin_map_no_vm(). Since the managed BO already has a devm cleanup action registered, this causes a double-free when devm unwinds during probe failure.
Remove the explicit free and let devm handle it, consistent with all other xe_managed_bo_create_pin_map() callers.
(cherry picked from commit e459a3bdeb117be496d7f229e2ea1f6c9fe4080b)
From the CVE record · Linux
The Linux kernel’s drm/xe/hw_engine initialization error path explicitly frees a managed buffer object that is also registered for automatic cleanup. This causes a double-free when cleanup runs after a probe failure. The input does not establish how an attacker could trigger the failure or whether authentication or user interaction is required.
Engineers running Linux kernels with the drm/xe driver should check whether their kernel includes the affected code; affected versions are not specified.