CVE-2022-50116: tty: n_gsm: fix deadlock and link starvation in outgoing data path

Published Jun 18, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

tty: ngsm: fix deadlock and link starvation in outgoing data path

The current implementation queues up new control and user packets as needed and processes this queue down to the ldisc in the same code path. That means that the upper and the lower layer are hard coupled in the code. Due to this deadlocks can happen as seen below while transmitting data, especially during ldisc congestion. Furthermore, the data channels starve the control channel on high transmission load on the ldisc.

Introduce an additional control channel data queue to prevent timeouts and link hangups during ldisc congestion. This is being processed before the user channel data queue in gsmdatakick(), i.e. with the highest priority. Put the queue to ldisc data path into a workqueue and trigger it whenever new data has been put into the transmission queue. Change gsmdlcidatasweep() accordingly to fill up the transmission queue until TXTHRESHHI. This solves the locking issue, keeps latency low and provides good performance on high data load. Note that now all packets from a DLCI are removed from the internal queue if the associated DLCI was closed. This ensures that no data is sent by the introduced write task to an already closed DLCI.

BUG: spinlock recursion on CPU#0, testv24loop/124 lock: serial8250ports+0x3a8/0x7500, .magic: dead4ead, .owner: testv24loop/124, .ownercpu: 0 CPU: 0 PID: 124 Comm: testv24loop Tainted: G O 5.18.0-rc2 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: <IRQ> dumpstacklvl+0x34/0x44 dorawspinlock+0x76/0xa0 rawspinlockirqsave+0x72/0x80 uartwriteroom+0x3b/0xc0 gsmdatakick+0x14b/0x240 [ngsm] gsmldwritewakeup+0x35/0x70 [ngsm] ttywakeup+0x53/0x60 ttyportdefaultwakeup+0x1b/0x30 serial8250txchars+0x12f/0x220 serial8250handleirq.part.0+0xfe/0x150 serial8250defaulthandleirq+0x48/0x80 serial8250interrupt+0x56/0xa0 handleirqeventpercpu+0x78/0x1f0 handleirqevent+0x34/0x70 handlefasteoiirq+0x90/0x1e0 commoninterrupt+0x69/0x100 commoninterrupt+0x48/0xc0 asmcommoninterrupt+0x1e/0x40 RIP: 0010:dosoftirq+0x83/0x34e Code: 2a 0a ff 0f b7 ed c7 44 24 10 0a 00 00 00 48 c7 c7 51 2a 64 82 e8 2d e2 d5 ff 65 66 c7 05 83 af 1e 7e 00 00 fb b8 ff ff ff ff <49> c7 c2 40 61 80 82 0f bc c5 41 89 c4 41 83 c4 01 0f 84 e6 00 00 RSP: 0018:ffffc90000003f98 EFLAGS: 00000286 RAX: 00000000ffffffff RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff82642a51 RDI: ffffffff825bb5e7 RBP: 0000000000000200 R08: 00000008de3271a8 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000030 R14: 0000000000000000 R15: 0000000000000000 ? dosoftirq+0x73/0x34e irqexitrcu+0xb5/0x100 commoninterrupt+0xa4/0xc0 </IRQ> <TASK> asmcommoninterrupt+0x1e/0x40 RIP: 0010:rawspinunlockirqrestore+0x2e/0x50 Code: 00 55 48 89 fd 48 83 c7 18 53 48 89 f3 48 8b 74 24 10 e8 85 28 36 ff 48 89 ef e8 cd 58 36 ff 80 e7 02 74 01 fb bf 01 00 00 00 <e8> 3d 97 33 ff 65 8b 05 96 23 2b 7e 85 c0 74 03 5b 5d c3 0f 1f 44 RSP: 0018:ffffc9000020fd08 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000246 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffffff8257fd74 RDI: 0000000000000001 RBP: ffff8880057de3a0 R08: 00000008de233000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000100 R14: 0000000000000202 R15: ffff8880057df0b8 ? rawspinunlockirqrestore+0x23/0x50 gsmttywrite+0x65/0x80 [ngsm] nttywrite+0x33f/0x530 ? swakeupall+0xe0/0xe0 filettywrite.constprop.0+0x1b1/0x320 ? nttyflushbuffer+0xb0/0xb0 newsyncwrite+0x10c/0x190 vfswrite+0x282/0x310 ksyswrite+0x68/0xe0 dosyscall64+0x3b/0x90 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7f3e5e35c15c Code: 8b 7c 24 08 89 c5 e8 c5 ff ff ff 89 ef 89 44 24 ---truncated---

