cve-2024-35977
Vulnerability from cvelistv5
Published
2024-05-20 09:42
Modified
2024-11-05 09:26
Severity ?
Summary
platform/chrome: cros_ec_uart: properly fix race condition
Impacted products
Vendor Product Version
Linux Linux Version: 6.3
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T03:21:49.031Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-35977",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:40:22.902281Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:33:13.323Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/platform/chrome/cros_ec_uart.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "cfd758041d8b",
              "status": "affected",
              "version": "01f95d42b8f4",
              "versionType": "git"
            },
            {
              "lessThan": "9e9bb74a93b7",
              "status": "affected",
              "version": "01f95d42b8f4",
              "versionType": "git"
            },
            {
              "lessThan": "5e700b384ec1",
              "status": "affected",
              "version": "01f95d42b8f4",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/platform/chrome/cros_ec_uart.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.3"
            },
            {
              "lessThan": "6.3",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.28",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nplatform/chrome: cros_ec_uart: properly fix race condition\n\nThe cros_ec_uart_probe() function calls devm_serdev_device_open() before\nit calls serdev_device_set_client_ops(). This can trigger a NULL pointer\ndereference:\n\n    BUG: kernel NULL pointer dereference, address: 0000000000000000\n    ...\n    Call Trace:\n     \u003cTASK\u003e\n     ...\n     ? ttyport_receive_buf\n\nA simplified version of crashing code is as follows:\n\n    static inline size_t serdev_controller_receive_buf(struct serdev_controller *ctrl,\n                                                      const u8 *data,\n                                                      size_t count)\n    {\n            struct serdev_device *serdev = ctrl-\u003eserdev;\n\n            if (!serdev || !serdev-\u003eops-\u003ereceive_buf) // CRASH!\n                return 0;\n\n            return serdev-\u003eops-\u003ereceive_buf(serdev, data, count);\n    }\n\nIt assumes that if SERPORT_ACTIVE is set and serdev exists, serdev-\u003eops\nwill also exist. This conflicts with the existing cros_ec_uart_probe()\nlogic, as it first calls devm_serdev_device_open() (which sets\nSERPORT_ACTIVE), and only later sets serdev-\u003eops via\nserdev_device_set_client_ops().\n\nCommit 01f95d42b8f4 (\"platform/chrome: cros_ec_uart: fix race\ncondition\") attempted to fix a similar race condition, but while doing\nso, made the window of error for this race condition to happen much\nwider.\n\nAttempt to fix the race condition again, making sure we fully setup\nbefore calling devm_serdev_device_open()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:26:06.426Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702"
        },
        {
          "url": "https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8"
        },
        {
          "url": "https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593"
        }
      ],
      "title": "platform/chrome: cros_ec_uart: properly fix race condition",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-35977",
    "datePublished": "2024-05-20T09:42:03.077Z",
    "dateReserved": "2024-05-17T13:50:33.143Z",
    "dateUpdated": "2024-11-05T09:26:06.426Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-35977\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-20T10:15:12.340\",\"lastModified\":\"2024-05-20T13:00:04.957\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nplatform/chrome: cros_ec_uart: properly fix race condition\\n\\nThe cros_ec_uart_probe() function calls devm_serdev_device_open() before\\nit calls serdev_device_set_client_ops(). This can trigger a NULL pointer\\ndereference:\\n\\n    BUG: kernel NULL pointer dereference, address: 0000000000000000\\n    ...\\n    Call Trace:\\n     \u003cTASK\u003e\\n     ...\\n     ? ttyport_receive_buf\\n\\nA simplified version of crashing code is as follows:\\n\\n    static inline size_t serdev_controller_receive_buf(struct serdev_controller *ctrl,\\n                                                      const u8 *data,\\n                                                      size_t count)\\n    {\\n            struct serdev_device *serdev = ctrl-\u003eserdev;\\n\\n            if (!serdev || !serdev-\u003eops-\u003ereceive_buf) // CRASH!\\n                return 0;\\n\\n            return serdev-\u003eops-\u003ereceive_buf(serdev, data, count);\\n    }\\n\\nIt assumes that if SERPORT_ACTIVE is set and serdev exists, serdev-\u003eops\\nwill also exist. This conflicts with the existing cros_ec_uart_probe()\\nlogic, as it first calls devm_serdev_device_open() (which sets\\nSERPORT_ACTIVE), and only later sets serdev-\u003eops via\\nserdev_device_set_client_ops().\\n\\nCommit 01f95d42b8f4 (\\\"platform/chrome: cros_ec_uart: fix race\\ncondition\\\") attempted to fix a similar race condition, but while doing\\nso, made the window of error for this race condition to happen much\\nwider.\\n\\nAttempt to fix the race condition again, making sure we fully setup\\nbefore calling devm_serdev_device_open().\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: plataforma/chrome: cros_ec_uart: corrige correctamente la condici\u00f3n de ejecuci\u00f3n. La funci\u00f3n cros_ec_uart_probe() llama a devm_serdev_device_open() antes de llamar a serdev_device_set_client_ops(). Esto puede desencadenar una desreferencia del puntero NULL: ERROR: desreferencia del puntero NULL del kernel, direcci\u00f3n: 0000000000000000... Seguimiento de llamadas: ...? ttyport_receive_buf Una versi\u00f3n simplificada del c\u00f3digo de bloqueo es la siguiente: static inline size_t serdev_controller_receive_buf(struct serdev_controller *ctrl, const u8 *data, size_t count) { struct serdev_device *serdev = ctrl-\u0026gt;serdev; if (!serdev || !serdev-\u0026gt;ops-\u0026gt;receive_buf) // \u00a1CRASH! devolver 0; devolver serdev-\u0026gt;ops-\u0026gt;receive_buf(serdev, datos, recuento); } Se supone que si SERPORT_ACTIVE est\u00e1 configurado y serdev existe, serdev-\u0026gt;ops tambi\u00e9n existir\u00e1. Esto entra en conflicto con la l\u00f3gica cros_ec_uart_probe() existente, ya que primero llama a devm_serdev_device_open() (que configura SERPORT_ACTIVE), y solo luego configura serdev-\u0026gt;ops a trav\u00e9s de serdev_device_set_client_ops(). La confirmaci\u00f3n 01f95d42b8f4 (\\\"plataforma/chrome: cros_ec_uart: arreglar condici\u00f3n de ejecuci\u00f3n\\\") intent\u00f3 arreglar una condici\u00f3n de ejecuci\u00f3n similar, pero al hacerlo, hizo que la ventana de error para que esta condici\u00f3n de ejecuci\u00f3n ocurriera fuera mucho m\u00e1s amplia. Intente corregir la condici\u00f3n de ejecuci\u00f3n nuevamente, asegur\u00e1ndose de realizar la configuraci\u00f3n completa antes de llamar a devm_serdev_device_open().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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.