Vulnerability · Published Jun 18, 2025 · Assigned by Linux
CVE-2022-49940tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 5.19.11-1 | DEBIAN-CVE-2022-49940 |
| Debian:13 | linux | 5.19.11-1 | DEBIAN-CVE-2022-49940 |
| Debian:14 | linux | 5.19.11-1 | DEBIAN-CVE-2022-49940 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.123.1.el8_10.cloud.0.1 | RXSA-2024:3138 |
| Ubuntu:22.04:LTS | linux | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-aws | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-aws | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-aws | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-aws-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-aws-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-azure | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-azure | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-azure | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-azure-fde | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-fde-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-gcp | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-gcp | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-gcp | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gcp-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gcp-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-gke | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-gkeop | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-hwe-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-hwe-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-ibm | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-intel-iotg | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-kvm | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-lowlatency | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-nvidia | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-nvidia-bos | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oem-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-oem-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-oracle | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-oracle | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-oracle | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oracle-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-oracle-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-raspi | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-raspi | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-raspi | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-realtime | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:25.10 | linux-riscv | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:26.10 | linux-riscv | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-riscv-6.17 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-riscv-7.0 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-vmware | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:24.04:LTS | linux-xilinx | no fix listed | UBUNTU-CVE-2022-49940 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | no fix listed | UBUNTU-CVE-2022-49940 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b8faa754b523a845facdc83120b2ecd290d7fa6d – before 5a82cf64f8ad63caf6bf115642ce44ddbc64311edfa9b6d34aac2154b5e926d7a7a061123bf137c6 – before 309aea4b6b813f6678c3a547cfd7fe3a76ffa9765e59c010c6862da329db17acca086afd8bea1aa8 – before 5aa37f9510345a812c0998bcbbc4d88d1dcc4d8b01aecd917114577c423f07cec0d186ad007d76fc – before f16c6d2e58a4c2b972efcf9eb12390ee0ba3befb2dc1be365a70699f7dda92fd9e48b845460860705.18.18 – before 5.19 |
| Linux | Linux | 5.15.61 – before 5.15.665.19.2 – before 5.19.8 |