fbdev: core: fbcvt: avoid division by 0 in fb_cvt_hperiod()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 96fe6a2109db29cd15b90a093c16e6cb4b19371a · < b235393b9f43ff86a38ca2bde6372312ea215dc5| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s fbdev fbcvt code can divide by zero if a mode refresh value of 0x80000000 overflows during calculation, causing a kernel oops. The input does not establish whether an attacker can trigger this condition, or specify access or user-interaction requirements.
Engineers running the Linux kernel should check their deployments; affected versions are not specified.