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… (CVE-2025-40304)
A vulnerability in the Linux kernel framebuffer device (fbdev) subsystem allowed out-of-bounds writes due to missing bounds checking in the bit_putcs function. This issue could cause memory corruption when rendering text near screen edges. The vulnerability has been resolved by adding bounds checks to prevent writes past framebuffer boundaries and ensuring character counts match clipped widths to avoid buffer size mismatches.
AI Analysis
Technical Summary
The Linux kernel fbdev subsystem had a vulnerability (CVE-2025-40304) where the bit_putcs function lacked proper bounds checking, leading to potential out-of-bounds writes when rendering text near the edges of the framebuffer. Specifically, the function failed to update the character count after clipping the image width to the screen boundary, causing mismatched buffer sizes and out-of-bounds memory writes. The fix involved adding checks to return early if the Y position is off-screen, clipping image height and width to screen boundaries, and updating the character count accordingly to prevent buffer overflows.
Potential Impact
This vulnerability allows an attacker with local privileges to cause out-of-bounds memory writes in kernel space, potentially leading to arbitrary code execution, privilege escalation, or system crashes. The CVSS vector indicates high impact on confidentiality, integrity, and availability (C:H/I:H/A:H).
Mitigation Recommendations
A fix has been implemented in the Linux kernel to add proper bounds checking in the bit_putcs function of the fbdev subsystem. Users and administrators should apply the official kernel updates that include this patch. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor advisory or Linux kernel mailing lists for the specific fixed versions and apply updates accordingly.
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… (CVE-2025-40304)
Description
A vulnerability in the Linux kernel framebuffer device (fbdev) subsystem allowed out-of-bounds writes due to missing bounds checking in the bit_putcs function. This issue could cause memory corruption when rendering text near screen edges. The vulnerability has been resolved by adding bounds checks to prevent writes past framebuffer boundaries and ensuring character counts match clipped widths to avoid buffer size mismatches.
CVSS v3.1
Score 7.8high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel fbdev subsystem had a vulnerability (CVE-2025-40304) where the bit_putcs function lacked proper bounds checking, leading to potential out-of-bounds writes when rendering text near the edges of the framebuffer. Specifically, the function failed to update the character count after clipping the image width to the screen boundary, causing mismatched buffer sizes and out-of-bounds memory writes. The fix involved adding checks to return early if the Y position is off-screen, clipping image height and width to screen boundaries, and updating the character count accordingly to prevent buffer overflows.
Potential Impact
This vulnerability allows an attacker with local privileges to cause out-of-bounds memory writes in kernel space, potentially leading to arbitrary code execution, privilege escalation, or system crashes. The CVSS vector indicates high impact on confidentiality, integrity, and availability (C:H/I:H/A:H).
Mitigation Recommendations
A fix has been implemented in the Linux kernel to add proper bounds checking in the bit_putcs function of the fbdev subsystem. Users and administrators should apply the official kernel updates that include this patch. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor advisory or Linux kernel mailing lists for the specific fixed versions and apply updates accordingly.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-6cgq-9674-3xfg
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40304"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d49c2644c7f8479514
Added to database: 07/30/2026, 15:50:44 UTC
Last enriched: 07/30/2026, 17:52:04 UTC
Last updated: 09/10/2026, 19:38:45 UTC
Views: 13
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.