Exploitation of Linux Kernel GSM 0710 TTY Multiplexor Race Condition
An unprivileged local user can escalate privileges to root by exploiting a race condition in the Linux kernel GSM 0710 tty multiplexor (CVE-2023-6546).
What's new
- 1. OS linux Aug 7, 15:16 via splunk-escu
This threat involves a local privilege escalation vulnerability in the Linux kernel, specifically within the GSM 0710 tty multiplexor module (n_gsm). The vulnerability, tracked as CVE-2023-6546, arises from a race condition triggered when two threads execute the GSMIOC_SETCONF ioctl on the same tty file descriptor while the gsm line discipline is active. An unprivileged local attacker can leverage this race condition to gain root privileges. Defense teams should monitor for anomalous kernel module management and shell execution patterns that coincide with the loading or unloading of the n_gsm kernel module.
Attack Chain
- Attacker gains initial access to the Linux system as an unprivileged user.
- Attacker prepares a local exploit payload targeting the GSM 0710 tty multiplexor.
- Attacker initiates multiple threads attempting to trigger the race condition using the GSMIOC_SETCONF ioctl.
- Attacker forces the unloading of the
n_gsmkernel module usingrmmodto manipulate the module state. - Attacker executes shell commands (e.g.,
/bin/bashor/bin/sh) following the successful race condition exploitation. - Attacker confirms privilege escalation to root.
Impact
Successful exploitation results in full local privilege escalation, allowing an unprivileged attacker to obtain root-level access on the affected system. This compromise permits the attacker to bypass access controls, install persistence mechanisms, exfiltrate sensitive data, or deploy further malicious payloads.
Recommendation
Deploy the provided Sigma rule to detect suspicious process activity associated with GSM module manipulation. Ensure that kernel auditing and Sysmon for Linux are configured to log process creation events. Restrict the ability of unprivileged users to load or unload kernel modules using rmmod.
Immediate actions
Deploy the Sigma detection rule to identify potential exploitation attempts
Mitigations
Restrict unprivileged user access to modprobe and rmmod binaries
CVE-2023-6546
Detection coverage 1
Detect CVE-2023-6546 Exploitation - Suspicious GSM Module Manipulation
highDetects command sequences involving the unloading of the n_gsm kernel module followed by shell execution, indicative of CVE-2023-6546 exploitation.
Detection queries are available on the platform. Get full rules →