CVE-2023-52872 tty: n_gsm: fix race condition in status line change on dead connections
A race condition in the Linux kernel's n_gsm driver can cause a kernel panic when status lines change on dead connections.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-52872?
CVE-2023-52872 is a high-severity vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
tty: n_gsm: fix race condition in status line change on dead connections
gsm_cleanup_mux() cleans up the gsm by closing all DLCIs, stopping all timers, removing the virtual tty devices and clearing the data queues. This procedure, however, may cause subsequent changes of the virtual modem status lines of a DLCI. More data is being added the outgoing data queue and the deleted kick timer is restarted to handle this. At this point many resources have already been removed by the cleanup procedure. Thus, a kernel panic occurs.
Fix this by proving in gsm_modem_update() that the cleanup procedure has not been started and the mux is still alive.
Note that writing to a virtual tty is already protected by checks against the DLCI specific connection state.
Weakness: CWE-362
Which versions are affected by CVE-2023-52872?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-52872?
Apply the vendor's patch.
Is CVE-2023-52872 being exploited?
There is no known exploitation of CVE-2023-52872 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2023-52872, DEBIAN-CVE-2023-52872, GHSA-wpgm-g43f-rx6f, UBUNTU-CVE-2023-52872.