# CVE-2018-5391: Denial of service in Kernel

> An attacker can cause a denial of service in the Linux kernel by sending specially crafted IP fragments, affecting system availability.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Sep 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-5391, DSA-4272-1, GHSA-p6x5-xg7h-fj5h, SUSE-SU-2018:3792-1, SUSE-SU-2018:3860-1, SUSE-SU-2018:3881-1, UBUNTU-CVE-2018-5391

## What is CVE-2018-5391?

CVE-2018-5391 is a high-severity denial of service vulnerability in Canonical Ubuntu Linux, published on 6 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Linux kernel, versions 3.9+, is vulnerable to a denial of service attack with low rates of specially modified packets targeting IP fragment re-assembly. An attacker may cause a denial of service condition by sending specially crafted IP fragments. Various vulnerabilities in IP fragmentation have been discovered and fixed over the years. The current vulnerability (CVE-2018-5391) became exploitable in the Linux kernel with the increase of the IP fragment reassembly queue size.

Weakness: CWE-20 (Improper Input Validation), CWE-400 (Uncontrolled Resource Consumption)

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

It affects 51 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kgraft-patch-SLE12-SP3_Update_10` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP3_Update_11` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP3_Update_12` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 6-2.1 |
| `kgraft-patch-SLE12-SP3_Update_13` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 6-2.1 |
| `kgraft-patch-SLE12-SP3_Update_14` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP3_Update_15` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP3_Update_8` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP3_Update_9` | SUSE:Linux Enterprise Live Patching 12 SP3 | All versions | 9-2.1 |
| `kernel-livepatch-SLE15_Update_1` | SUSE:Linux Enterprise Live Patching 15 | All versions | 6-2.1 |
| `kernel-livepatch-SLE15_Update_2` | SUSE:Linux Enterprise Live Patching 15 | All versions | 6-2.1 |
| `kgraft-patch-SLE12-SP2_Update_18` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_19` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_20` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP2_Update_21` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 7-2.1 |
| `kgraft-patch-SLE12-SP2_Update_22` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 7-2.1 |
| `kgraft-patch-SLE12-SP2_Update_23` | SUSE:Linux Enterprise Server 12 SP2-LTSS | All versions | 5-2.1 |
| `kgraft-patch-SLE12-SP2_Update_18` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_19` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 9-2.1 |
| `kgraft-patch-SLE12-SP2_Update_20` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 8-2.1 |
| `kgraft-patch-SLE12-SP2_Update_21` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 7-2.1 |
| `kgraft-patch-SLE12-SP2_Update_22` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 7-2.1 |
| `kgraft-patch-SLE12-SP2_Update_23` | SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | All versions | 5-2.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, F5 Big-Ip Access Policy Manager, F5 Big-Ip Advanced Firewall Manager, F5 Big-Ip Analytics, F5 Big-Ip Application Acceleration Manager, F5 Big-Ip Application Security Manager, F5 Big-Ip Domain Name System, F5 Big-Ip Edge Gateway, F5 Big-Ip Fraud Protection Service, F5 Big-Ip Global Traffic Manager, F5 Big-Ip Link Controller, F5 Big-Ip Local Traffic Manager, F5 Big-Ip Policy Enforcement Manager, F5 Big-Ip Webaccelerator, Linux kernel, Microsoft Windows 10, Microsoft Windows 7, Microsoft Windows 8.1, Microsoft Windows Rt 8.1 and 31 more.

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

Apply the vendor's patch.

## Is CVE-2018-5391 being exploited?

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

Public exploit code:

- An attacker and detector built to escalate against each other around overlapping IP fragments. Three attack modes exploit fragment reassembly in increasingly subtle ways, the last inspired by FragmentSmack (CVE-2018-5391), and three detector versions evolve in response, from simple overlap detection to defending against resource exhaustion. (github_poc): https://github.com/zeinabmazraani/OverlapCraft

## 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-5391 and fix it if it is affected.

What it is: CVE-2018-5391 is a high-severity denial of service vulnerability in Canonical Ubuntu Linux, published on 6 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-5391 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-5391/ (Markdown: https://insights.sbomify.com/CVE-2018-5391/index.md)
```

## Sources

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

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