CVE-2025-38312 fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
A local attacker can trigger a kernel oops via division by zero in the framebuffer console code, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38312?
CVE-2025-38312 is a medium-severity denial of service vulnerability in Debian Debian Linux, published on 10 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
In fb_find_mode_cvt(), iff mode->refresh somehow happens to be 0x80000000, cvt.f_refresh will become 0 when multiplying it by 2 due to overflow. It's then passed to fb_cvt_hperiod(), where it's used as a divider -- division by 0 will result in kernel oops. Add a sanity check for cvt.f_refresh to avoid such overflow...
Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool.
Weakness: CWE-369
Which versions are affected by CVE-2025-38312?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2025-38312?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-38312 being exploited?
There is no known exploitation of CVE-2025-38312 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as AZL-64979, BELL-CVE-2025-38312, DEBIAN-CVE-2025-38312, GHSA-qjhc-7f62-c8xv, ROOT-OS-DEBIAN-11-CVE-2025-38312, ROOT-OS-DEBIAN-12-CVE-2025-38312 and 3 more.