Vulnerability · Published Apr 3, 2024 · Assigned by Linux

CVE-2023-52638can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 8% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 92.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock The following 3 locks would race against each other, causing the deadlock situation in the Syzbot bug report: - j1939_socks_lock - active_session_list_lock - sk_session_queue_lock A reasonable fix is to change j1939_socks_lock to an rwlock, since in the rare situations where a write lock is required for the linked list that j1939_socks_lock is protecting, the code does not attempt to acquire any more locks. This would break the circular lock dependency, where, for example, the current thread already locks j1939_socks_lock and attempts to acquire sk_session_queue_lock, and at the same time, another thread attempts to acquire j1939_socks_lock while holding sk_session_queue_lock. NOTE: This patch along does not fix the unregister_netdevice bug reported by Syzbot; instead, it solves a deadlock situation to prepare for one or more further patches to actually fix the Syzbot bug, which appears to be a reference counting problem within the j1939 codebase. [mkl: remove unrelated newline change]

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9bpftool7.3.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-devel-matched5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-debug-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-devel-matched5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-64k-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-abi-stablelists5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-cross-headers5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-devel-matched5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-debug-uki-virt5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-devel-matched5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-doc5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-headers5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-debug-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-rt-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-tools5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-tools-libs5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-tools-libs-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-uki-virt5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-devel5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-devel-matched5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-modules5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-modules-core5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9kernel-zfcpdump-modules-extra5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9libperf5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9perf5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9python3-perf5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9rtla5.14.0-427.26.1.el9_4ALSA-2024:4583
AlmaLinux:9rv5.14.0-427.26.1.el9_4ALSA-2024:4583
Debian:12linux6.1.82-1DEBIAN-CVE-2023-52638
Debian:13linux6.7.7-1DEBIAN-CVE-2023-52638
Debian:14linux6.7.7-1DEBIAN-CVE-2023-52638
Rocky Linux:9kernel0:5.14.0-427.26.1.el9_4RLSA-2024:4583
Ubuntu:22.04:LTSlinux5.15.0-106.116UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux5.15.0-106.116USN-6766-1
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-aws5.15.0-1061.67UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-aws5.15.0-1061.67USN-6766-3
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-aws-6.56.5.0-1023.23~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-aws-6.56.5.0-1023.23~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure5.15.0-1063.72USN-6766-1
Ubuntu:22.04:LTSlinux-azure5.15.0-1063.72UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1024.25~22.04.1USN-6895-2
Ubuntu:22.04:LTSlinux-azure-6.56.5.0-1024.25~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1063.72.1USN-6766-1
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1063.72.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gcp5.15.0-1059.67UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gcp5.15.0-1059.67USN-6766-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1024.26~22.04.1USN-6895-2
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1024.26~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gke5.15.0-1058.63USN-6766-1
Ubuntu:22.04:LTSlinux-gke5.15.0-1058.63UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1044.51USN-6766-1
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1044.51UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-44.44~22.04.1USN-6900-1
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-44.44~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-ibm5.15.0-1054.57USN-6766-1
Ubuntu:22.04:LTSlinux-ibm5.15.0-1054.57UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1057.63USN-6795-1
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1057.63UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-kvm5.15.0-1058.63USN-6766-1
Ubuntu:22.04:LTSlinux-kvm5.15.0-1058.63UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-106.116USN-6766-1
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-106.116UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-44.44.1~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-44.44.1~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1054.55UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1054.55USN-6766-1
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1023.24UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1023.24USN-6895-1
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1026.26UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1015.15UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1027.28USN-6895-4
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1027.28UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oracle5.15.0-1059.65USN-6766-1
Ubuntu:22.04:LTSlinux-oracle5.15.0-1059.65UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1026.26~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1026.26~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-raspi5.15.0-1054.57UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-raspi5.15.0-1054.57USN-6766-2
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1017.18~22.04.1USN-6895-3
Ubuntu:22.04:LTSlinux-starfive-6.56.5.0-1017.18~22.04.1UBUNTU-CVE-2023-52638
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1030.34UBUNTU-CVE-2023-52638

Affected products (as reported)

VendorProductVersions
Linux Linux 5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 03358aba991668d3bb2c65b3c82aa32c368511705b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before aedda066d717a0b4335d7e0a00b2e3a61e40afcf5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 26dfe112ec2e95fe0099681f6aec33da13c2dd8e5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 559b6322f9480bff68cfa98d108991e945a4f2845b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 6cdedc18ba7b9dacc36466e27e3267d201948c8d
Linux Linux 5.15

References