# CVE-2024-50287: media: v4l2-tpg: prevent the risk of a division by zero

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.25%, higher than 18% of CVEs (2026-12-01)
- Published: 2024-11-19T01:30:31.338Z
- Modified: 2026-06-17T08:04:07.870Z
- Weaknesses: CWE-369
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before e3c36d0bde309f690ed1f9cd5f7e63b3a513f94a; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before 0bfc6e38ee2250f0503d96f1a1de441c31d88715; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before 054931ca3cfcb8e8fa036e887d6f379942b02565; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before a749c15dccc58d9cbad9cd23bd8ab4b5fa96cf47; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before c63c30c9d9f2c8de34b16cd2b8400240533b914e; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before 2d0f01aa602fd15a805771bdf3f4d9a9b4df7f47; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before 0cdb42ba0b28f548c1a4e86bb8489dba0d78fc21; from 63881df94d3ecbb0deafa0b77da62ff2f32961c4 before e6a3ea83fbe15d4818d01804e904cbb0e64e543b; 3.18 (not affected: before 3.18; from 4.19.324 up to 4.19.*; from 5.4.286 up to 5.4.*; from 5.10.230 up to 5.10.*; from 5.15.172 up to 5.15.*; from 6.1.117 up to 6.1.*; from 6.6.61 up to 6.6.*; from 6.11.8 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 3.18 before 4.19.324; from 4.20 before 5.4.286; from 5.5 before 5.10.230; from 5.11 before 5.15.172; from 5.16 before 6.1.117; from 6.2 before 6.6.61; from 6.7 before 6.11.8; 6.12

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/e3c36d0bde309f690ed1f9cd5f7e63b3a513f94a> (patch)
- <https://git.kernel.org/stable/c/0bfc6e38ee2250f0503d96f1a1de441c31d88715> (patch)
- <https://git.kernel.org/stable/c/054931ca3cfcb8e8fa036e887d6f379942b02565> (patch)
- <https://git.kernel.org/stable/c/a749c15dccc58d9cbad9cd23bd8ab4b5fa96cf47> (patch)
- <https://git.kernel.org/stable/c/c63c30c9d9f2c8de34b16cd2b8400240533b914e> (patch)
- <https://git.kernel.org/stable/c/2d0f01aa602fd15a805771bdf3f4d9a9b4df7f47> (patch)
- <https://git.kernel.org/stable/c/0cdb42ba0b28f548c1a4e86bb8489dba0d78fc21> (patch)
- <https://git.kernel.org/stable/c/e6a3ea83fbe15d4818d01804e904cbb0e64e543b> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-50287](https://www.cve.org/CVERecord?id=CVE-2024-50287), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-50287](https://nvd.nist.gov/vuln/detail/CVE-2024-50287), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-50287 · Whole record: https://cve.day/CVE-2024-50287.json · Rebuilt by cve.day 2026-11-25T22:58:48.415Z
