media: mtk-jpeg: cancel workqueue on release for supported platforms only
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
e78c39f720679fcf3a2eacd82725ec3ea2648301| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: mtk-jpeg: cancel workqueue on release for supported platforms only
Since a recent fix the mtk_jpeg_release function cancels any pending or running work present in the driver workqueue using cancel_work_sync function. Currently, only the multicore based variants use this workqueue and they have the jpeg_worker platform data field initialized with a workqueue callback function. For the others, this field value remain NULL by default. The cancel_work_sync function is unconditionally called in mtk_jpeg_release function, even for the variants that do not use the workqueue. This call generates a WARN_ON print in __flush_work because the workqueue callback function presence check fails in __flush_work function (used by cancel_work_sync).
So, to avoid these warnings, call cancel_work_sync only if a workqueue callback is defined in platform data.
From the CVE record · Linux
The Linux kernel's mtk-jpeg driver unconditionally cancels work during release, including on platform variants that do not use the workqueue. On those variants, the call triggers a kernel warning. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with the mtk-jpeg driver should check whether their kernel includes the fix; affected versions are not specified.