Affected Software

181 affected componentsFixes available
Linux Linux kernel
Microsoft cbl2 kernel 5.15.186.1-1
Linux Linux kernel>=2.6.35<5.18.18
Linux Linux kernel>=5.19<5.19.2
debian/linux<5.19.6-1
5.19.6-1
debian/linux<5.19.6-1
5.19.6-1
debian/linux<5.19.6-1
5.19.6-1
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-azure*
ubuntu/linux-lts-xenial*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-hwe*
ubuntu/linux-azure*
ubuntu/linux-gcp*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-kvm*
ubuntu/linux-oracle*
ubuntu/linux-fips*
ubuntu/linux-fips*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-aws-5.4*
ubuntu/linux-azure*
ubuntu/linux-azure-4.15*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-5.4*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-4.15*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gcp-5.4*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-5.4*
ubuntu/linux-hwe-edge*
ubuntu/linux-ibm-5.4*
ubuntu/linux-kvm*
ubuntu/linux-oem*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-oracle-5.4*
ubuntu/linux-raspi-5.4*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux*
ubuntu/linux-aws*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.15<5.15.0-1112.119~20.04.1
5.15.0-1112.119~20.04.1
ubuntu/linux-aws-5.8*
ubuntu/linux-azure*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.15<5.15.0-1117.126~20.04.1
5.15.0-1117.126~20.04.1
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-azure-fde-5.15<5.15.0-1117.126~20.04.2
5.15.0-1117.126~20.04.2
ubuntu/linux-bluefield*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.15<5.15.0-1112.122~20.04.1
5.15.0-1112.122~20.04.1
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-gkeop*
ubuntu/linux-gkeop-5.15*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.15<5.15.0-186.196~20.04.1
5.15.0-186.196~20.04.1
ubuntu/linux-hwe-5.8*
ubuntu/linux-ibm*
ubuntu/linux-ibm-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-intel-5.13*
ubuntu/linux-intel-iotg-5.15<5.15.0-1107.113~20.04.1
5.15.0-1107.113~20.04.1
ubuntu/linux-iot*
ubuntu/linux-kvm*
ubuntu/linux-lowlatency-hwe-5.15<5.15.0-184.194~20.04.1
5.15.0-184.194~20.04.1
ubuntu/linux-nvidia-tegra-5.15<5.15.0-1064.66~20.04.1
5.15.0-1064.66~20.04.1
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.15<5.15.0-1109.115~20.04.1
5.15.0-1109.115~20.04.1
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.15<5.15.0-1106.110~20.04.1
5.15.0-1106.110~20.04.1
ubuntu/linux-riscv-5.8*
ubuntu/linux-xilinx-zynqmp*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux<5.15.0-186.196
5.15.0-186.196
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws<5.15.0-1112.119
5.15.0-1112.119
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-aws-6.5*
ubuntu/linux-azure<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-6.5*
ubuntu/linux-azure-fde<5.15.0-1117.126
5.15.0-1117.126
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp<5.15.0-1112.122
5.15.0-1112.122
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-gcp-6.5*
ubuntu/linux-gke<5.15.0-1108.114
5.15.0-1108.114
ubuntu/linux-gkeop<5.15.0-1095.103
5.15.0-1095.103
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-hwe-6.5*
ubuntu/linux-ibm<5.15.0-1106.110
5.15.0-1106.110
ubuntu/linux-intel-iot-realtime*
ubuntu/linux-intel-iotg<5.15.0-1107.113
5.15.0-1107.113
ubuntu/linux-kvm<5.15.0-1104.109
5.15.0-1104.109
ubuntu/linux-lowlatency<5.15.0-184.194
5.15.0-184.194
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-lowlatency-hwe-6.5*
ubuntu/linux-nvidia<5.15.0-1107.108
5.15.0-1107.108
ubuntu/linux-nvidia-6.2*
ubuntu/linux-nvidia-6.5*
ubuntu/linux-nvidia-tegra<5.15.0-1064.66
5.15.0-1064.66
ubuntu/linux-nvidia-tegra-igx<5.15.0-1053.53
5.15.0-1053.53
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-oem-6.5*
ubuntu/linux-oracle<5.15.0-1109.115
5.15.0-1109.115
ubuntu/linux-oracle-6.5*
ubuntu/linux-raspi<5.15.0-1106.109
5.15.0-1106.109
ubuntu/linux-realtime*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-riscv-6.5*
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*
ubuntu/linux-starfive-6.5*
ubuntu/linux-xilinx-zynqmp<5.15.0-1075.79
5.15.0-1075.79
ubuntu/linux-bluefield<5.15.0-1096.98
5.15.0-1096.98
ubuntu/linux-intel-iot-realtime<5.15.0-1104.106
5.15.0-1104.106
ubuntu/linux-realtime<5.15.0-1111.120
5.15.0-1111.120
ubuntu/linux-aws-fips*
ubuntu/linux-azure-fips*
ubuntu/linux-fips*
ubuntu/linux-gcp-fips*
ubuntu/linux-aws-fips<5.15.0-1112.119+fips1
5.15.0-1112.119+fips1
ubuntu/linux-azure-fips<5.15.0-1117.126+fips1
5.15.0-1117.126+fips1
ubuntu/linux-fips<5.15.0-186.196+fips1
5.15.0-186.196+fips1
ubuntu/linux-gcp-fips<5.15.0-1112.122+fips1
5.15.0-1112.122+fips1
ubuntu/linux-raspi-realtime*
ubuntu/linux-realtime*
ubuntu/linux-riscv*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.19.6-1
  2. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1
  3. Upgrade

    Upgrade ubuntu/linux-aws-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.119~20.04.1
  4. Upgrade

    Upgrade ubuntu/linux-azure-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1117.126~20.04.1
  5. Upgrade

    Upgrade ubuntu/linux-azure-fde-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1117.126~20.04.2
  6. Upgrade

    Upgrade ubuntu/linux-gcp-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.122~20.04.1
  7. Upgrade

    Upgrade ubuntu/linux-hwe-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-186.196~20.04.1
  8. Upgrade

    Upgrade ubuntu/linux-ibm-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1106.110~20.04.1
  9. Upgrade

    Upgrade ubuntu/linux-intel-iotg-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1107.113~20.04.1
  10. Upgrade

    Upgrade ubuntu/linux-lowlatency-hwe-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-184.194~20.04.1
  11. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1064.66~20.04.1
  12. Upgrade

    Upgrade ubuntu/linux-oracle-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1109.115~20.04.1
  13. Upgrade

    Upgrade ubuntu/linux-riscv-5.15 to a version that resolves this vulnerability.

    Fixed in 5.15.0-1106.110~20.04.1
  14. Upgrade

    Upgrade ubuntu/linux to a version that resolves this vulnerability.

    Fixed in 5.15.0-186.196
  15. Upgrade

    Upgrade ubuntu/linux-aws to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.119
  16. Upgrade

    Upgrade ubuntu/linux-azure to a version that resolves this vulnerability.

    Fixed in 5.15.0-1117.126
  17. Upgrade

    Upgrade ubuntu/linux-azure-fde to a version that resolves this vulnerability.

    Fixed in 5.15.0-1117.126
  18. Upgrade

    Upgrade ubuntu/linux-gcp to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.122
  19. Upgrade

    Upgrade ubuntu/linux-gke to a version that resolves this vulnerability.

    Fixed in 5.15.0-1108.114
  20. Upgrade

    Upgrade ubuntu/linux-gkeop to a version that resolves this vulnerability.

    Fixed in 5.15.0-1095.103
  21. Upgrade

    Upgrade ubuntu/linux-ibm to a version that resolves this vulnerability.

    Fixed in 5.15.0-1106.110
  22. Upgrade

    Upgrade ubuntu/linux-intel-iotg to a version that resolves this vulnerability.

    Fixed in 5.15.0-1107.113
  23. Upgrade

    Upgrade ubuntu/linux-kvm to a version that resolves this vulnerability.

    Fixed in 5.15.0-1104.109
  24. Upgrade

    Upgrade ubuntu/linux-lowlatency to a version that resolves this vulnerability.

    Fixed in 5.15.0-184.194
  25. Upgrade

    Upgrade ubuntu/linux-nvidia to a version that resolves this vulnerability.

    Fixed in 5.15.0-1107.108
  26. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra to a version that resolves this vulnerability.

    Fixed in 5.15.0-1064.66
  27. Upgrade

    Upgrade ubuntu/linux-nvidia-tegra-igx to a version that resolves this vulnerability.

    Fixed in 5.15.0-1053.53
  28. Upgrade

    Upgrade ubuntu/linux-oracle to a version that resolves this vulnerability.

    Fixed in 5.15.0-1109.115
  29. Upgrade

    Upgrade ubuntu/linux-raspi to a version that resolves this vulnerability.

    Fixed in 5.15.0-1106.109
  30. Upgrade

    Upgrade ubuntu/linux-xilinx-zynqmp to a version that resolves this vulnerability.

    Fixed in 5.15.0-1075.79
  31. Upgrade

    Upgrade ubuntu/linux-bluefield to a version that resolves this vulnerability.

    Fixed in 5.15.0-1096.98
  32. Upgrade

    Upgrade ubuntu/linux-intel-iot-realtime to a version that resolves this vulnerability.

    Fixed in 5.15.0-1104.106
  33. Upgrade

    Upgrade ubuntu/linux-realtime to a version that resolves this vulnerability.

    Fixed in 5.15.0-1111.120
  34. Upgrade

    Upgrade ubuntu/linux-aws-fips to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.119+fips1
  35. Upgrade

    Upgrade ubuntu/linux-azure-fips to a version that resolves this vulnerability.

    Fixed in 5.15.0-1117.126+fips1
  36. Upgrade

    Upgrade ubuntu/linux-fips to a version that resolves this vulnerability.

    Fixed in 5.15.0-186.196+fips1
  37. Upgrade

    Upgrade ubuntu/linux-gcp-fips to a version that resolves this vulnerability.

    Fixed in 5.15.0-1112.122+fips1

Event History

Jun 18, 2025
CVE Published
via MITRE·11:02 AM
Data Sourced
via MITRE·11:02 AM
Description
Data Sourced
via OSV·11:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Nov 20, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-50116?

CVE-2022-50116 is considered a high-severity vulnerability affecting the Linux kernel.

2

How does CVE-2022-50116 affect the Linux kernel?

CVE-2022-50116 can cause deadlock and link starvation in the outgoing data path of the tty n_gsm subsystem.

3

What versions of the Linux kernel are affected by CVE-2022-50116?

CVE-2022-50116 affects Linux kernel versions from 2.6.35 up to, but not including, 5.18.18 and from 5.19 to 5.19.2.

4

How do I fix CVE-2022-50116?

To remediate CVE-2022-50116, update your Linux kernel to a version that is not affected by this vulnerability.

5

Is there a workaround for CVE-2022-50116?

There are no known workarounds for CVE-2022-50116; updating to a patched version is recommended.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203