# CVE-2018-16884: Use after free in kernel:

> A malicious container user can trigger a use-after-free in the Linux kernel NFS subsystem, causing a system panic and potential privilege escalation.

- **Severity:** Medium 6.5 (`CVSS:3.0/AV:A/AC:H/PR:L/UI:N/S:C/C:N/I:L/A: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:** 18 Dec 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-16884, GHSA-cxqg-5c27-qx45, SUSE-SU-2019:0236-1, SUSE-SU-2019:0298-1, SUSE-SU-2019:0326-1, SUSE-SU-2019:0356-1, UBUNTU-CVE-2018-16884

## What is CVE-2018-16884?

CVE-2018-16884 is a medium-severity use after free vulnerability in Canonical Ubuntu Linux, published on 18 Dec 2018. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A flaw was found in the Linux kernel's NFS41+ subsystem. NFS41+ shares mounted in different network namespaces at the same time can make bc_svc_process() use wrong back-channel IDs and cause a use-after-free vulnerability. Thus a malicious container user can cause a host kernel memory corruption and a system panic. Due to the nature of the flaw, privilege escalation cannot be fully ruled out.

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2018-16884?

It affects 5 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kgraft-patch-SLE12-SP3_Update_10` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 10-2.1 |
| `kgraft-patch-SLE12-SP3_Update_11` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 10-2.1 |
| `kgraft-patch-SLE12-SP3_Update_12` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP3_Update_8` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP3_Update_9` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP4_Update_0` | SUSE:Linux Enterprise Live Patching 12 SP4 | All versions | 3-2.7.2 |
| `kgraft-patch-SLE12-SP4_Update_1` | SUSE:Linux Enterprise Live Patching 12 SP4 | All versions | 2-2.1 |
| `kernel-livepatch-SLE15_Update_0` | SUSE:Linux Enterprise Live Patching 15 | All versions | 8-22.2 |
| `kernel-livepatch-SLE15_Update_1` | SUSE:Linux Enterprise Live Patching 15 | All versions | 7-2.1 |
| `kernel-livepatch-SLE15_Update_2` | SUSE:Linux Enterprise Live Patching 15 | All versions | 7-2.1 |
| `kernel-livepatch-SLE15_Update_3` | SUSE:Linux Enterprise Live Patching 15 | All versions | 5-2.1 |
| `kernel-livepatch-SLE15_Update_4` | SUSE:Linux Enterprise Live Patching 15 | All versions | 4-2.1 |
| `kernel-livepatch-SLE15_Update_5` | SUSE:Linux Enterprise Live Patching 15 | All versions | 4-2.1 |
| `kernel-livepatch-SLE15_Update_6` | SUSE:Linux Enterprise Live Patching 15 | All versions | 3-2.1 |
| `kernel-livepatch-SLE15_Update_7` | SUSE:Linux Enterprise Live Patching 15 | All versions | 2-2.1 |
| `kgraft-patch-SLE12-SP1_Update_25` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP1_Update_26` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP1_Update_27` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP1_Update_28` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP1_Update_29` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP1_Update_30` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 7-2.1 |
| `kgraft-patch-SLE12-SP1_Update_31` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP1_Update_32` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP2_Update_18` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP2_Update_19` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 11-2.1 |
| `kgraft-patch-SLE12-SP2_Update_20` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 10-2.1 |
| `kgraft-patch-SLE12-SP2_Update_21` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_22` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_23` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 6-2.1 |
| `kgraft-patch-SLE12-SP2_Update_24` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP2_Update_25` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 4-2.1 |
| `kgraft-patch-SLE12-SP2_Update_26` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 3-2.1 |
| `kgraft-patch-SLE12_Update_31` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 12-2.1 |
| `kgraft-patch-SLE12_Update_32` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 12-2.1 |
| `kgraft-patch-SLE12_Update_33` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 11-2.1 |
| `kgraft-patch-SLE12_Update_34` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12_Update_35` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 8-2.1 |
| `kgraft-patch-SLE12_Update_36` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 8-2.1 |
| `kgraft-patch-SLE12_Update_37` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 7-2.1 |
| `kgraft-patch-SLE12_Update_38` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 5-2.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Linux kernel, Redhat Enterprise Linux, Redhat Enterprise Mrg.

## How do I fix CVE-2018-16884?

Apply the vendor's patch.

## Is CVE-2018-16884 being exploited?

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

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-16884 and fix it if it is affected.

What it is: CVE-2018-16884 is a medium-severity use after free vulnerability in Canonical Ubuntu Linux, published on 18 Dec 2018. 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-2018-16884 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-2018-16884/ (Markdown: https://insights.sbomify.com/CVE-2018-16884/index.md)
```

## Sources

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

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