CVE-2023-52872·Kernel vulnerability
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.
- Severity
- medium
- Software
- Kernel
- Fixed in
- 6.6.1
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 7% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
From: 6.6
Until: 6.6.1
Fixed in: 6.6.1
How to fix this CVE
Update your Linux kernel to version 6.6.1 or later to resolve a race condition in the n_gsm TTY discipline that can cause kernel panics during modem status line changes on dead connections. This fix adds proper state validation checks in gsm_modem_update() to ensure cleanup procedures have not already begun before processing status updates. Apply the kernel update through your distribution's package manager and reboot your system.
sudo dnf update kernel kernel-headersDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check current kernel version with `uname -r` and compare against 6.6.1 — if it shows 6.6.0 or earlier, the system is vulnerable
- Step 2: Verify if the n_gsm module is loaded by running `lsmod | grep n_gsm` — if output appears, the vulnerable code path is active
- Step 3: Search kernel logs for panic signatures related to n_gsm with `dmesg | grep -i 'n_gsm\|gsm_cleanup_mux\|modem'` to detect past exploitation attempts
- Step 4: After kernel upgrade, reboot and confirm `uname -r` shows version 6.6.1 or later, then verify `lsmod | grep n_gsm` loads the updated module without errors
FAQ
What is CVE-2023-52872?
CVE-2023-52872 is a race condition in the Linux kernel's n_gsm TTY discipline module where cleanup operations can be interrupted by modem status line updates, leading to access of already-freed resources and kernel panics.
Is CVE-2023-52872 being actively exploited?
No, this vulnerability is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are available. However, local attackers with user privileges could trigger it on affected systems running the vulnerable kernel versions.
What versions of Kernel are affected by CVE-2023-52872?
Linux kernel versions 6.6.0 through 6.6.0 are affected; the vulnerability was resolved in kernel 6.6.1 and later versions.
How do I check if my server is vulnerable to CVE-2023-52872?
Run `uname -r` to display your kernel version — if it shows 6.6.0 or earlier, you are potentially vulnerable. Then check if the n_gsm module is in use with `lsmod | grep n_gsm` to determine if the vulnerable code path is active.
Does Defensia detect CVE-2023-52872?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2023-52872 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/19d34b73234af542cc8a218cf398dee73cdb1890
- https://git.kernel.org/stable/c/3a75b205de43365f80a33b98ec9289785da56243
- https://git.kernel.org/stable/c/81a4dd5e6c78f5d8952fa8c9d36565db1fe01444
- https://git.kernel.org/stable/c/ce4df90333c4fe65acb8b5089fdfe9b955ce976a
- https://git.kernel.org/stable/c/df6cfab66ff2a44bd23ad5dd5309cb3421bb6593
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52872. Free for 1 server.
Get started free