{"id":"CVE-2022-49371","aliases":["CVE-2022-49371"],"related":[],"kind":"vulnerability","state":"published","title":"driver core: fix deadlock in __device_attach","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix deadlock in __device_attach\n\nIn __device_attach function, The lock holding logic is as follows:\n...\n__device_attach\ndevice_lock(dev)      // get lock dev\n  async_schedule_dev(__device_attach_async_helper, dev); // func\n    async_schedule_node\n      async_schedule_node_domain(func)\n        entry = kzalloc(sizeof(struct async_entry), GFP_ATOMIC);\n\t/* when fail or work limit, sync to execute func, but\n\t   __device_attach_async_helper will get lock dev as\n\t   well, which will lead to A-A deadlock.  */\n\tif (!entry || atomic_read(&entry_count) > MAX_WORK) {\n\t  func;\n\telse\n\t  queue_work_node(node, system_unbound_wq, &entry->work)\n  device_unlock(dev)\n\nAs shown above, when it is allowed to do async probes, because of\nout of memory or work limit, async work is not allowed, to do\nsync execute instead. it will lead to A-A deadlock because of\n__device_attach_async_helper getting lock dev.\n\nTo fix the deadlock, move the async_schedule_dev outside device_lock,\nas we can see, in async_schedule_node_domain, the parameter of\nqueue_work_node is system_unbound_wq, so it can accept concurrent\noperations. which will also not change the code logic, and will\nnot lead to deadlock.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndriver core: fix deadlock in __device_attach\n\nIn __device_attach function, The lock holding logic is as follows:\n...\n__device_attach\ndevice_lock(dev)      // get lock dev\n  async_schedule_dev(__device_attach_async_helper, dev); // func\n    async_schedule_node\n      async_schedule_node_domain(func)\n        entry = kzalloc(sizeof(struct async_entry), GFP_ATOMIC);\n\t/* when fail or work limit, sync to execute func, but\n\t   __device_attach_async_helper will get lock dev as\n\t   well, which will lead to A-A deadlock.  */\n\tif (!entry || atomic_read(&entry_count) > MAX_WORK) {\n\t  func;\n\telse\n\t  queue_work_node(node, system_unbound_wq, &entry->work)\n  device_unlock(dev)\n\nAs shown above, when it is allowed to do async probes, because of\nout of memory or work limit, async work is not allowed, to do\nsync execute instead. it will lead to A-A deadlock because of\n__device_attach_async_helper getting lock dev.\n\nTo fix the deadlock, move the async_schedule_dev outside device_lock,\nas we can see, in async_schedule_node_domain, the parameter of\nqueue_work_node is system_unbound_wq, so it can accept concurrent\noperations. which will also not change the code logic, and will\nnot lead to deadlock.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: núcleo del controlador: corregir un bloqueo en __device_attach En la función __device_attach, la lógica de retención de bloqueo es la siguiente:  ... __device_attach device_lock(dev) // get lock dev async_schedule_dev(__device_attach_async_helper, dev); // func async_schedule_node async_schedule_node_domain(func) entry = kzalloc(sizeof(struct async_entry), GFP_ATOMIC); /* when fail or work limit, sync to execute func, but __device_attach_async_helper will get lock dev as well, which will lead to A-A deadlock. */ if (!entry || atomic_read(&amp;entry_count) &gt; MAX_WORK) { func; else queue_work_node(node, system_unbound_wq, &amp;entry-&gt;work) device_unlock(dev) Como se muestra arriba, cuando se permite hacer sondeos asincrónicos, debido a falta de memoria o límite de trabajo, no se permite el trabajo asincrónico, para hacer la ejecución sincrónica en su lugar. conducirá a un interbloqueo AA debido a que __device_attach_async_helper obtiene el bloqueo dev. Para solucionar el interbloqueo, mueva async_schedule_dev fuera de device_lock, como podemos ver, en async_schedule_node_domain, el parámetro de queue_work_node es system_unbound_wq, por lo que puede aceptar operaciones simultáneas. lo que tampoco cambiará la lógica del código y no conducirá a un interbloqueo.","source":"nvd"}],"published":"2025-02-26T02:11:13.652Z","modified":"2026-06-17T05:17:51.317Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"593b595332bd2d65e1a5c1ae7897996c157f5468","status":"affected"},{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"36ee9ffca8ef56c302f2855c4a5fccf61c0c1ada","status":"affected"},{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"df6de52b80aa3b46f5ac804412355ffe2e1df93e","status":"affected"},{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"d53a227bfcd5160ce1b61d9954901968a20651e7","status":"affected"},{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"34fdd9b7def9d2fcb71bb7b0bc4848dd7313767e","status":"affected"},{"type":"git","introduced":"765230b5f084863183aa8adb3405ab3f32c0b16e","fixed":"b232b02bf3c205b13a26dcec08e53baddd8e59ed","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.2","status":"unaffected"},{"type":"semver","introduced":"5.4.198","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.122","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.47","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.17.15","lastAffected":"5.17.*","status":"unaffected"},{"type":"semver","introduced":"5.18.4","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","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":"4.2","fixed":"5.4.198"},{"status":"affected","introduced":"5.5","fixed":"5.10.122"},{"status":"affected","introduced":"5.11","fixed":"5.15.47"},{"status":"affected","introduced":"5.16","fixed":"5.17.15"},{"status":"affected","introduced":"5.18","fixed":"5.18.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/593b595332bd2d65e1a5c1ae7897996c157f5468","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/36ee9ffca8ef56c302f2855c4a5fccf61c0c1ada","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df6de52b80aa3b46f5ac804412355ffe2e1df93e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d53a227bfcd5160ce1b61d9954901968a20651e7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/34fdd9b7def9d2fcb71bb7b0bc4848dd7313767e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b232b02bf3c205b13a26dcec08e53baddd8e59ed","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-10-01T19:42:17.592Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49371","url":"https://www.cve.org/CVERecord?id=CVE-2022-49371","licence":"CVE Terms of Use","modified":"2026-05-11T18:58:23.689Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49371","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49371","licence":"Public domain","modified":"2026-06-17T05:17:51.317Z"}],"updatedAt":"2026-11-25T22:58:20.470Z","epss":{"score":0.00214,"percentile":0.12422,"date":"2026-12-01T12:00:22.000Z"}}