{"id":"CVE-2024-35977","aliases":["CVE-2024-35977"],"related":[],"kind":"vulnerability","state":"published","title":"platform/chrome: cros_ec_uart: properly fix race condition","summary":"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     <TASK>\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->serdev;\n\n            if (!serdev || !serdev->ops->receive_buf) // CRASH!\n                return 0;\n\n            return serdev->ops->receive_buf(serdev, data, count);\n    }\n\nIt assumes that if SERPORT_ACTIVE is set and serdev exists, serdev->ops\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->ops 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().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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     <TASK>\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->serdev;\n\n            if (!serdev || !serdev->ops->receive_buf) // CRASH!\n                return 0;\n\n            return serdev->ops->receive_buf(serdev, data, count);\n    }\n\nIt assumes that if SERPORT_ACTIVE is set and serdev exists, serdev->ops\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->ops 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().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: plataforma/chrome: cros_ec_uart: corrige correctamente la condición de ejecución. La función 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ón: 0000000000000000... Seguimiento de llamadas: ...? ttyport_receive_buf Una versión simplificada del código 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-&gt;serdev; if (!serdev || !serdev-&gt;ops-&gt;receive_buf) // ¡CRASH! devolver 0; devolver serdev-&gt;ops-&gt;receive_buf(serdev, datos, recuento); } Se supone que si SERPORT_ACTIVE está configurado y serdev existe, serdev-&gt;ops también existirá. Esto entra en conflicto con la lógica cros_ec_uart_probe() existente, ya que primero llama a devm_serdev_device_open() (que configura SERPORT_ACTIVE), y solo luego configura serdev-&gt;ops a través de serdev_device_set_client_ops(). La confirmación 01f95d42b8f4 (\"plataforma/chrome: cros_ec_uart: arreglar condición de ejecución\") intentó arreglar una condición de ejecución similar, pero al hacerlo, hizo que la ventana de error para que esta condición de ejecución ocurriera fuera mucho más amplia. Intente corregir la condición de ejecución nuevamente, asegurándose de realizar la configuración completa antes de llamar a devm_serdev_device_open().","source":"nvd"}],"published":"2024-05-20T09:42:03.077Z","modified":"2026-06-17T07:35:51.797Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-362","CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9","fixed":"cfd758041d8b79aa8c3f811b6bd6105379f2f702","status":"affected"},{"type":"git","introduced":"01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9","fixed":"9e9bb74a93b7daa32313ccaefd0edc529d40daf8","status":"affected"},{"type":"git","introduced":"01f95d42b8f4e88f20d68791b0a85dbb9e3d1ac9","fixed":"5e700b384ec13f5bcac9855cb28fcc674f1d3593","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.3","status":"unaffected"},{"type":"semver","introduced":"6.6.28","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.7","lastAffected":"6.8.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.9","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.3","fixed":"6.6.28"},{"status":"affected","introduced":"6.7","fixed":"6.8.7"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"},{"status":"affected","version":"6.9"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/cfd758041d8b79aa8c3f811b6bd6105379f2f702","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e9bb74a93b7daa32313ccaefd0edc529d40daf8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5e700b384ec13f5bcac9855cb28fcc674f1d3593","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:40:22.902Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-35977","url":"https://www.cve.org/CVERecord?id=CVE-2024-35977","licence":"CVE Terms of Use","modified":"2026-05-11T20:14:51.835Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-35977","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-35977","licence":"Public domain","modified":"2026-06-17T07:35:51.797Z"}],"updatedAt":"2026-11-25T22:58:40.647Z","epss":{"score":0.00174,"percentile":0.07133,"date":"2026-12-01T12:00:22.000Z"}}