{"id":"CVE-2026-31509","aliases":["CVE-2026-31509"],"related":[],"kind":"vulnerability","state":"published","title":"nfc: nci: fix circular locking dependency in nci_close_device","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: nci: fix circular locking dependency in nci_close_device\n\nnci_close_device() flushes rx_wq and tx_wq while holding req_lock.\nThis causes a circular locking dependency because nci_rx_work()\nrunning on rx_wq can end up taking req_lock too:\n\n  nci_rx_work -> nci_rx_data_packet -> nci_data_exchange_complete\n    -> __sk_destruct -> rawsock_destruct -> nfc_deactivate_target\n    -> nci_deactivate_target -> nci_request -> mutex_lock(&ndev->req_lock)\n\nMove the flush of rx_wq after req_lock has been released.\nThis should safe (I think) because NCI_UP has already been cleared\nand the transport is closed, so the work will see it and return\n-ENETDOWN.\n\nNIPA has been hitting this running the nci selftest with a debug\nkernel on roughly 4% of the runs.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: nci: fix circular locking dependency in nci_close_device\n\nnci_close_device() flushes rx_wq and tx_wq while holding req_lock.\nThis causes a circular locking dependency because nci_rx_work()\nrunning on rx_wq can end up taking req_lock too:\n\n  nci_rx_work -> nci_rx_data_packet -> nci_data_exchange_complete\n    -> __sk_destruct -> rawsock_destruct -> nfc_deactivate_target\n    -> nci_deactivate_target -> nci_request -> mutex_lock(&ndev->req_lock)\n\nMove the flush of rx_wq after req_lock has been released.\nThis should safe (I think) because NCI_UP has already been cleared\nand the transport is closed, so the work will see it and return\n-ENETDOWN.\n\nNIPA has been hitting this running the nci selftest with a debug\nkernel on roughly 4% of the runs.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnfc: nci: corregir dependencia de bloqueo circular en nci_close_device\n\nnci_close_device() vacía rx_wq y tx_wq mientras mantiene req_lock. Esto causa una dependencia de bloqueo circular porque nci_rx_work() ejecutándose en rx_wq puede terminar tomando req_lock también:\n\nnci_rx_work   ->   nci_rx_data_packet   ->   nci_data_exchange_complete\n  ->   __sk_destruct   ->   rawsock_destruct   ->   nfc_deactivate_target\n  ->   nci_deactivate_target   ->   nci_request   ->   mutex_lock(ref:ndev  ->  req_lock)\n\nMover el vaciado de rx_wq después de que req_lock haya sido liberado. Esto debería ser seguro (creo) porque NCI_UP ya ha sido borrado y el transporte está cerrado, así que el trabajo lo verá y devolverá -ENETDOWN.\n\nNIPA ha estado encontrando esto ejecutando la autoprueba nci con un kernel de depuración en aproximadamente el 4% de las ejecuciones.","source":"nvd"}],"published":"2026-04-22T13:54:27.436Z","modified":"2026-11-11T23:10:00.263Z","severity":{"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"},"severities":[{"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":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"7ed00a3edc8597fe2333f524401e2889aa1b5edf","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"5eef9ebec7f5738f12cadede3545c05b34bf5ac3","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"ca54e904a071aa65ef3ad46ba42d51aaac6b73b4","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"eb435d150ca74b4d40f77f1a2266f3636ed64a79","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"1edc12d2bbcb7a8d0f1088e6fccb9d8c01bb1289","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"d89b74bf08f067b55c03d7f999ba0a0e73177eb3","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"09143c0e8f3b03517e6233aad42f45c794d8df8e","status":"affected"},{"type":"git","introduced":"6a2968aaf50c7a22fced77a5e24aa636281efca8","fixed":"4527025d440ce84bf56e75ce1df2e84cb8178616","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.2","status":"unaffected"},{"type":"semver","introduced":"5.10.253","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.203","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.168","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.131","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.80","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.21","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.11","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","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":"3.2.1","fixed":"5.10.253"},{"status":"affected","introduced":"5.11","fixed":"5.15.203"},{"status":"affected","introduced":"5.16","fixed":"6.1.168"},{"status":"affected","introduced":"6.2","fixed":"6.6.131"},{"status":"affected","introduced":"6.7","fixed":"6.12.80"},{"status":"affected","introduced":"6.13","fixed":"6.18.21"},{"status":"affected","introduced":"6.19","fixed":"6.19.11"},{"status":"affected","version":"3.2"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/7ed00a3edc8597fe2333f524401e2889aa1b5edf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5eef9ebec7f5738f12cadede3545c05b34bf5ac3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ca54e904a071aa65ef3ad46ba42d51aaac6b73b4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eb435d150ca74b4d40f77f1a2266f3636ed64a79","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1edc12d2bbcb7a8d0f1088e6fccb9d8c01bb1289","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d89b74bf08f067b55c03d7f999ba0a0e73177eb3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/09143c0e8f3b03517e6233aad42f45c794d8df8e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4527025d440ce84bf56e75ce1df2e84cb8178616","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31509","url":"https://www.cve.org/CVERecord?id=CVE-2026-31509","licence":"CVE Terms of Use","modified":"2026-05-11T22:10:10.109Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31509","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31509","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.302Z","epss":{"score":0.00098,"percentile":0.0082,"date":"2026-12-01T12:00:22.000Z"}}