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

serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN

uart_write_room() and uart_write() behave inconsistently when
xmit_buf is NULL (which happens for PORT_UNKNOWN ports that were
never properly initialized):

- uart_write_room() returns kfifo_avail() which can be > 0
- uart_write() checks xmit_buf and returns 0 if NULL

This inconsistency causes an infinite loop in drivers that rely on
tty_write_room() to determine if they can write:

while (tty_write_room(tty) > 0) {
written = tty->ops->write(...);
// written is always 0, loop never exits
}

For example, caif_serial's handle_tx() enters an infinite loop when
used with PORT_UNKNOWN serial ports, causing system hangs.

Fix by making uart_write_room() also check xmit_buf and return 0 if
it's NULL, consistent with uart_write().

Reproducer: https://gist.github.com/mrpre/d9a694cc0e19828ee3bc3b37983fde13
Published: 2026-04-03
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises from an inconsistency between the functions uart_write_room() and uart_write() in the Linux kernel serial subsystem. When a serial port is marked as PORT_UNKNOWN and its transmit buffer has never been initialized, uart_write_room() incorrectly reports available space while uart_write() returns zero. Drivers that rely on tty_write_room() to determine write capacity enter an infinite loop, repeatedly invoking write operations with no progress. The loop prevents the driver from terminating and can lead the entire system to hang or become unresponsive, resulting in a denial of service.

Affected Systems

All Linux kernel implementations that include the affected serial core code are impacted. This includes every kernel distribution that has not yet incorporated the patch that synchronizes uart_write_room() with uart_write(). Because the vulnerability is in the kernel itself, any system running an affected kernel is susceptible, regardless of host hardware or distribution vendor. Specific affected versions are not enumerated in the advisory, so systems should verify whether their current kernel source contains the commit that restores consistent behavior.

Risk and Exploitability

The advisory rates the issue with a CVSS score of 5.5, indicating a moderate level of severity. The exploit prediction score is less than 1% and the vulnerability is not listed in CISA’s KEV catalog, suggesting it has not been reported as widely exploited. An attacker would need local or high‑privilege access to interfere with a serial device that has not been properly initialized. Because the flaw manifests only when a driver calls tty_write_room() in a loop, remote exploitation is unlikely without additional local foothold. For most environments, the primary risk is an accidental misconfiguration of serial devices rather than deliberate attack.

Generated by OpenCVE AI on May 26, 2026 at 15:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the upstream kernel patch from commit 455ce986fa356ff43a43c0d363ba95fa152f21d5 (or any newer stable release that contains the fix).
  • Reboot the system after updating the kernel to ensure the patch takes effect.
  • Verify that serial devices no longer report non‑zero write room with an uninitialized transmit buffer by testing with caif_serial or other PORT_UNKNOWN drivers.
  • As a temporary precaution, avoid creating or using serial ports that are marked PORT_UNKNOWN until the kernel has been upgraded.

Generated by OpenCVE AI on May 26, 2026 at 15:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 26 May 2026 14:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-835
CPEs cpe:2.3:o:linux:linux_kernel:2.6.12:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:2.6.12:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*

Tue, 07 Apr 2026 08:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-617

Sat, 04 Apr 2026 01:15:00 +0000

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

None

cvssV3_1

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

threat_severity

Moderate


Fri, 03 Apr 2026 21:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-617

Fri, 03 Apr 2026 16:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN uart_write_room() and uart_write() behave inconsistently when xmit_buf is NULL (which happens for PORT_UNKNOWN ports that were never properly initialized): - uart_write_room() returns kfifo_avail() which can be > 0 - uart_write() checks xmit_buf and returns 0 if NULL This inconsistency causes an infinite loop in drivers that rely on tty_write_room() to determine if they can write: while (tty_write_room(tty) > 0) { written = tty->ops->write(...); // written is always 0, loop never exits } For example, caif_serial's handle_tx() enters an infinite loop when used with PORT_UNKNOWN serial ports, causing system hangs. Fix by making uart_write_room() also check xmit_buf and return 0 if it's NULL, consistent with uart_write(). Reproducer: https://gist.github.com/mrpre/d9a694cc0e19828ee3bc3b37983fde13
Title serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN
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-05-11T22:07:41.736Z

Reserved: 2026-01-13T15:37:46.022Z

Link: CVE-2026-23472

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Analyzed

Published: 2026-04-03T16:16:34.977

Modified: 2026-05-26T14:26:13.110

Link: CVE-2026-23472

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-04-03T00:00:00Z

Links: CVE-2026-23472 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-26T15:45:08Z

Weaknesses