CVE-2026-80740: drm/log: Fix infinite loop when scale is too large for display
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/log: Fix infinite loop when scale is too large for display
When scale is large enough that scaled_font exceeds the display dimensions, rows or columns become 0. A columns value of 0 causes an infinite loop in drm_log_draw_kmsg_record() because the loop never decrements len.
Check for zero rows/columns in drm_log_setup_modeset() and return an error, cleaning up the already allocated buffer to avoid a leak.
The Linux kernel CVE team has assigned CVE-2026-80740 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit 8a4b913df427b8f900bcc7849cc15a7b81628d57 and fixed in 6.18.46 with commit a7d172b27aa3e1ad56e39949bfe4e5caa25fb20b Issue introduced in 6.14 with commit 8a4b913df427b8f900bcc7849cc15a7b81628d57 and fixed in 7.1.10 with commit 50ca4dbbaf3eb6deb74daca360b4dabc739a6fa6 Issue introduced in 6.14 with commit 8a4b913df427b8f900bcc7849cc15a7b81628d57 and fixed in 7.2 with commit f4f2bba28df9b9aaa00262a462139dbbcdc38d9f
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-80740
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/clients/drm_log.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/a7d172b27aa3e1ad56e39949bfe4e5caa25fb20b https://git.kernel.org/stable/c/50ca4dbbaf3eb6deb74daca360b4dabc739a6fa6 https://git.kernel.org/stable/c/f4f2bba28df9b9aaa00262a462139dbbcdc38d9f