Vulnerability · Published Mar 2, 2024 · Assigned by Linux

CVE-2023-52564Revert "tty: n_gsm: fix UAF in gsm_cleanup_mux"

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 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 83.5% 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: Revert "tty: n_gsm: fix UAF in gsm_cleanup_mux" This reverts commit 9b9c8195f3f0d74a826077fc1c01b9ee74907239. The commit above is reverted as it did not solve the original issue. gsm_cleanup_mux() tries to free up the virtual ttys by calling gsm_dlci_release() for each available DLCI. There, dlci_put() is called to decrease the reference counter for the DLCI via tty_port_put() which finally calls gsm_dlci_free(). This already clears the pointer which is being checked in gsm_cleanup_mux() before calling gsm_dlci_release(). Therefore, it is not necessary to clear this pointer in gsm_cleanup_mux() as done in the reverted commit. The commit introduces a null pointer dereference: <TASK> ? __die+0x1f/0x70 ? page_fault_oops+0x156/0x420 ? search_exception_tables+0x37/0x50 ? fixup_exception+0x21/0x310 ? exc_page_fault+0x69/0x150 ? asm_exc_page_fault+0x26/0x30 ? tty_port_put+0x19/0xa0 gsmtty_cleanup+0x29/0x80 [n_gsm] release_one_tty+0x37/0xe0 process_one_work+0x1e6/0x3e0 worker_thread+0x4c/0x3d0 ? __pfx_worker_thread+0x10/0x10 kthread+0xe1/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2f/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 </TASK> The actual issue is that nothing guards dlci_put() from being called multiple times while the tty driver was triggered but did not yet finished calling gsm_dlci_free().

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.64-1DEBIAN-CVE-2023-52564
Debian:13linux6.5.6-1DEBIAN-CVE-2023-52564
Debian:14linux6.5.6-1DEBIAN-CVE-2023-52564
Ubuntu:22.04:LTSlinux5.15.0-94.104UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-aws5.15.0-1053.58UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure5.15.0-1056.64UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1056.64.1UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gcp5.15.0-1051.59UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gcp-6.56.5.0-1013.13~22.04.1UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gke5.15.0-1050.55UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1036.42UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-hwe-6.56.5.0-17.17~22.04.1UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-ibm5.15.0-1046.49UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1047.53UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-kvm5.15.0-1050.55UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-94.104UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.56.5.0-17.17.1.1.1~22.04.1UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1044.44UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-nvidia-6.56.5.0-1014.14UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1022.22UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1009.9UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oem-6.56.5.0-1014.15UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oracle5.15.0-1051.57UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-oracle-6.56.5.0-1015.15~22.04.1UBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-raspi5.15.0-1046.49UBUNTU-CVE-2023-52564
Ubuntu:24.04:LTSlinux-raspi6.7.0-1001.1UBUNTU-CVE-2023-52564
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2023-52564
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1027.31UBUNTU-CVE-2023-52564

Affected products (as reported)

VendorProductVersions
Linux Linux 8fc0eabaa73bbd9bd705577071564616da5c8c61 – before 6d5c8862932d31a810b6545f7d69ecc124402c6e5138c228311a863c3cf937b94a3ab4c87f1f70c4 – before a48d2bcd23f2c98d575bc2f9b7a3fbd16aeea9eb9615ca54bc138e35353a001e8b5d4824dce72188 – before c61d0b87a7028c2c10faffc524d748334c7b98279b9c8195f3f0d74a826077fc1c01b9ee74907239 – before 2bff660e0ff349dee84dc4f6f6d10da4497f5b289b9c8195f3f0d74a826077fc1c01b9ee74907239 – before 29346e217b8ab8a52889b88f00b268278d6b766874a8d6f50cc90ed0061997db51dfa81a62b0f8355.10.190 – before 5.10.1985.15.124 – before 5.15.134
Linux Linux 6.5

References