{"id":"CVE-2023-54152","state":"PUBLISHED","title":"can: j1939: prevent deadlock by moving j1939_sk_errqueue()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: j1939: prevent deadlock by moving j1939_sk_errqueue()\n\nThis commit addresses a deadlock situation that can occur in certain\nscenarios, such as when running data TP/ETP transfer and subscribing to\nthe error queue while receiving a net down event. The deadlock involves\nlocks in the following order:\n\n3\n  j1939_session_list_lock ->  active_session_list_lock\n  j1939_session_activate\n  ...\n  j1939_sk_queue_activate_next -> sk_session_queue_lock\n  ...\n  j1939_xtp_rx_eoma_one\n\n2\n  j1939_sk_queue_drop_all  ->  sk_session_queue_lock\n  ...\n  j1939_sk_netdev_event_netdown -> j1939_socks_lock\n  j1939_netdev_notify\n\n1\n  j1939_sk_errqueue -> j1939_socks_lock\n  __j1939_session_cancel -> active_session_list_lock\n  j1939_tp_rxtimer\n\n       CPU0                    CPU1\n       ----                    ----\n  lock(&priv->active_session_list_lock);\n                               lock(&jsk->sk_session_queue_lock);\n                               lock(&priv->active_session_list_lock);\n  lock(&priv->j1939_socks_lock);\n\nThe solution implemented in this commit is to move the\nj1939_sk_errqueue() call out of the active_session_list_lock context,\nthus preventing the deadlock situation.","publishedAt":"2025-12-24T13:07:03.310Z","updatedAt":"2026-05-11T19:56:29.583Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"8a581b71cf686b4cd1a85c9c2dfc2fb88382c3b4","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"ace6aa2ab5ba5869563ca689bbd912100514ae7b","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"f09ce9d765de1f064ce3919f57c6beb061744784","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"d1366b283d94ac4537a4b3a1e8668da4df7ce7e9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/j1939/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.106","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.10","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/j1939/transport.c"]}],"references":["https://git.kernel.org/stable/c/8a581b71cf686b4cd1a85c9c2dfc2fb88382c3b4","https://git.kernel.org/stable/c/ace6aa2ab5ba5869563ca689bbd912100514ae7b","https://git.kernel.org/stable/c/f09ce9d765de1f064ce3919f57c6beb061744784","https://git.kernel.org/stable/c/d1366b283d94ac4537a4b3a1e8668da4df7ce7e9"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54152.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54152","state":"PUBLISHED","datePublished":"2025-12-24T13:07:03.310Z","dateUpdated":"2026-05-11T19:56:29.583Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-24T13:02:52.529Z"},"containers":{"cna":{"title":"can: j1939: prevent deadlock by moving j1939_sk_errqueue()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncan: j1939: prevent deadlock by moving j1939_sk_errqueue()\n\nThis commit addresses a deadlock situation that can occur in certain\nscenarios, such as when running data TP/ETP transfer and subscribing to\nthe error queue while receiving a net down event. The deadlock involves\nlocks in the following order:\n\n3\n  j1939_session_list_lock ->  active_session_list_lock\n  j1939_session_activate\n  ...\n  j1939_sk_queue_activate_next -> sk_session_queue_lock\n  ...\n  j1939_xtp_rx_eoma_one\n\n2\n  j1939_sk_queue_drop_all  ->  sk_session_queue_lock\n  ...\n  j1939_sk_netdev_event_netdown -> j1939_socks_lock\n  j1939_netdev_notify\n\n1\n  j1939_sk_errqueue -> j1939_socks_lock\n  __j1939_session_cancel -> active_session_list_lock\n  j1939_tp_rxtimer\n\n       CPU0                    CPU1\n       ----                    ----\n  lock(&priv->active_session_list_lock);\n                               lock(&jsk->sk_session_queue_lock);\n                               lock(&priv->active_session_list_lock);\n  lock(&priv->j1939_socks_lock);\n\nThe solution implemented in this commit is to move the\nj1939_sk_errqueue() call out of the active_session_list_lock context,\nthus preventing the deadlock situation."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"8a581b71cf686b4cd1a85c9c2dfc2fb88382c3b4","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"ace6aa2ab5ba5869563ca689bbd912100514ae7b","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"f09ce9d765de1f064ce3919f57c6beb061744784","versionType":"git"},{"version":"5b9272e93f2efe3f6cda60cc2c26817b2ce49386","status":"affected","lessThan":"d1366b283d94ac4537a4b3a1e8668da4df7ce7e9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/j1939/transport.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"5.15.106","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.10","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/can/j1939/transport.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8a581b71cf686b4cd1a85c9c2dfc2fb88382c3b4"},{"url":"https://git.kernel.org/stable/c/ace6aa2ab5ba5869563ca689bbd912100514ae7b"},{"url":"https://git.kernel.org/stable/c/f09ce9d765de1f064ce3919f57c6beb061744784"},{"url":"https://git.kernel.org/stable/c/d1366b283d94ac4537a4b3a1e8668da4df7ce7e9"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:56:29.583Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"5.15.106"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.2.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}