drm/vc4: hvs/v3d: Fix null dereference in unbind
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c8b75bca92cbf064b9fa125fc74a85994452e935 · < 7dc3680b7ffe01add3e9299fde8471d2dd53a8ae| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/vc4: hvs/v3d: Fix null dereference in unbind
The hvs and v3d drivers use dev_get_drvdata(master) in their unbind functions. Since the vc4-drm gets removed before its dependent drivers (vc4_hvs/vc4_v3d) the vc4_hvs_unbind/vc4_v3d_unbind functions try to get drvdata of its master and fails with a null dereference error.
Use the data pointer passed to the unbind functions directly instead of dev_get_drvdata(master). This avoids using potentially freed memory.
From the CVE record · Linux
The Linux kernel's vc4 HVS and V3D drivers can hit a null dereference during unbind because vc4-drm is removed before its dependent drivers. The input does not describe an attacker scenario or specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the vc4 HVS or V3D drivers should check their systems; affected versions are not specified.