Vulnerability · Published Dec 27, 2024 · Assigned by Linux
CVE-2024-56640net/smc: fix LGR and link use-after-free issue
Critical 9.8
In plain English
A critical-severity use-after-free 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.6% (higher than 50% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: net/smc: fix LGR and link use-after-free issue We encountered a LGR/link use-after-free issue, which manifested as the LGR/link refcnt reaching 0 early and entering the clear process, making resource access unsafe. refcount_t: addition on 0; use-after-free. WARNING: CPU: 14 PID: 107447 at lib/refcount.c:25 refcount_warn_saturate+0x9c/0x140 Workqueue: events smc_lgr_terminate_work [smc] Call trace: refcount_warn_saturate+0x9c/0x140 __smc_lgr_terminate.part.45+0x2a8/0x370 [smc] smc_lgr_terminate_work+0x28/0x30 [smc] process_one_work+0x1b8/0x420 worker_thread+0x158/0x510 kthread+0x114/0x118 or refcount_t: underflow; use-after-free. WARNING: CPU: 6 PID: 93140 at lib/refcount.c:28 refcount_warn_saturate+0xf0/0x140 Workqueue: smc_hs_wq smc_listen_work [smc] Call trace: refcount_warn_saturate+0xf0/0x140 smcr_link_put+0x1cc/0x1d8 [smc] smc_conn_free+0x110/0x1b0 [smc] smc_conn_abort+0x50/0x60 [smc] smc_listen_find_device+0x75c/0x790 [smc] smc_listen_work+0x368/0x8a0 [smc] process_one_work+0x1b8/0x420 worker_thread+0x158/0x510 kthread+0x114/0x118 It is caused by repeated release of LGR/link refcnt. One suspect is that smc_conn_free() is called repeatedly because some smc_conn_free() from server listening path are not protected by sock lock. e.g. Calls under socklock | smc_listen_work ------------------------------------------------------- lock_sock(sk) | smc_conn_abort smc_conn_free | \- smc_conn_free \- smcr_link_put | \- smcr_link_put (duplicated) release_sock(sk) So here add sock lock protection in smc_listen_work() path, making it exclusive with other connection operations.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.123-1 | DEBIAN-CVE-2024-56640 |
| Debian:13 | linux | 6.12.5-1 | DEBIAN-CVE-2024-56640 |
| Debian:14 | linux | 6.12.5-1 | DEBIAN-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux | 5.15.0-135.146 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux | 6.8.0-58.60 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1080.87 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1027.29 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1027.29~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1084.93 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1027.32 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1027.32~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1084.93.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1079.88 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1028.30 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1028.30~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1077.83 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1023.27 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1062.70 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1010.12 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | 6.11.0-21.21~24.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-58.60~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1072.75 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1024.24 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1024.24~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | 5.15.0-1073.75 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1075.81 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1076.81 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-135.146 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-58.60.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-58.60.1~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1074.75 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1026.29 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1026.29~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1026.29.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1033.33 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1021.21 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1017.17 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1026.26 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1077.83 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1024.25 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1024.25~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1074.77 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-58.60.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-58.60.1~22.04.1 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-56640 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-56640 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1044.48 | UBUNTU-CVE-2024-56640 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3b2dec2603d5b06ad3af71c1164ca0b92df3d2a8 – before f502a88fdd415647a1f2dc45fac71b9c522a052b3b2dec2603d5b06ad3af71c1164ca0b92df3d2a8 – before 0cf598548a6c36d90681d53c6b77d52363f2f2953b2dec2603d5b06ad3af71c1164ca0b92df3d2a8 – before 673d606683ac70bc074ca6676b938bff186352263b2dec2603d5b06ad3af71c1164ca0b92df3d2a8 – before 6f0ae06a234a78ae137064f2c89135ac078a00eb3b2dec2603d5b06ad3af71c1164ca0b92df3d2a8 – before 2c7f14ed9c19ec0f149479d1c2842ec1f9bf76d7 |
| Linux | Linux | 4.18 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/f502a88fdd415647a1f2dc45fac71b9c522a052b
- https://git.kernel.org/stable/c/0cf598548a6c36d90681d53c6b77d52363f2f295
- https://git.kernel.org/stable/c/673d606683ac70bc074ca6676b938bff18635226
- https://git.kernel.org/stable/c/6f0ae06a234a78ae137064f2c89135ac078a00eb
- https://git.kernel.org/stable/c/2c7f14ed9c19ec0f149479d1c2842ec1f9bf76d7
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html