cve-2021-47527
Vulnerability from cvelistv5
Published
2024-05-24 15:09
Modified
2024-11-04 12:07
Severity ?
Summary
serial: core: fix transmit-buffer reset and memleak
References
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
416baaa9-dc9f-4396-8d5f-8c081fb06d67https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f
af854a3a-2127-422b-91ae-364da2661108https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e
Impacted products
Vendor Product Version
Linux Linux Version: 4.9
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-47527",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-10T18:53:22.735670Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-10T18:53:36.137Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:39:59.783Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/tty/serial/serial_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "011f6c92b5bf",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "e74d9663fd57",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "1179b168fa3f",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "c5da8aa44105",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "e1722acf4f0d",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "64e491c1634b",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            },
            {
              "lessThan": "00de977f9e0a",
              "status": "affected",
              "version": "761ed4a94582",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/tty/serial/serial_core.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.9"
            },
            {
              "lessThan": "4.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.292",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.257",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.220",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.164",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.84",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nserial: core: fix transmit-buffer reset and memleak\n\nCommit 761ed4a94582 (\"tty: serial_core: convert uart_close to use\ntty_port_close\") converted serial core to use tty_port_close() but\nfailed to notice that the transmit buffer still needs to be freed on\nfinal close.\n\nNot freeing the transmit buffer means that the buffer is no longer\ncleared on next open so that any ioctl() waiting for the buffer to drain\nmight wait indefinitely (e.g. on termios changes) or that stale data can\nend up being transmitted in case tx is restarted.\n\nFurthermore, the buffer of any port that has been opened would leak on\ndriver unbind.\n\nNote that the port lock is held when clearing the buffer pointer due to\nthe ldisc race worked around by commit a5ba1d95e46e (\"uart: fix race\nbetween uart_put_char() and uart_shutdown()\").\n\nAlso note that the tty-port shutdown() callback is not called for\nconsole ports so it is not strictly necessary to free the buffer page\nafter releasing the lock (cf. d72402145ace (\"tty/serial: do not free\ntrasnmit buffer page under port lock\"))."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-04T12:07:39.314Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206"
        },
        {
          "url": "https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e"
        },
        {
          "url": "https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db"
        },
        {
          "url": "https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf"
        },
        {
          "url": "https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f"
        },
        {
          "url": "https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12"
        },
        {
          "url": "https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424"
        }
      ],
      "title": "serial: core: fix transmit-buffer reset and memleak",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-47527",
    "datePublished": "2024-05-24T15:09:38.690Z",
    "dateReserved": "2024-05-24T15:02:54.825Z",
    "dateUpdated": "2024-11-04T12:07:39.314Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-47527\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-24T15:15:15.580\",\"lastModified\":\"2024-11-21T06:36:27.393\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nserial: core: fix transmit-buffer reset and memleak\\n\\nCommit 761ed4a94582 (\\\"tty: serial_core: convert uart_close to use\\ntty_port_close\\\") converted serial core to use tty_port_close() but\\nfailed to notice that the transmit buffer still needs to be freed on\\nfinal close.\\n\\nNot freeing the transmit buffer means that the buffer is no longer\\ncleared on next open so that any ioctl() waiting for the buffer to drain\\nmight wait indefinitely (e.g. on termios changes) or that stale data can\\nend up being transmitted in case tx is restarted.\\n\\nFurthermore, the buffer of any port that has been opened would leak on\\ndriver unbind.\\n\\nNote that the port lock is held when clearing the buffer pointer due to\\nthe ldisc race worked around by commit a5ba1d95e46e (\\\"uart: fix race\\nbetween uart_put_char() and uart_shutdown()\\\").\\n\\nAlso note that the tty-port shutdown() callback is not called for\\nconsole ports so it is not strictly necessary to free the buffer page\\nafter releasing the lock (cf. d72402145ace (\\\"tty/serial: do not free\\ntrasnmit buffer page under port lock\\\")).\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: serial: core: fix transmit-buffer reset y memleak commit 761ed4a94582 (\\\"tty: serial_core: convert uart_close to use tty_port_close\\\") n\u00facleo serial convertido para usar tty_port_close() pero no se dio cuenta que el b\u00fafer de transmisi\u00f3n todav\u00eda necesita ser liberado en el cierre final. No liberar el b\u00fafer de transmisi\u00f3n significa que el b\u00fafer ya no se borra en la pr\u00f3xima apertura, por lo que cualquier ioctl() que espere a que se drene el b\u00fafer podr\u00eda esperar indefinidamente (por ejemplo, en cambios de termios) o que los datos obsoletos pueden terminar transmiti\u00e9ndose en caso de que tx sea reiniciado. Adem\u00e1s, el b\u00fafer de cualquier puerto que se haya abierto se filtrar\u00eda al desvincular el controlador. Tenga en cuenta que el bloqueo del puerto se mantiene al borrar el puntero del b\u00fafer debido a la ejecuci\u00f3n de ldisc solucionada mediante el commit a5ba1d95e46e (\\\"uart: corrige la ejecuci\u00f3n entre uart_put_char() y uart_shutdown()\\\"). Tambi\u00e9n tenga en cuenta que la devoluci\u00f3n de llamada tty-portshutdown() no se llama para los puertos de consola, por lo que no es estrictamente necesario liberar la p\u00e1gina del b\u00fafer despu\u00e9s de liberar el bloqueo (cf. d72402145ace (\\\"tty/serial: no liberar la p\u00e1gina del b\u00fafer de transmisi\u00f3n en el puerto cerrar con llave\\\")).\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/00de977f9e0aa9760d9a79d1e41ff780f74e3424\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/011f6c92b5bf6e1fbfdedc8b5232f64c1c493206\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/1179b168fa3f3a6aae3bd140000455a0e58457db\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/64e491c1634b73d3bddc081d08620bdc92ab2c12\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/c5da8aa441053958594f94254592bb41264bdfbf\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/e1722acf4f0d4d67b60f57e08ce16f8b66cd4b8f\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/e74d9663fd57640fc3394abb5c76fa95b9cc2f2e\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


Log in or create an account to share your comment.




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.