cve-2025-21689
Vulnerability from cvelistv5
Published
2025-02-10 15:58
Modified
2025-03-24 15:38
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb() This patch addresses a null-ptr-deref in qt2_process_read_urb() due to an incorrect bounds check in the following: if (newport > serial->num_ports) { dev_err(&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->num_ports - 1. When newport is equal to serial->num_ports, the assignment of "port" in the following code is out-of-bounds and NULL: serial_priv->current_port = newport; port = serial->port[serial_priv->current_port]; The fix checks if newport is greater than or equal to serial->num_ports indicating it is out-of-bounds.
Impacted products
Vendor Product Version
Linux Linux Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Version: f7a33e608d9ae022b7f49307921627e34e9484ed
Create a notification for this product.
   Linux Linux Version: 3.5
Create a notification for this product.
Show details on NVD website


{
   containers: {
      cna: {
         affected: [
            {
               defaultStatus: "unaffected",
               product: "Linux",
               programFiles: [
                  "drivers/usb/serial/quatech2.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     lessThan: "fa4c7472469d97c4707698b4c0e098f8cfc2bf22",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "94770cf7c5124f0268d481886829dc2beecc4507",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "6068dcff7f19e9fa6fa23ee03453ad6a40fa4efe",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "4b9b41fabcd38990f69ef0cee9c631d954a2b530",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "6377838560c03b36e1153a42ef727533def9b68f",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "f371471708c7d997f763b0e70565026eb67cc470",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "8542b33622571f54dfc2a267fce378b6e3840b8b",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
                  {
                     lessThan: "575a5adf48b06a2980c9eeffedf699ed5534fade",
                     status: "affected",
                     version: "f7a33e608d9ae022b7f49307921627e34e9484ed",
                     versionType: "git",
                  },
               ],
            },
            {
               defaultStatus: "affected",
               product: "Linux",
               programFiles: [
                  "drivers/usb/serial/quatech2.c",
               ],
               repo: "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               vendor: "Linux",
               versions: [
                  {
                     status: "affected",
                     version: "3.5",
                  },
                  {
                     lessThan: "3.5",
                     status: "unaffected",
                     version: "0",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.4.*",
                     status: "unaffected",
                     version: "5.4.290",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.10.*",
                     status: "unaffected",
                     version: "5.10.234",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "5.15.*",
                     status: "unaffected",
                     version: "5.15.178",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.1.*",
                     status: "unaffected",
                     version: "6.1.128",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.6.*",
                     status: "unaffected",
                     version: "6.6.75",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.12.*",
                     status: "unaffected",
                     version: "6.12.12",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "6.13.*",
                     status: "unaffected",
                     version: "6.13.1",
                     versionType: "semver",
                  },
                  {
                     lessThanOrEqual: "*",
                     status: "unaffected",
                     version: "6.14",
                     versionType: "original_commit_for_fix",
                  },
               ],
            },
         ],
         descriptions: [
            {
               lang: "en",
               value: "In the Linux kernel, the following vulnerability has been resolved:\n\nUSB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()\n\nThis patch addresses a null-ptr-deref in qt2_process_read_urb() due to\nan incorrect bounds check in the following:\n\n       if (newport > serial->num_ports) {\n               dev_err(&port->dev,\n                       \"%s - port change to invalid port: %i\\n\",\n                       __func__, newport);\n               break;\n       }\n\nThe condition doesn't account for the valid range of the serial->port\nbuffer, which is from 0 to serial->num_ports - 1. When newport is equal\nto serial->num_ports, the assignment of \"port\" in the\nfollowing code is out-of-bounds and NULL:\n\n       serial_priv->current_port = newport;\n       port = serial->port[serial_priv->current_port];\n\nThe fix checks if newport is greater than or equal to serial->num_ports\nindicating it is out-of-bounds.",
            },
         ],
         providerMetadata: {
            dateUpdated: "2025-03-24T15:38:56.069Z",
            orgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            shortName: "Linux",
         },
         references: [
            {
               url: "https://git.kernel.org/stable/c/fa4c7472469d97c4707698b4c0e098f8cfc2bf22",
            },
            {
               url: "https://git.kernel.org/stable/c/94770cf7c5124f0268d481886829dc2beecc4507",
            },
            {
               url: "https://git.kernel.org/stable/c/6068dcff7f19e9fa6fa23ee03453ad6a40fa4efe",
            },
            {
               url: "https://git.kernel.org/stable/c/4b9b41fabcd38990f69ef0cee9c631d954a2b530",
            },
            {
               url: "https://git.kernel.org/stable/c/6377838560c03b36e1153a42ef727533def9b68f",
            },
            {
               url: "https://git.kernel.org/stable/c/f371471708c7d997f763b0e70565026eb67cc470",
            },
            {
               url: "https://git.kernel.org/stable/c/8542b33622571f54dfc2a267fce378b6e3840b8b",
            },
            {
               url: "https://git.kernel.org/stable/c/575a5adf48b06a2980c9eeffedf699ed5534fade",
            },
         ],
         title: "USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()",
         x_generator: {
            engine: "bippy-5f407fcff5a0",
         },
      },
   },
   cveMetadata: {
      assignerOrgId: "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      assignerShortName: "Linux",
      cveId: "CVE-2025-21689",
      datePublished: "2025-02-10T15:58:45.493Z",
      dateReserved: "2024-12-29T08:45:45.741Z",
      dateUpdated: "2025-03-24T15:38:56.069Z",
      state: "PUBLISHED",
   },
   dataType: "CVE_RECORD",
   dataVersion: "5.1",
   "vulnerability-lookup:meta": {
      nvd: "{\"cve\":{\"id\":\"CVE-2025-21689\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-10T16:15:38.447\",\"lastModified\":\"2025-02-21T16:36:30.260\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nUSB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()\\n\\nThis patch addresses a null-ptr-deref in qt2_process_read_urb() due to\\nan incorrect bounds check in the following:\\n\\n       if (newport > serial->num_ports) {\\n               dev_err(&port->dev,\\n                       \\\"%s - port change to invalid port: %i\\\\n\\\",\\n                       __func__, newport);\\n               break;\\n       }\\n\\nThe condition doesn't account for the valid range of the serial->port\\nbuffer, which is from 0 to serial->num_ports - 1. When newport is equal\\nto serial->num_ports, the assignment of \\\"port\\\" in the\\nfollowing code is out-of-bounds and NULL:\\n\\n       serial_priv->current_port = newport;\\n       port = serial->port[serial_priv->current_port];\\n\\nThe fix checks if newport is greater than or equal to serial->num_ports\\nindicating it is out-of-bounds.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: USB: serial: quatech2: arreglo de null-ptr-deref en qt2_process_read_urb() Este parche soluciona un null-ptr-deref en qt2_process_read_urb() debido a una comprobación de los límites incorrecta en lo siguiente: if (newport > serial->num_ports) { dev_err(&port->dev, \\\"%s - port change to invalid port: %i\\\\n\\\", __func__, newport); break; } La condición no tiene en cuenta el rango válido del búfer serial->port, que es de 0 a serial->num_ports - 1. Cuando newport es igual a serial->num_ports, la asignación de \\\"port\\\" en el siguiente código está fuera de los límites y es NULL: serial_priv->current_port = newport; port = serial->port[serial_priv->current_port]; La solución verifica si newport es mayor o igual que serial->num_ports, lo que indica que está fuera de los límites.\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"3.5\",\"versionEndExcluding\":\"5.4.290\",\"matchCriteriaId\":\"C332DF00-BEC8-45B0-8795-4706DA6CBD65\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.234\",\"matchCriteriaId\":\"F732162B-ED7E-4367-A5C2-B24FD9B0D33B\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.178\",\"matchCriteriaId\":\"171159A1-9827-4C7B-821D-55398B837C49\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.128\",\"matchCriteriaId\":\"EDB5047C-0330-407A-BE1B-513B5BF304DE\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.75\",\"matchCriteriaId\":\"E8D39B53-7390-48BE-92FD-8846BE8E8430\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.12.12\",\"matchCriteriaId\":\"B04C243A-753B-49A9-87C7-92FCC1425FB7\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:-:*:*:*:*:*:*\",\"matchCriteriaId\":\"5A3F9505-6B98-4269-8B81-127E55A1BF00\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"62567B3C-6CEE-46D0-BC2E-B3717FBF7D13\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"5A073481-106D-4B15-B4C7-FB0213B8E1D4\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"DE491969-75AE-4A6B-9A58-8FC5AF98798F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"93C0660D-7FB8-4FBA-892A-B064BA71E49E\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"034C36A6-C481-41F3-AE9A-D116E5BE6895\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"8AF9DC49-2085-4FFB-A7E3-73DFAFECC7F2\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.13:rc7:*:*:*:*:*:*\",\"matchCriteriaId\":\"5DFCDFB8-4FD0-465A-9076-D813D78FE51B\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4b9b41fabcd38990f69ef0cee9c631d954a2b530\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/575a5adf48b06a2980c9eeffedf699ed5534fade\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6068dcff7f19e9fa6fa23ee03453ad6a40fa4efe\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6377838560c03b36e1153a42ef727533def9b68f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/8542b33622571f54dfc2a267fce378b6e3840b8b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/94770cf7c5124f0268d481886829dc2beecc4507\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f371471708c7d997f763b0e70565026eb67cc470\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/fa4c7472469d97c4707698b4c0e098f8cfc2bf22\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
   },
}


Log in or create an account to share your comment.

Security Advisory comment format.

This schema specifies the format of a comment related to a security advisory.

UUIDv4 of the comment
UUIDv4 of the Vulnerability-Lookup instance
When the comment was created originally
When the comment was last updated
Title of the comment
Description of the comment
The identifier of the vulnerability (CVE ID, GHSA-ID, PYSEC ID, etc.).



Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.