fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 15ba9acafb0517f8359ca30002c189a68ddbb939| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds
Add bounds checking to prevent writes past framebuffer boundaries when rendering text near screen edges. Return early if the Y position is off-screen and clip image height to screen boundary. Break from the rendering loop if the X position is off-screen. When clipping image width to fit the screen, update the character count to match the clipped width to prevent buffer size mismatches.
Without the character count update, bit_putcs_aligned and bit_putcs_unaligned receive mismatched parameters where the buffer is allocated for the clipped width but cnt reflects the original larger count, causing out-of-bounds writes.
From the CVE record · Linux
The Linux kernel's fbdev text-rendering code can write beyond an allocated buffer when text is rendered near screen edges. The input does not specify how an attacker could trigger this, whether authentication or user interaction is required, or whether access is local or over a network.
Engineers running the Linux kernel should check whether their version includes the fbdev bounds-checking fix; affected versions are not specified.