drm/imagination: Fix user array stride in pvr_set_uobj_array()
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/imagination: Fix user array stride in pvr_set_uobj_array()
pvr_set_uobj_array() copies an array of kernel objects to a userspace array whose element size is described by out->stride. When out->stride is different from the kernel object size, the slow path advances the userspace pointer by the kernel object size and the kernel pointer by the userspace stride.
This reverses the intended layout. For larger userspace strides, later copies read from the wrong kernel addresses. For smaller userspace strides, later copies are written at the wrong userspace offsets. The padding clear is also done only for the first element instead of the padding area for each element.
Advance the userspace pointer by out->stride and the kernel pointer by obj_size, and clear per-element padding while the current userspace pointer is still available.
From the CVE record · Linux
The Linux kernel’s drm/imagination driver mishandles userspace array strides that differ from the kernel object size. A local userspace caller can receive data copied from the wrong kernel addresses or written at the wrong userspace offsets; per-element padding is also cleared incorrectly. The input does not specify whether authentication is required.
Engineers running Linux kernels with the drm/imagination driver should check whether their kernel includes the fix; affected versions are not specified.