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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | bpftool | 7.3.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-devel-matched | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-debug-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-devel-matched | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-64k-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-abi-stablelists | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-cross-headers | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-devel-matched | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-debug-uki-virt | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-devel-matched | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-doc | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-headers | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-debug-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-rt-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-tools | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-tools-libs | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-tools-libs-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-uki-virt | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-devel | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-devel-matched | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-modules | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-modules-core | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | kernel-zfcpdump-modules-extra | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | libperf | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | perf | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | python3-perf | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | rtla | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| AlmaLinux:9 | rv | 5.14.0-427.26.1.el9_4 | ALSA-2024:4583 |
| Debian:12 | linux | 6.1.82-1 | DEBIAN-CVE-2023-52638 |
| Debian:13 | linux | 6.7.7-1 | DEBIAN-CVE-2023-52638 |
| Debian:14 | linux | 6.7.7-1 | DEBIAN-CVE-2023-52638 |
| Rocky Linux:9 | kernel | 0:5.14.0-427.26.1.el9_4 | RLSA-2024:4583 |
| Ubuntu:22.04:LTS | linux | 5.15.0-106.116 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux | 5.15.0-106.116 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1061.67 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1061.67 | USN-6766-3 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | 6.5.0-1023.23~22.04.1 | USN-6895-3 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | 6.5.0-1023.23~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1063.72 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1063.72 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | 6.5.0-1024.25~22.04.1 | USN-6895-2 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | 6.5.0-1024.25~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1063.72.1 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1063.72.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1059.67 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1059.67 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 6.5.0-1024.26~22.04.1 | USN-6895-2 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 6.5.0-1024.26~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1058.63 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1058.63 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1044.51 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1044.51 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 6.5.0-44.44~22.04.1 | USN-6900-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 6.5.0-44.44~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1054.57 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1054.57 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1057.63 | USN-6795-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1057.63 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1058.63 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1058.63 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-106.116 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-106.116 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 6.5.0-44.44.1~22.04.1 | USN-6895-3 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 6.5.0-44.44.1~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1054.55 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1054.55 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1023.24 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1023.24 | USN-6895-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1026.26 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1015.15 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 6.5.0-1027.28 | USN-6895-4 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 6.5.0-1027.28 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1059.65 | USN-6766-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1059.65 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 6.5.0-1026.26~22.04.1 | USN-6895-3 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 6.5.0-1026.26~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1054.57 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1054.57 | USN-6766-2 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | 6.5.0-1017.18~22.04.1 | USN-6895-3 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | 6.5.0-1017.18~22.04.1 | UBUNTU-CVE-2023-52638 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | UBUNTU-CVE-2023-52638 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 03358aba991668d3bb2c65b3c82aa32c368511705b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before aedda066d717a0b4335d7e0a00b2e3a61e40afcf5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 26dfe112ec2e95fe0099681f6aec33da13c2dd8e5b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 559b6322f9480bff68cfa98d108991e945a4f2845b9272e93f2efe3f6cda60cc2c26817b2ce49386 – before 6cdedc18ba7b9dacc36466e27e3267d201948c8d |
| Linux | Linux | 5.15 |
References
- https://git.kernel.org/stable/c/03358aba991668d3bb2c65b3c82aa32c36851170
- https://git.kernel.org/stable/c/aedda066d717a0b4335d7e0a00b2e3a61e40afcf
- https://git.kernel.org/stable/c/26dfe112ec2e95fe0099681f6aec33da13c2dd8e
- https://git.kernel.org/stable/c/559b6322f9480bff68cfa98d108991e945a4f284
- https://git.kernel.org/stable/c/6cdedc18ba7b9dacc36466e27e3267d201948c8d