Skip to content
Threat Feed
medium advisory

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

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

  1. Attacker gains initial access to the Linux system as an unprivileged user.
  2. Attacker prepares a local exploit payload targeting the GSM 0710 tty multiplexor.
  3. Attacker initiates multiple threads attempting to trigger the race condition using the GSMIOC_SETCONF ioctl.
  4. Attacker forces the unloading of the n_gsm kernel module using rmmod to manipulate the module state.
  5. Attacker executes shell commands (e.g., /bin/bash or /bin/sh) following the successful race condition exploitation.
  6. 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

Detection Engineering 48h

Mitigations

Restrict unprivileged user access to modprobe and rmmod binaries

short_term IT Operations

CVE-2023-6546

Detection coverage 1

Detect CVE-2023-6546 Exploitation - Suspicious GSM Module Manipulation

high

Detects command sequences involving the unloading of the n_gsm kernel module followed by shell execution, indicative of CVE-2023-6546 exploitation.

sigma tactics: privilege_escalation techniques: T1068 sources: process_creation, linux

Detection queries are available on the platform. Get full rules →