CVE-2025-21689: USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: quatech2: fix null-ptr-deref in qt2processreadurb()
This patch addresses a null-ptr-deref in qt2processreadurb() due to an incorrect bounds check in the following:
if (newport > serial->numports) { deverr(&port->dev, "%s - port change to invalid port: %i\n", func, newport); break; }
The condition doesn't account for the valid range of the serial->port buffer, which is from 0 to serial->numports - 1. When newport is equal to serial->numports, the assignment of "port" in the following code is out-of-bounds and NULL:
serialpriv->currentport = newport; port = serial->port[serialpriv->currentport];
The fix checks if newport is greater than or equal to serial->numports indicating it is out-of-bounds.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade
Linux kernel USB: serial: quatech2to a version that resolves this vulnerability.Patch USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()
Event History
Frequently Asked Questions
What is the severity of CVE-2025-21689?
CVE-2025-21689 is classified as a moderate severity vulnerability in the Linux kernel.
How do I fix CVE-2025-21689?
To fix CVE-2025-21689, update your Linux kernel to the latest stable version that includes the patch for this vulnerability.
What versions of the Linux kernel are affected by CVE-2025-21689?
CVE-2025-21689 affects various versions of the Linux kernel prior to the patch being applied.
What impacts does CVE-2025-21689 have on system security?
The null pointer dereference vulnerability in CVE-2025-21689 may lead to system crashes or instability, potentially affecting system reliability.
Is there a workaround for CVE-2025-21689?
There are no known workarounds for CVE-2025-21689; the recommended action is to apply the kernel update as soon as possible.