# CVE-2025-13350: Use-after-free of orphaned AF_UNIX in Ubuntu builds of Linux kernel

> A use-after-free in the AF_UNIX garbage collector allows local attackers to achieve privilege escalation on Ubuntu Linux kernels.

- **Severity:** High 7.1 (`CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Mar 2026
- **Updated:** 6 Mar 2026
- **Also known as:** GHSA-7c4q-hg77-9jfj, UBUNTU-CVE-2025-13350

## What is CVE-2025-13350?

CVE-2025-13350 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 5 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Ubuntu Linux 6.8 GA retains the legacy AF_UNIX garbage collector but backports upstream commit 8594d9b85c07 ("af_unix: Don’t call skb_get() for OOB skb"). When orphaned MSG_OOB sockets hit unix_gc(), the garbage collector still calls kfree_skb() as if OOB SKBs held two references; on Ubuntu Linux 6.8 (Noble Numbat) kernel tree, they have only the queue reference, so the buffer is freed while still reachable and subsequent queue walks dereference freed memory, yielding a reliable local privilege escalation (LPE) caused by a use-after-free (UAF). Ubuntu builds that have already taken the new GC stack from commit 4090fa373f0e, and mainline Linux kernels shipping that infrastructure are unaffected because they no longer execute the legacy collector path. This issue affects Ubuntu Linux from 6.8.0-56.58 before 6.8.0-84.84.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2025-13350?


## How do I fix CVE-2025-13350?

Apply the vendor's patch.

## Is CVE-2025-13350 being exploited?

There is no known exploitation of CVE-2025-13350 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-13350 and fix it if it is affected.

What it is: CVE-2025-13350 is a high-severity use after free vulnerability in Canonical Ubuntu Linux, published on 5 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-13350 in the wild and no public exploit code.

Affected product: Canonical Ubuntu Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-13350/ (Markdown: https://insights.sbomify.com/CVE-2025-13350/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-13350
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-13350
- OSV: https://osv.dev/vulnerability/CVE-2025-13350

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-13350/
Summaries are generated and may contain mistakes; the official description above is the record.
