Vulnerability · Published Oct 29, 2024 · Assigned by Linux
CVE-2024-50073tty: n_gsm: Fix use-after-free in gsm_cleanup_mux
High 7.8
In plain English
A high-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.3% (higher than 18% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: tty: n_gsm: Fix use-after-free in gsm_cleanup_mux BUG: KASAN: slab-use-after-free in gsm_cleanup_mux+0x77b/0x7b0 drivers/tty/n_gsm.c:3160 [n_gsm] Read of size 8 at addr ffff88815fe99c00 by task poc/3379 CPU: 0 UID: 0 PID: 3379 Comm: poc Not tainted 6.11.0+ #56 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020 Call Trace: <TASK> gsm_cleanup_mux+0x77b/0x7b0 drivers/tty/n_gsm.c:3160 [n_gsm] __pfx_gsm_cleanup_mux+0x10/0x10 drivers/tty/n_gsm.c:3124 [n_gsm] __pfx_sched_clock_cpu+0x10/0x10 kernel/sched/clock.c:389 update_load_avg+0x1c1/0x27b0 kernel/sched/fair.c:4500 __pfx_min_vruntime_cb_rotate+0x10/0x10 kernel/sched/fair.c:846 __rb_insert_augmented+0x492/0xbf0 lib/rbtree.c:161 gsmld_ioctl+0x395/0x1450 drivers/tty/n_gsm.c:3408 [n_gsm] _raw_spin_lock_irqsave+0x92/0xf0 arch/x86/include/asm/atomic.h:107 __pfx_gsmld_ioctl+0x10/0x10 drivers/tty/n_gsm.c:3822 [n_gsm] ktime_get+0x5e/0x140 kernel/time/timekeeping.c:195 ldsem_down_read+0x94/0x4e0 arch/x86/include/asm/atomic64_64.h:79 __pfx_ldsem_down_read+0x10/0x10 drivers/tty/tty_ldsem.c:338 __pfx_do_vfs_ioctl+0x10/0x10 fs/ioctl.c:805 tty_ioctl+0x643/0x1100 drivers/tty/tty_io.c:2818 Allocated by task 65: gsm_data_alloc.constprop.0+0x27/0x190 drivers/tty/n_gsm.c:926 [n_gsm] gsm_send+0x2c/0x580 drivers/tty/n_gsm.c:819 [n_gsm] gsm1_receive+0x547/0xad0 drivers/tty/n_gsm.c:3038 [n_gsm] gsmld_receive_buf+0x176/0x280 drivers/tty/n_gsm.c:3609 [n_gsm] tty_ldisc_receive_buf+0x101/0x1e0 drivers/tty/tty_buffer.c:391 tty_port_default_receive_buf+0x61/0xa0 drivers/tty/tty_port.c:39 flush_to_ldisc+0x1b0/0x750 drivers/tty/tty_buffer.c:445 process_scheduled_works+0x2b0/0x10d0 kernel/workqueue.c:3229 worker_thread+0x3dc/0x950 kernel/workqueue.c:3391 kthread+0x2a3/0x370 kernel/kthread.c:389 ret_from_fork+0x2d/0x70 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:257 Freed by task 3367: kfree+0x126/0x420 mm/slub.c:4580 gsm_cleanup_mux+0x36c/0x7b0 drivers/tty/n_gsm.c:3160 [n_gsm] gsmld_ioctl+0x395/0x1450 drivers/tty/n_gsm.c:3408 [n_gsm] tty_ioctl+0x643/0x1100 drivers/tty/tty_io.c:2818 [Analysis] gsm_msg on the tx_ctrl_list or tx_data_list of gsm_mux can be freed by multi threads through ioctl,which leads to the occurrence of uaf. Protect it by gsm tx lock.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.115-1 | DEBIAN-CVE-2024-50073 |
| Debian:13 | linux | 6.11.5-1 | DEBIAN-CVE-2024-50073 |
| Debian:14 | linux | 6.11.5-1 | DEBIAN-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux | 5.15.0-151.161 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux | 5.15.0-151.161 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-56.58 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1089.96 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1089.96 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1025.27 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1027.29~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1094.103 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1094.103 | USN-7711-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1025.30 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1025.30~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1094.103.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1088.97 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1088.97 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1026.28 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1026.28~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1086.92 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1086.92 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1021.25 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1071.79 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1071.79 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1008.10 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-57.59~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1081.84 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1081.84 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1022.22 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1023.23~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1084.90 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1084.90 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1085.90 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1085.90 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-145.158 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-145.158 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-56.58.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-56.58.1~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1083.84 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1083.84 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1024.27 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1024.27~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1024.27.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1042.42 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1042.42 | USN-7683-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1004.4 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1031.31 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1031.31 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1024.24 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1086.92 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1086.92 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1022.23 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1022.23~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1083.86 | USN-7686-1 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1083.86 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-56.58.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-56.58.1~22.04.1 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-50073 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-50073 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1053.57 | USN-7683-1 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1053.57 | UBUNTU-CVE-2024-50073 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 0af021678d5d30c31f5a6b631f404ead3575212a – before bf171b5e86e41de4c1cf32fb7aefa275c3d7de490af021678d5d30c31f5a6b631f404ead3575212a – before c29f192e0d44cc1cbaf698fa1ff198f63556691a0af021678d5d30c31f5a6b631f404ead3575212a – before 0eec592c6a7460ba795d7de29f3dc95cb5422e620af021678d5d30c31f5a6b631f404ead3575212a – before 9462f4ca56e7d2430fdb6dcc8498244acbfc44895020173e7e7725110a8d4be1359bf1dfc4b1814dc165698c9919b000bdbe73859d3bb7b33bdb92237962a4b900099cf90e02859bb297f2c618d8d9405.15.209 – before 5.16 |
| Linux | Linux | 6.0 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/bf171b5e86e41de4c1cf32fb7aefa275c3d7de49
- https://git.kernel.org/stable/c/c29f192e0d44cc1cbaf698fa1ff198f63556691a
- https://git.kernel.org/stable/c/0eec592c6a7460ba795d7de29f3dc95cb5422e62
- https://git.kernel.org/stable/c/9462f4ca56e7d2430fdb6dcc8498244acbfc4489
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html