drm/sysfb: ofdrm: Fix integer overflow in fb_size calculation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/sysfb: ofdrm: Fix integer overflow in fb_size calculation
The framebuffer size calculation `fb_size = linebytes * height` can overflow when both values are large (e.g., 46341 * 46341 > INT_MAX). Since linebytes and height are both int types, the multiplication is performed as int * int, which results in undefined behavior on overflow.
Use check_mul_overflow() to detect and prevent this overflow, consistent with the approach used in simpledrm.c and corebootdrm.c.
From the CVE record · Linux
The Linux kernel’s ofdrm driver can overflow an integer when calculating framebuffer size from large linebytes and height values. The input does not specify whether an attacker can control those values, or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with the ofdrm driver should check their versions against the vendor advisory; affected versions are not specified.