media: platform: mtk-mdp3: Add missing check and free for ida_alloc
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: platform: mtk-mdp3: Add missing check and free for ida_alloc
Add the check for the return value of the ida_alloc in order to avoid NULL pointer dereference. Moreover, free allocated "ctx->id" if mdp_m2m_open fails later in order to avoid memory leak.
From the CVE record · Linux
The Linux kernel's mtk-mdp3 media driver lacks a check for the return value of ida_alloc, which can lead to a NULL pointer dereference. A failure later in mdp_m2m_open can also leak an allocated ID. The input does not specify how an attacker could trigger these issues or whether access or user interaction is required.
Engineers running Linux kernels with the mtk-mdp3 driver should check their versions; affected versions are not specified.