# CVE-2021-47358: staging: greybus: uart: fix tty use after free

> 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.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-05-21T14:44:50.221Z
- **Modified:** 2026-08-05T08:47:27.000Z

## Who should check

- Anyone running Linux \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 64062fcaca8872f063ec9da011e7bf30470be33f; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< a5cfd51f6348e8fd7531461366946039c29c7e69; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< b9e697e60ce9890e9258a73eb061288e7d68e5e6; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 9872ff6fdce8b229f01993b611b5d1719cb70ff1; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92dc0b1f46e12cfabd28d709bb34f7a39431b44f
- Anyone running Linux 4.9

## Description

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

staging: greybus: uart: fix tty use after free

User space can hold a tty open indefinitely and tty drivers must not
release the underlying structures until the last user is gone.

Switch to using the tty-port reference counter to manage the life time
of the greybus tty state to avoid use after free after a disconnect.

## Affected and fixed versions

- Linux: \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 64062fcaca8872f063ec9da011e7bf30470be33f; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< a5cfd51f6348e8fd7531461366946039c29c7e69; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< b9e697e60ce9890e9258a73eb061288e7d68e5e6; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 9872ff6fdce8b229f01993b611b5d1719cb70ff1; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92dc0b1f46e12cfabd28d709bb34f7a39431b44f (cvelist)
- Linux: 4.9 (cvelist)

## Mitigation

- Upgrade Linux to 92dc0b1f46e12cfabd28d709bb34f7a39431b44f or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2021-47358.md
Affected: Linux >= a18e15175708d39abbe9746ddc3479466b7800c3, < 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d; >= a18e15175708d39abbe9746ddc3479466b7800c3, < 64062fcaca8872f063ec9da011e7bf30470be33f; >= a18e15175708d39abbe9746ddc3479466b7800c3, < a5cfd51f6348e8fd7531461366946039c29c7e69; >= a18e15175708d39abbe9746…
Fixed in: Linux 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d, Linux 64062fcaca8872f063ec9da011e7bf30470be33f, Linux 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14, Linux 9872ff6fdce8b229f01993b611b5d1719cb70ff1, Linux 92dc0b1f46e12cfabd28d709bb34f7a39431b44f

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-2021-47358 being exploited?

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

### How serious is CVE-2021-47358?

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

### Which versions are affected by CVE-2021-47358?

Linux \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 64062fcaca8872f063ec9da011e7bf30470be33f; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< a5cfd51f6348e8fd7531461366946039c29c7e69; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< b9e697e60ce9890e9258a73eb061288e7d68e5e6; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 9872ff6fdce8b229f01993b611b5d1719cb70ff1; \>= a18e15175708d39abbe9746ddc3479466b7800c3, \< 92dc0b1f46e12cfabd28d709bb34f7a39431b44f; Linux 4.9.

### Is there a fix for CVE-2021-47358?

Yes. Fixed in Linux 92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d, Linux 64062fcaca8872f063ec9da011e7bf30470be33f, Linux 4dc56951a8d9d61d364d346c61a5f1d70b4f5e14, Linux 9872ff6fdce8b229f01993b611b5d1719cb70ff1, Linux 92dc0b1f46e12cfabd28d709bb34f7a39431b44f. Upgrade Linux to 92dc0b1f46e12cfabd28d709bb34f7a39431b44f or later.

### How do I check if I'm affected by CVE-2021-47358?

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/92b67aaafb7c449db9f0c3dcabc0ff967cb3a42d>
- patch: <https://git.kernel.org/stable/c/64062fcaca8872f063ec9da011e7bf30470be33f>
- patch: <https://git.kernel.org/stable/c/a5cfd51f6348e8fd7531461366946039c29c7e69>
- patch: <https://git.kernel.org/stable/c/4dc56951a8d9d61d364d346c61a5f1d70b4f5e14>
- patch: <https://git.kernel.org/stable/c/b9e697e60ce9890e9258a73eb061288e7d68e5e6>
- patch: <https://git.kernel.org/stable/c/9872ff6fdce8b229f01993b611b5d1719cb70ff1>
- patch: <https://git.kernel.org/stable/c/92dc0b1f46e12cfabd28d709bb34f7a39431b44f>

## 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-2021-47358>

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