# CVE-2022-50116: tty: n\_gsm: fix deadlock and link starvation in outgoing data path

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.21% (percentile 6, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-06-18T11:02:47.361Z
- **Modified:** 2026-06-17T05:22:47.553Z

## Who should check

- Anyone running Linux \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5020173e7e7725110a8d4be1359bf1dfc4b1814d; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< c165698c9919b000bdbe73859d3bb7b33bdb9223; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 7962a4b900099cf90e02859bb297f2c618d8d940; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 0af021678d5d30c31f5a6b631f404ead3575212a
- Anyone running Linux 2.6.35

## Description

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

tty: n\_gsm: 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 gsm\_data\_kick(), 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
gsm\_dlci\_data\_sweep() accordingly to fill up the transmission queue until
TX\_THRESH\_HI. 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, test\_v24\_loop/124
 lock: serial8250\_ports+0x3a8/0x7500, .magic: dead4ead, .owner: test\_v24\_loop/124, .owner\_cpu: 0
CPU: 0 PID: 124 Comm: test\_v24\_loop 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\>
 dump\_stack\_lvl+0x34/0x44
 do\_raw\_spin\_lock+0x76/0xa0
 \_raw\_spin\_lock\_irqsave+0x72/0x80
 uart\_write\_room+0x3b/0xc0
 gsm\_data\_kick+0x14b/0x240 \[n\_gsm\]
 gsmld\_write\_wakeup+0x35/0x70 \[n\_gsm\]
 tty\_wakeup+0x53/0x60
 tty\_port\_default\_wakeup+0x1b/0x30
 serial8250\_tx\_chars+0x12f/0x220
 serial8250\_handle\_irq.part.0+0xfe/0x150
 serial8250\_default\_handle\_irq+0x48/0x80
 serial8250\_interrupt+0x56/0xa0
 \_\_handle\_irq\_event\_percpu+0x78/0x1f0
 handle\_irq\_event+0x34/0x70
 handle\_fasteoi\_irq+0x90/0x1e0
 \_\_common\_interrupt+0x69/0x100
 common\_interrupt+0x48/0xc0
 asm\_common\_interrupt+0x1e/0x40
RIP: 0010:\_\_do\_softirq+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
 ? \_\_do\_softirq+0x73/0x34e
 irq\_exit\_rcu+0xb5/0x100
 common\_interrupt+0xa4/0xc0
 \</IRQ\>
 \<TASK\>
 asm\_common\_interrupt+0x1e/0x40
RIP: 0010:\_raw\_spin\_unlock\_irqrestore+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
 ? \_raw\_spin\_unlock\_irqrestore+0x23/0x50
 gsmtty\_write+0x65/0x80 \[n\_gsm\]
 n\_tty\_write+0x33f/0x530
 ? swake\_up\_all+0xe0/0xe0
 file\_tty\_write.constprop.0+0x1b1/0x320
 ? n\_tty\_flush\_buffer+0xb0/0xb0
 new\_sync\_write+0x10c/0x190
 vfs\_write+0x282/0x310
 ksys\_write+0x68/0xe0
 do\_syscall\_64+0x3b/0x90
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
RIP: 0033:0x7f3e5e35c15c
Code: 8b 7c 24 08 89 c5 e8 c5 ff ff ff 89 ef 89 44 24
---truncated---

## Affected and fixed versions

- Linux: \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5020173e7e7725110a8d4be1359bf1dfc4b1814d; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< c165698c9919b000bdbe73859d3bb7b33bdb9223; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 7962a4b900099cf90e02859bb297f2c618d8d940; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 0af021678d5d30c31f5a6b631f404ead3575212a (cvelist)
- Linux: 2.6.35 (cvelist)

## Mitigation

- Upgrade Linux to 0af021678d5d30c31f5a6b631f404ead3575212a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50116. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50116.md
Affected: Linux >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < 5020173e7e7725110a8d4be1359bf1dfc4b1814d; >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < c165698c9919b000bdbe73859d3bb7b33bdb9223; >= e1eaea46bb4020b38a141b84f88565d4603f8dd0, < 7962a4b900099cf90e02859bb297f2c618d8d940; >= e1eaea46bb4020b38a141b8…
Fixed in: Linux 5020173e7e7725110a8d4be1359bf1dfc4b1814d, Linux 7962a4b900099cf90e02859bb297f2c618d8d940, Linux 0af021678d5d30c31f5a6b631f404ead3575212a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50116 being exploited?

There is no confirmed exploitation: CVE-2022-50116 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50116?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50116?

Linux \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 5020173e7e7725110a8d4be1359bf1dfc4b1814d; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< c165698c9919b000bdbe73859d3bb7b33bdb9223; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 7962a4b900099cf90e02859bb297f2c618d8d940; \>= e1eaea46bb4020b38a141b84f88565d4603f8dd0, \< 0af021678d5d30c31f5a6b631f404ead3575212a; Linux 2.6.35.

### Is there a fix for CVE-2022-50116?

Yes. Fixed in Linux 5020173e7e7725110a8d4be1359bf1dfc4b1814d, Linux 7962a4b900099cf90e02859bb297f2c618d8d940, Linux 0af021678d5d30c31f5a6b631f404ead3575212a. Upgrade Linux to 0af021678d5d30c31f5a6b631f404ead3575212a or later.

### How do I check if I'm affected by CVE-2022-50116?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/c165698c9919b000bdbe73859d3bb7b33bdb9223>
- patch: <https://git.kernel.org/stable/c/7962a4b900099cf90e02859bb297f2c618d8d940>
- patch: <https://git.kernel.org/stable/c/0af021678d5d30c31f5a6b631f404ead3575212a>
- other: <https://git.kernel.org/stable/c/5020173e7e7725110a8d4be1359bf1dfc4b1814d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50116>

HTML: <https://flawdb.com/CVE-2022-50116> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50116>
