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

serial: qcom_geni: fix kfifo underflow when flush precedes DMA completion IRQ

When uart_flush_buffer() runs before the DMA completion IRQ is delivered,
the following race can occur (all steps serialized by uart_port_lock):

1. DMA starts: tx_remaining = N, kfifo contains N bytes
2. DMA completes in hardware; IRQ is pending but not yet delivered
3. uart_flush_buffer() acquires the port lock and calls kfifo_reset(),
making kfifo_len() = 0 while tx_remaining remains N
4. uart_flush_buffer() releases the port lock
5. DMA IRQ fires; handle_tx_dma() acquires the port lock and calls
uart_xmit_advance(uport, tx_remaining) on an empty kfifo

uart_xmit_advance() increments kfifo->out by tx_remaining. Since
kfifo_reset() already set both in and out to 0, out wraps past in,
causing kfifo_len() to return UART_XMIT_SIZE - tx_remaining. The next
start_tx_dma() call then submits a DMA transfer of stale buffer data.

Fix this by snapshotting kfifo_len() at the start of handle_tx_dma()
and skipping uart_xmit_advance() when fifo_len < tx_remaining, which
indicates the kfifo was reset by a preceding flush.
Published: 2026-07-19
Score: 7.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In the Linux kernel serial driver for Qualcomm Geni devices, a race condition exists between a user‑initiated buffer flush and the completion of a DMA transmission. If uart_flush_buffer() executes before the DMA completion interrupt is serviced, the underlying FIFO is reset while the DMA handler still believes bytes remain to be transmitted. The handler then advances the FIFO pointers based on stale information, causing the next DMA transfer to read stale buffer data. This flaw can lead to corruption of data sent over the UART channel, potentially exposing sensitive information or disrupting controlled communication. The weakness is a classic race condition that results in a buffer underwrite (CWE‑124).

Affected Systems

All Linux kernel builds that include the qcom_geni serial driver are affected, regardless of vendor or distribution, as the fix applies to the generic Linux kernel source. Specific kernel versions are not enumerated in the advisory; however any kernel that incorporates the vulnerable code before the fix will be susceptible.

Risk and Exploitability

The CVSS v3.1 score of 7.3 marks this as a high‑severity vulnerability. The EPSS score of less than 1% indicates a very low probability of exploitation at the time of analysis. The issue is not listed in CISA KEV. Based on the description, it is inferred that exploitation would require local access with sufficient privilege to trigger a UART flush while a DMA transfer is ongoing, suggesting a privileged or local attack vector. If such privilege is attained, the attacker could induce the kernel to transmit corrupted or crafted data, potentially facilitating further attacks that depend on tampered serial input.

Generated by OpenCVE AI on August 4, 2026 at 06:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the kfifo bug fix (commit hash c91ea13375f70f6271a0183445e34e83b8f4d8f7 or subsequent merge).
  • Restrict access to the UART device to privileged users to limit untrusted processes from issuing buffer flushes.
  • If an immediate kernel update is not available, consider disabling the DMA functionality in the qcom_geni serial driver until the patch is applied.

Generated by OpenCVE AI on August 4, 2026 at 06:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Wed, 22 Jul 2026 00:15:00 +0000

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

None

threat_severity

Moderate


Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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


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

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: serial: qcom_geni: fix kfifo underflow when flush precedes DMA completion IRQ When uart_flush_buffer() runs before the DMA completion IRQ is delivered, the following race can occur (all steps serialized by uart_port_lock): 1. DMA starts: tx_remaining = N, kfifo contains N bytes 2. DMA completes in hardware; IRQ is pending but not yet delivered 3. uart_flush_buffer() acquires the port lock and calls kfifo_reset(), making kfifo_len() = 0 while tx_remaining remains N 4. uart_flush_buffer() releases the port lock 5. DMA IRQ fires; handle_tx_dma() acquires the port lock and calls uart_xmit_advance(uport, tx_remaining) on an empty kfifo uart_xmit_advance() increments kfifo->out by tx_remaining. Since kfifo_reset() already set both in and out to 0, out wraps past in, causing kfifo_len() to return UART_XMIT_SIZE - tx_remaining. The next start_tx_dma() call then submits a DMA transfer of stale buffer data. Fix this by snapshotting kfifo_len() at the start of handle_tx_dma() and skipping uart_xmit_advance() when fifo_len < tx_remaining, which indicates the kfifo was reset by a preceding flush.
Title serial: qcom_geni: fix kfifo underflow when flush precedes DMA completion IRQ
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-08-05T12:36:52.126Z

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

Link: CVE-2026-63883

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-63883 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T07:00:05Z

Weaknesses
  • CWE-124

    Buffer Underwrite ('Buffer Underflow')