media: rockchip: rga: Fix possible ERR_PTR dereference in rga_buf_init()
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:
media: rockchip: rga: Fix possible ERR_PTR dereference in rga_buf_init()
rga_get_frame() can return ERR_PTR(-EINVAL) when buffer type is unsupported or invalid. rga_buf_init() does not check the return value and unconditionally dereferences the pointer when accessing f->size.
Add proper ERR_PTR checking and return the error to prevent dereferencing an invalid pointer.
From the CVE record · Linux
The Linux kernel's Rockchip RGA driver does not check whether rga_get_frame() returned an error pointer before dereferencing it in rga_buf_init(). This can occur when the buffer type is unsupported or invalid; the input does not specify how an attacker could trigger it or whether authentication or user interaction is required.
Engineers running Linux kernels with the Rockchip RGA driver should check their versions; affected versions are not specified.