CVE-2025-38312: fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()

Published Jul 10, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

fbdev: core: fbcvt: avoid division by 0 in fbcvthperiod()

In fbfindmodecvt(), iff mode->refresh somehow happens to be 0x80000000, cvt.frefresh will become 0 when multiplying it by 2 due to overflow. It's then passed to fbcvthperiod(), where it's used as a divider -- division by 0 will result in kernel oops. Add a sanity check for cvt.frefresh to avoid such overflow...

Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.

Affected Software

9 affected components
Linux Kernel
Linux Linux kernel>=2.6.14<5.4.295
Linux Linux kernel>=5.5<5.10.239
Linux Linux kernel>=5.11<5.15.186
Linux Linux kernel>=5.16<6.1.142
Linux Linux kernel>=6.2<6.6.94
Linux Linux kernel>=6.7<6.12.34
Linux Linux kernel>=6.13<6.15.3
Debian Debian Linux=11.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In fb_find_mode_cvt(), when mode->refresh == 0x80000000 causes cvt.f_refresh to overflow such that it becomes 0 (after multiplying by 2), add a sanity check in fb_cvt_hperiod() to prevent division by 0 by rejecting/handling cvt.f_refresh==0 before it is used as a divider.

    Linux kernel fbdev (fb_cvt_hperiod / fb_find_mode_cvt) cvt.f_refresh = Validate cvt.f_refresh != 0 before use as a divider (add sanity check)

Event History

Jul 10, 2025
CVE Published
via MITRE·07:42 AM
Data Sourced
via MITRE·07:42 AM
Description
Data Sourced
via NVD·08:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-38312?

The severity of CVE-2025-38312 is considered to be medium due to potential denial of service risks associated with the division by zero condition.

2

How do I fix CVE-2025-38312?

To fix CVE-2025-38312, update your Linux kernel to the latest version that includes the patch for this vulnerability.

3

What versions of the Linux Kernel are affected by CVE-2025-38312?

CVE-2025-38312 affects various versions of the Linux Kernel prior to the patch being applied; it is best to refer to your specific kernel version for details.

4

What components are involved in CVE-2025-38312?

CVE-2025-38312 involves the fbdev subsystem specifically the fb_cvt_hperiod() function, which leads to issues with framebuffer mode setting.

5

Is CVE-2025-38312 a critical vulnerability?

CVE-2025-38312 is not classified as critical, but it can lead to unexpected behavior and should be mitigated promptly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203