Cloudanix VulnDB

CVE-2025-40304

None

CVSS

—

EPSS

0.1%

Published

Dec 8, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in how the Linux kernel draws text on the screen could let someone with access to the computer cause crashes or gain extra privileges until the system is updated.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Data Tampering
Component
OS kernel
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Missing bounds checks in the fbdev bit_putcs function allow writes past framebuffer memory boundaries when rendering text near screen edges, resulting in out-of-bounds writes due to mismatched buffer allocation and character count parameters passed to aligned and unaligned rendering routines.

Why it matters to the business

Unpatched systems risk kernel memory corruption that can cause crashes, denial of service, or local privilege escalation on Linux servers and desktops, especially older distributions still in extended support; delayed patching increases exposure window on widely deployed kernels.

How an attack unfolds

An attacker with local user access supplies crafted text rendering operations that position output near framebuffer edges, bypassing the absent Y-position, height, and X-position checks; this triggers buffer-size mismatches that write attacker-controlled data beyond allocated regions, enabling memory corruption.

How to fix it

Upgrade the Linux kernel packages on all affected distributions to the versions containing the bounds-checking fix (for example, linux 4.4.0-142.168 on Ubuntu 16.04 LTS, linux-aws 4.4.0-1075.85 on Ubuntu 16.04 LTS, and the corresponding fixed releases listed for each 14.04 and 16.04 variant). Reboot after installation and verify the running kernel version.

How to confirm the fix worked

Confirm the installed kernel version matches or exceeds one of the listed fixed releases for the distribution; optionally build and inspect the fbdev source to verify presence of the Y-position early return, height clipping, X-position break, and character-count update logic.

Typical attack path

  1. Obtain local shell or process execution on the target system
  2. Interact with the framebuffer device to trigger text rendering near screen boundaries
  3. Supply parameters that cause the character count to exceed the clipped width
  4. Trigger the mismatched call to bit_putcs_aligned or bit_putcs_unaligned
  5. Achieve out-of-bounds write for memory corruption or code execution

How to detect it

Monitor kernel logs (dmesg, /var/log/kern.log) for framebuffer-related oops or panic messages near text-rendering paths; correlate with unusual local process activity that interacts with /dev/fb*; no public exploitation artifacts are known, so focus on post-crash memory corruption indicators.

What your security team should do

  • Prioritize kernel updates on all internet-facing and multi-user systems within the next patch cycle
  • Inventory running kernels across the fleet to identify any remaining 14.04/16.04 LTS instances
  • Enable automatic security updates for kernel packages where operationally feasible
  • Review local access controls and framebuffer device permissions as a compensating control

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Linux Kernel 0 5.4.302
Linux Kernel 2.6.12 5.4.302
Mageia:9 kernel 0 6.6.120-1.mga9
Mageia:9 kernel-linus 0 6.6.120-1.mga9
Mageia:9 kmod-virtualbox 0 7.1.14-14.mga9
Mageia:9 kmod-xtables-addons 0 3.24-88.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_19 0 1-150600.13.3.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-64kb 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-docs 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-obs-build 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-source 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-syms 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server 15 SP6-LTSS kernel-zfcpdump 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-docs 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-obs-build 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-source 0 6.4.0-150600.23.84.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP6 kernel-syms 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.84.1.150600.12.38.1
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.84.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.84.1
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-azure 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.9.1.160000.2.6
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.9.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.9.1

Related vulnerabilities