Description
In the Linux kernel, the following vulnerability has been resolved:

fbdev: fix use-after-free in store_modes()

store_modes() replaces a framebuffer's modelist with modes from userspace.
On success it frees the old modelist with fb_destroy_modelist(). Two
fields still point into that freed list.

One pointer is fb_display[i].mode, the mode a console is using.
fbcon_new_modelist() moves these pointers to the new list. It only does so
for consoles still mapped to the framebuffer. An unmapped console is
skipped and keeps its stale pointer. Unbinding fbcon, for example, sets
con2fb_map[i] to -1 but leaves fb_display[i].mode set. An
FBIOPUT_VSCREENINFO ioctl with FB_ACTIVATE_INV_MODE later reaches
fbcon_mode_deleted(). That function reads the stale fb_display[i].mode
through fb_mode_is_equal(). The read is a use-after-free.

The other pointer is fb_info->mode, the current mode. It is set through
the mode sysfs attribute. store_modes() does not update fb_info->mode, so
it is left pointing into the freed list. show_mode(), the attribute's read
handler, dereferences the stale fb_info->mode through mode_string(). The
read is a use-after-free.

Clear both pointers before freeing the list. Commit a1f305893074 ("fbcon:
Set fb_display[i]->mode to NULL when the mode is released") added the
helper fbcon_delete_modelist(). It clears every fb_display[i].mode that
points into a given list. So far it is called only from the unregister
path. Call it from store_modes() too, and set fb_info->mode to NULL.
Published: 2026-07-19
Score: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In Linux kernel fbdev, calling store_modes() can replace a framebuffer’s modelist with a userspace list while still leaving pointers to the freed data. The code frees an old modelist but does not clear fb_display[i].mode or fb_info->mode, which are then used later by ioctl handlers or sysfs read functions. This use‑after‑free condition can corrupt memory and, if an attacker can control the layout of the freed memory, could lead to arbitrary code execution. The defect is formally identified as CWE‑825, which highlights unsafe pointer usage after freeing memory.

Affected Systems

All distributions that ship the Linux kernel prior to the inclusion of commit a1f305893074 or later are affected. The vulnerability manifests in any kernel that uses the console framebuffer (fbdev) modules, regardless of vendor, because the CPE indicates the entire Linux kernel family.

Risk and Exploitability

The CVSS score of 7.0 indicates a high severity, but the EPSS score is documented as less than 1%, suggesting a low likelihood of widespread exploitation at present. The issue is not listed in the CISA KEV catalog. Based on the description, it is inferred that exploitation requires local privilege to invoke the FBIOPUT_VSCREENINFO ioctl or to cause the console to unmap a framebuffer. Attackers would need to target systems with active framebuffer usage, making the attack vector local and privileged. Nonetheless, the severity warrants prompt remediation.

Generated by OpenCVE AI on July 30, 2026 at 22:09 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that includes the fix for the use‑after‑free in fbdev; the relevant patch is commit a1f305893074 and all subsequent commits that incorporate it.
  • If a kernel upgrade cannot be applied immediately, ensure that only trusted or privileged users have access to framebuffer ioctl interfaces, for example by setting restrictive permissions on /dev/fb* devices or by adjusting group ownership so that unprivileged users cannot issue FBIOPUT_VSCREENINFO.
  • As a temporary workaround, disable framebuffer drivers or unmap consoles that are not required in the environment, which eliminates the path that exercises the vulnerable code path.

Generated by OpenCVE AI on July 30, 2026 at 22:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 21 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Sun, 19 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: fbdev: fix use-after-free in store_modes() store_modes() replaces a framebuffer's modelist with modes from userspace. On success it frees the old modelist with fb_destroy_modelist(). Two fields still point into that freed list. One pointer is fb_display[i].mode, the mode a console is using. fbcon_new_modelist() moves these pointers to the new list. It only does so for consoles still mapped to the framebuffer. An unmapped console is skipped and keeps its stale pointer. Unbinding fbcon, for example, sets con2fb_map[i] to -1 but leaves fb_display[i].mode set. An FBIOPUT_VSCREENINFO ioctl with FB_ACTIVATE_INV_MODE later reaches fbcon_mode_deleted(). That function reads the stale fb_display[i].mode through fb_mode_is_equal(). The read is a use-after-free. The other pointer is fb_info->mode, the current mode. It is set through the mode sysfs attribute. store_modes() does not update fb_info->mode, so it is left pointing into the freed list. show_mode(), the attribute's read handler, dereferences the stale fb_info->mode through mode_string(). The read is a use-after-free. Clear both pointers before freeing the list. Commit a1f305893074 ("fbcon: Set fb_display[i]->mode to NULL when the mode is released") added the helper fbcon_delete_modelist(). It clears every fb_display[i].mode that points into a given list. So far it is called only from the unregister path. Call it from store_modes() too, and set fb_info->mode to NULL.
Title fbdev: fix use-after-free in store_modes()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-07-20T06:41:29.792Z

Reserved: 2026-07-19T07:54:57.014Z

Link: CVE-2026-63826

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-63826 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T22:15:13Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference