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

vc_screen: reload vc pointer before if (ret) in vcs_write() to avoid UAF

The reload of 'vc' added by commit 8fb9ea65c9d1 ("vc_screen: reload load
of struct vc_data pointer in vcs_write() to avoid UAF") sits after the
'if (ret)' block, so the copy-failure break path exits the loop without
reloading vc. If the vc was kfree()'d via vc_port_destruct during the
unlocked copy_from_user() window, the post-loop
'if (written && vc) vcs_scr_updated(vc)' is reached with a stale
non-NULL vc. The '&& vc' guard from commit a287620312dc ("vc_screen:
fix null-ptr-deref in vcs_notifier() during concurrent vcs_write") only
handles the NULL case, not this stale-non-NULL case; vcs_notifier() then
reads param->vc->vc_num from freed memory:

BUG: KASAN: slab-use-after-free in vcs_notifier+0x7c/0xd0
Read of size 2 at addr ffff888007149190
Call Trace:
vcs_notifier+0x7c/0xd0
atomic_notifier_call_chain+0x70/0xa0
vcs_scr_updated+0x77/0xa0
vcs_write+0x71b/0x7e0
Allocated by task: vc_allocate -> con_install -> tty_open
Freed by task: kfree <- vt_ioctl (VT_DISALLOCATE -> vc_port_destruct)

Move the reload to immediately after console_lock(), before 'if (ret)',
so every break path below passes a fresh vc to the post-loop
vcs_scr_updated().
Published: 2026-10-18
Score: 4.7 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Use-After-Free
Action: Apply Patch
AI Analysis

Impact

The bug arises from a use‑after‑free condition in the Linux kernel console code. When a console device is freed during an unlocked copy_from_user window, the pointer used after a failed write is stale and non‑NULL. This allows the notifier to read freed memory, triggering a KASAN report and potentially enabling arbitrary code execution or a kernel crash. The failure propagates through vcs_notifier and can be triggered by concurrent console activity. The primary impact is a severe compromise of kernel integrity and availability, with the potential for privilege escalation if an attacker can execute code at kernel level. The weakness is a classic use‑after‑free flaw, classified as CWE‑416.

Affected Systems

The vulnerability affects Linux kernels that do not include the patch commit 8fb9ea65c9d1, which reloads the vc pointer immediately after console_lock. All distributions that ship earlier kernel releases are potentially impacted, regardless of vendor, because the fix is part of the mainline kernel source. Precise affected versions are not listed, but the issue is present in any kernel before the commit that updates vcs_write to reload the vc pointer before the return path.

Risk and Exploitability

The use‑after‑free flaw has a CVSS score of 4.7, indicating moderate severity. An attacker with local console access could induce the bug and potentially gain arbitrary code execution on the kernel. The EPSS score of 0.00168 (0.168%) indicates a low exploitation probability, and the vulnerability is not listed in the CISA KEV catalog. However, the critical nature of kernel code execution remains a concern; the likely attack vector involves manipulating console input during a write operation, causing the stale pointer condition. Immediate mitigation is still recommended.

Generated by OpenCVE AI on October 22, 2026 at 21:03 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a revision that incorporates commit 8fb9ea65c9d1 or another release that contains the patch to reload the vc pointer before the return path in vcs_write.
  • If an immediate kernel upgrade is not feasible, disable or remove the console device(s) that trigger the vulnerable path until the patch is applied, thereby preventing the use‑after‑free condition from occurring.
  • Reboot the system after applying the kernel update or disabling the affected console modules to ensure the new code is active.
  • Continuously monitor system logs for KASAN or slab‑use‑after‑free messages, as their presence indicates exploitation attempts and can inform the urgency of applying the patch.

Generated by OpenCVE AI on October 22, 2026 at 21:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4850-1 linux-6.12 security update
History

Fri, 30 Oct 2026 13:00:00 +0000


Wed, 21 Oct 2026 13:15:00 +0000


Wed, 21 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate


Sun, 18 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sun, 18 Oct 2026 16:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: vc_screen: reload vc pointer before if (ret) in vcs_write() to avoid UAF The reload of 'vc' added by commit 8fb9ea65c9d1 ("vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF") sits after the 'if (ret)' block, so the copy-failure break path exits the loop without reloading vc. If the vc was kfree()'d via vc_port_destruct during the unlocked copy_from_user() window, the post-loop 'if (written && vc) vcs_scr_updated(vc)' is reached with a stale non-NULL vc. The '&& vc' guard from commit a287620312dc ("vc_screen: fix null-ptr-deref in vcs_notifier() during concurrent vcs_write") only handles the NULL case, not this stale-non-NULL case; vcs_notifier() then reads param->vc->vc_num from freed memory: BUG: KASAN: slab-use-after-free in vcs_notifier+0x7c/0xd0 Read of size 2 at addr ffff888007149190 Call Trace: vcs_notifier+0x7c/0xd0 atomic_notifier_call_chain+0x70/0xa0 vcs_scr_updated+0x77/0xa0 vcs_write+0x71b/0x7e0 Allocated by task: vc_allocate -> con_install -> tty_open Freed by task: kfree <- vt_ioctl (VT_DISALLOCATE -> vc_port_destruct) Move the reload to immediately after console_lock(), before 'if (ret)', so every break path below passes a fresh vc to the post-loop vcs_scr_updated().
Title vc_screen: reload vc pointer before if (ret) in vcs_write() to avoid UAF
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-10-30T12:40:08.759Z

Reserved: 2026-09-25T10:25:14.373Z

Link: CVE-2026-98840

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-18T16:17:38.293

Modified: 2026-10-30T13:21:30.193

Link: CVE-2026-98840

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-18T15:50:14Z

Links: CVE-2026-98840 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T21:15:12Z

Weaknesses