CVE-2022-49940: tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf()
In the Linux kernel, the following vulnerability has been resolved:
tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf()
A null pointer dereference can happen when attempting to access the
"gsm->receive()" function in gsmld_receive_buf(). Currently, the code
assumes that gsm->recieve is only called after MUX activation.
Since the gsmld_receive_buf() function can be accessed without the need to
initialize the MUX, the gsm->receive() function will not be set and a
NULL pointer dereference will occur.
Fix this by avoiding the call to "gsm->receive()" in case the function is
not initialized by adding a sanity check.
Call Trace:
<TASK>
gsmld_receive_buf+0x1c2/0x2f0 drivers/tty/n_gsm.c:2861
tiocsti drivers/tty/tty_io.c:2293 [inline]
tty_ioctl+0xa75/0x15d0 drivers/tty/tty_io.c:2692
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel flaw in the n_gsm TTY driver. A missing sanity check can let the kernel call an unset function pointer, causing a null pointer dereference. The main business concern shown by the sources is system instability or denial of service, not confirmed data theft or remote takeover.
Executive priority
Treat as a targeted stability risk for Linux environments, especially embedded, telecom, serial, or modem-facing systems. It is not currently supported as actively exploited in the supplied evidence, but kernel denial-of-service issues still deserve timely patching through normal kernel maintenance.
Technical view
The flaw is in drivers/tty/n_gsm.c, where gsmld_receive_buf() could call gsm->receive() before GSM MUX activation initialized that callback. The resolved fix adds a check so the callback is not invoked when unset. The provided trace reaches the bug through tty ioctl handling.
Likely exposure
Exposure is most relevant to Linux systems with the n_gsm line discipline reachable through TTY handling. The source bundle does not prove remote exposure. The call trace shows a syscall/ioctl path, suggesting local or device-adjacent trigger conditions.
Exploitation context
CISA KEV status is false in the provided bundle, and no cited source reports active exploitation. The available evidence describes a kernel null pointer dereference and fix, but does not provide CVSS, CWE, exploit maturity, or impact beyond crash-like behavior.
Researcher notes
Key uncertainty remains around exact affected version ranges in downstream distributions. The upstream issue is narrow: gsm->receive may be NULL when gsmld_receive_buf() is reached before MUX activation. Validate using source/package provenance rather than assuming all Linux hosts are exposed.
Mitigation direction
Update affected Linux kernels to versions containing the referenced stable fixes.
Check distribution vendor advisories for packaged kernel backports.
Limit untrusted access to TTY devices where operationally feasible.
Monitor kernel logs for n_gsm or tty-related crashes.
Prioritize systems using GSM multiplexing or serial modem workflows.
Validation and detection
Inventory Linux kernel versions across servers, appliances, and embedded systems.
Map whether n_gsm or GSM MUX functionality is used.
Compare running kernels against vendor advisories and stable fix commits.
Review crash logs for gsmld_receive_buf or n_gsm stack traces.
Confirm patched kernels are deployed after maintenance windows.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-49940 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
5Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Jun 18, 2025, 10:54 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.