# CVE-2024-50073: tty: n\_gsm: Fix use-after-free in gsm\_cleanup\_mux

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.31% (percentile 17, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-10-29T00:50:15.219Z
- **Modified:** 2026-08-05T11:41:23.613Z

## Who should check

- Anyone running Linux \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< bf171b5e86e41de4c1cf32fb7aefa275c3d7de49; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< c29f192e0d44cc1cbaf698fa1ff198f63556691a; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 0eec592c6a7460ba795d7de29f3dc95cb5422e62; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 9462f4ca56e7d2430fdb6dcc8498244acbfc4489; 5020173e7e7725110a8d4be1359bf1dfc4b1814d; c165698c9919b000bdbe73859d3bb7b33bdb9223; 7962a4b900099cf90e02859bb297f2c618d8d940; \>= 5.15.209, \< 5.16; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20
- Anyone running Linux 6.0

## Description

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

tty: n\_gsm: Fix use-after-free in gsm\_cleanup\_mux

BUG: KASAN: slab-use-after-free in gsm\_cleanup\_mux+0x77b/0x7b0
drivers/tty/n\_gsm.c:3160 \[n\_gsm\]
Read of size 8 at addr ffff88815fe99c00 by task poc/3379
CPU: 0 UID: 0 PID: 3379 Comm: poc Not tainted 6.11.0+ \#56
Hardware name: VMware, Inc. VMware Virtual Platform/440BX
Desktop Reference Platform, BIOS 6.00 11/12/2020
Call Trace:
 \<TASK\>
 gsm\_cleanup\_mux+0x77b/0x7b0 drivers/tty/n\_gsm.c:3160 \[n\_gsm\]
 \_\_pfx\_gsm\_cleanup\_mux+0x10/0x10 drivers/tty/n\_gsm.c:3124 \[n\_gsm\]
 \_\_pfx\_sched\_clock\_cpu+0x10/0x10 kernel/sched/clock.c:389
 update\_load\_avg+0x1c1/0x27b0 kernel/sched/fair.c:4500
 \_\_pfx\_min\_vruntime\_cb\_rotate+0x10/0x10 kernel/sched/fair.c:846
 \_\_rb\_insert\_augmented+0x492/0xbf0 lib/rbtree.c:161
 gsmld\_ioctl+0x395/0x1450 drivers/tty/n\_gsm.c:3408 \[n\_gsm\]
 \_raw\_spin\_lock\_irqsave+0x92/0xf0 arch/x86/include/asm/atomic.h:107
 \_\_pfx\_gsmld\_ioctl+0x10/0x10 drivers/tty/n\_gsm.c:3822 \[n\_gsm\]
 ktime\_get+0x5e/0x140 kernel/time/timekeeping.c:195
 ldsem\_down\_read+0x94/0x4e0 arch/x86/include/asm/atomic64\_64.h:79
 \_\_pfx\_ldsem\_down\_read+0x10/0x10 drivers/tty/tty\_ldsem.c:338
 \_\_pfx\_do\_vfs\_ioctl+0x10/0x10 fs/ioctl.c:805
 tty\_ioctl+0x643/0x1100 drivers/tty/tty\_io.c:2818

Allocated by task 65:
 gsm\_data\_alloc.constprop.0+0x27/0x190 drivers/tty/n\_gsm.c:926 \[n\_gsm\]
 gsm\_send+0x2c/0x580 drivers/tty/n\_gsm.c:819 \[n\_gsm\]
 gsm1\_receive+0x547/0xad0 drivers/tty/n\_gsm.c:3038 \[n\_gsm\]
 gsmld\_receive\_buf+0x176/0x280 drivers/tty/n\_gsm.c:3609 \[n\_gsm\]
 tty\_ldisc\_receive\_buf+0x101/0x1e0 drivers/tty/tty\_buffer.c:391
 tty\_port\_default\_receive\_buf+0x61/0xa0 drivers/tty/tty\_port.c:39
 flush\_to\_ldisc+0x1b0/0x750 drivers/tty/tty\_buffer.c:445
 process\_scheduled\_works+0x2b0/0x10d0 kernel/workqueue.c:3229
 worker\_thread+0x3dc/0x950 kernel/workqueue.c:3391
 kthread+0x2a3/0x370 kernel/kthread.c:389
 ret\_from\_fork+0x2d/0x70 arch/x86/kernel/process.c:147
 ret\_from\_fork\_asm+0x1a/0x30 arch/x86/entry/entry\_64.S:257

Freed by task 3367:
 kfree+0x126/0x420 mm/slub.c:4580
 gsm\_cleanup\_mux+0x36c/0x7b0 drivers/tty/n\_gsm.c:3160 \[n\_gsm\]
 gsmld\_ioctl+0x395/0x1450 drivers/tty/n\_gsm.c:3408 \[n\_gsm\]
 tty\_ioctl+0x643/0x1100 drivers/tty/tty\_io.c:2818

\[Analysis\]
gsm\_msg on the tx\_ctrl\_list or tx\_data\_list of gsm\_mux
can be freed by multi threads through ioctl,which leads
to the occurrence of uaf. Protect it by gsm tx lock.

## Affected and fixed versions

- Linux: \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< bf171b5e86e41de4c1cf32fb7aefa275c3d7de49; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< c29f192e0d44cc1cbaf698fa1ff198f63556691a; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 0eec592c6a7460ba795d7de29f3dc95cb5422e62; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 9462f4ca56e7d2430fdb6dcc8498244acbfc4489; 5020173e7e7725110a8d4be1359bf1dfc4b1814d; c165698c9919b000bdbe73859d3bb7b33bdb9223; 7962a4b900099cf90e02859bb297f2c618d8d940; \>= 5.15.209, \< 5.16; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 5.20 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-50073.md
Affected: Linux >= 0af021678d5d30c31f5a6b631f404ead3575212a, < bf171b5e86e41de4c1cf32fb7aefa275c3d7de49; >= 0af021678d5d30c31f5a6b631f404ead3575212a, < c29f192e0d44cc1cbaf698fa1ff198f63556691a; >= 0af021678d5d30c31f5a6b631f404ead3575212a, < 0eec592c6a7460ba795d7de29f3dc95cb5422e62; >= 0af021678d5d30c31f5a6b6…
Fixed in: Linux 0eec592c6a7460ba795d7de29f3dc95cb5422e62, Linux 9462f4ca56e7d2430fdb6dcc8498244acbfc4489, Linux 5.16, Linux 5.19, Linux 5.20

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-2024-50073 being exploited?

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

### How serious is CVE-2024-50073?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-50073?

Linux \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< bf171b5e86e41de4c1cf32fb7aefa275c3d7de49; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< c29f192e0d44cc1cbaf698fa1ff198f63556691a; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 0eec592c6a7460ba795d7de29f3dc95cb5422e62; \>= 0af021678d5d30c31f5a6b631f404ead3575212a, \< 9462f4ca56e7d2430fdb6dcc8498244acbfc4489; 5020173e7e7725110a8d4be1359bf1dfc4b1814d; c165698c9919b000bdbe73859d3bb7b33bdb9223; 7962a4b900099cf90e02859bb297f2c618d8d940; \>= 5.15.209, \< 5.16; \>= 5.18.18, \< 5.19; \>= 5.19.2, \< 5.20; Linux 6.0.

### Is there a fix for CVE-2024-50073?

Yes. Fixed in Linux 0eec592c6a7460ba795d7de29f3dc95cb5422e62, Linux 9462f4ca56e7d2430fdb6dcc8498244acbfc4489, Linux 5.16, Linux 5.19, Linux 5.20. Upgrade Linux to 5.20 or later.

### How do I check if I'm affected by CVE-2024-50073?

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/bf171b5e86e41de4c1cf32fb7aefa275c3d7de49>
- patch: <https://git.kernel.org/stable/c/c29f192e0d44cc1cbaf698fa1ff198f63556691a>
- patch: <https://git.kernel.org/stable/c/0eec592c6a7460ba795d7de29f3dc95cb5422e62>
- patch: <https://git.kernel.org/stable/c/9462f4ca56e7d2430fdb6dcc8498244acbfc4489>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## 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-2024-50073>

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