CVE-2026-98747

serial: core: fix NULL pointer dereference in serial_core_unregister_port()

Published Oct 18, 2026 CVSS 3.1 · 4.4 Medium EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

serial: core: fix NULL pointer dereference in serial_core_unregister_port()

port->port_dev is NULL when no port device is installed: it is cleared
on teardown, and never set if registration failed before
serial_core_port_device_add(). serial_core_unregister_port() passes it
straight to serial_core_get_ctrl_dev(), which dereferences it:

KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
RIP: serial_core_unregister_port
Call Trace:
serial8250_unregister_port
serial8250_remove
unbind_store

Return early when there is no port device, and read port->port_dev
under port_mutex.

Also clear port->port_dev on the serial_core_register_port() error
path, where the port device has already been removed.

Analysis

AI-generated

Technical impact

The flaw exists in the Linux Kernel's serial core driver. During port teardown the code can call serial_core_unregister_port() with a NULL port_dev pointer. The function then passes that NULL pointer to serial_core_get_ctrl_dev() which dereferences it, causing a kernel error that can crash the system. This dereference is not guarded, which allows an attacker able to trigger a registration failure or teardown to arbitrarily crash the kernel.

Affected Systems

All Linux kernel installations that include the serial core driver are potentially affected. The vulnerability is addressed in recent mainline releases; the relevant commit references are linked in the advisory. No explicit version list is provided, so any kernel older than the patch is considered vulnerable.

Risk and Exploitability

The CVSS score is 4.4, the EPSS score is < 1%, and the vulnerability is not listed in the CISA KEV catalog, suggesting limited exploitation evidence to date. Exploitation requires local access capable of inducing a tear‑down of a serial port without a registered device, which could lead to a kernel crash and potentially privilege escalation if code execution is already possible. The risk is therefore moderate and warrants immediate remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that incorporates the commit cited at https://git.kernel.org/stable/c/499485a67fbacf4d9afbdb43522388c64f853428 or https://git.kernel.org/stable/c/54abbb862366dcaf1f22f1e968358147b7d0547d.
  • Reboot the system so that the updated kernel is loaded and the null‑pointer check is active.
  • Verify that no serial device teardown attempts call serial_core_unregister_port() with a NULL port_dev – this can be done by ensuring the device is properly registered before removal or by disabling automatic device removal in test environments.

Generated by OpenCVE AI on October 23, 2026 at 14:02 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-9018-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9018-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-476
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: serial: core: fix NULL pointer dereference in serial_core_unregister_port() port->port_dev is NULL when no port device is installed: it is cleared on teardown, and never set if registration failed before serial_core_port_device_add(). serial_core_unregister_port() passes it straight to serial_core_get_ctrl_dev(), which dereferences it: KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047] RIP: serial_core_unregister_port Call Trace: serial8250_unregister_port serial8250_remove unbind_store Return early when there is no port device, and read port->port_dev under port_mutex. Also clear port->port_dev on the serial_core_register_port() error path, where the port device has already been removed.
Title serial: core: fix NULL pointer dereference in serial_core_unregister_port()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 9:24 AM
Reserved
Sep 25, 2026, 10:25 AM
Status
Received
Published
Oct 18, 2026, 4:17 PM
Modified
Oct 19, 2026, 10:19 AM
Severity
Moderate
Public date
Oct 18, 2026, 12:00 AM