media: v4l2-tpg: prevent the risk of a division by zero
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 63881df94d3ecbb0deafa0b77da62ff2f32961c4 · < 2d0f01aa602fd15a805771bdf3f4d9a9b4df7f47| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: v4l2-tpg: prevent the risk of a division by zero
As reported by Coverity, the logic at tpg_precalculate_line() blindly rescales the buffer even when scaled_witdh is equal to zero. If this ever happens, this will cause a division by zero.
Instead, add a WARN_ON_ONCE() to trigger such cases and return without doing any precalculation.
From the CVE record · Linux
The Linux kernel's v4l2-tpg code can divide by zero in tpg_precalculate_line() if scaled_width is zero. The input does not describe how an attacker could trigger this condition or specify network access, authentication, or user interaction requirements.
Engineers running the Linux kernel should check their versions against the vendor advisory; affected versions are not specified.