Bug 2419870 (CVE-2025-40304) - CVE-2025-40304 kernel: fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds
Summary: CVE-2025-40304 kernel: fbdev: Add bounds checking in bit_putcs to fix vmalloc...
Keywords:
Status: NEW
Alias: CVE-2025-40304
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-12-08 07:04 UTC by OSIDB Bzimport
Modified: 2025-12-08 23:46 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-12-08 07:04:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.