# CVE-2022-2588: Use after free in linux

> A use-after-free flaw in the Linux kernel cls_route filter allows local attackers to execute arbitrary code or escalate privileges.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/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:** 8 Jan 2024
- **Updated:** 14 Oct 2026
- **Also known as:** AZL-33261, DEBIAN-CVE-2022-2588, RHSA-2022:6875, RHSA-2022:6978, RHSA-2022:7137, RHSA-2022:7146, RHSA-2022:7171, RHSA-2022:7344, RHSA-2022:7885, RHSA-2023:4022, RHSA-2023:4023, UBUNTU-CVE-2022-2588, USN-5588-1, openSUSE-SU-2024:12305-1

## What is CVE-2022-2588?

CVE-2022-2588 is a medium-severity use after free vulnerability in Canonical Ubuntu Linux, published on 8 Jan 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

It was discovered that the cls_route filter implementation in the Linux kernel would not remove an old filter from the hashtable before freeing it if its handle had the value 0.

Weakness: CWE-415 (Double Free), CWE-416 (Use After Free)

## Which versions are affected by CVE-2022-2588?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kpatch-patch-3_10_0-1160_62_1` | Red Hat:enterprise_linux:7::server | All versions | 0:1-3.el7 |
| `kpatch-patch-3_10_0-1160_62_1-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1-3.el7 |
| `kpatch-patch-3_10_0-1160_66_1` | Red Hat:enterprise_linux:7::server | All versions | 0:1-2.el7 |
| `kpatch-patch-3_10_0-1160_66_1-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1-2.el7 |
| `kpatch-patch-3_10_0-1160_71_1` | Red Hat:enterprise_linux:7::server | All versions | 0:1-1.el7 |
| `kpatch-patch-3_10_0-1160_71_1-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1-1.el7 |
| `kpatch-patch-3_10_0-1160_76_1` | Red Hat:enterprise_linux:7::server | All versions | 0:1-1.el7 |
| `kpatch-patch-3_10_0-1160_76_1-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1-1.el7 |
| `kpatch-patch-4_18_0-372_13_1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_13_1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_13_1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_16_1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_16_1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_16_1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-2.el8_6 |
| `kpatch-patch-4_18_0-372_19_1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_19_1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_19_1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_26_1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_26_1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_26_1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-1.el8_6 |
| `kpatch-patch-4_18_0-372_9_1` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-3.el8 |
| `kpatch-patch-4_18_0-372_9_1-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-3.el8 |
| `kpatch-patch-4_18_0-372_9_1-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1-3.el8 |
| `kernel` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-abi-whitelists` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-debug` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-debug-debuginfo` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-debug-devel` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-debuginfo` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-devel` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-doc` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-tools` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-tools-debuginfo` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-tools-libs` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `kernel-tools-libs-devel` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `perf` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `perf-debuginfo` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `python-perf` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |
| `python-perf-debuginfo` | Red Hat:rhel_aus:7.4::server | All versions | 0:3.10.0-693.106.1.el7 |

Products: Canonical Ubuntu Linux, Linux kernel.

## How do I fix CVE-2022-2588?

Apply the vendor's patch.

## Is CVE-2022-2588 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-2588 exists.

Public exploit code:

- exploit for CVE-2022-2588 (github_poc): https://github.com/Markakd/CVE-2022-2588
- https://github.com/BassamGraini/CVE-2022-2588 (github_poc): https://github.com/BassamGraini/CVE-2022-2588
- CVE-2022-2588 (github_poc): https://github.com/veritas501/CVE-2022-2588
- CVE-2022-2588,CVE-2022-2586,CVE-2022-2585  (github_poc): https://github.com/pirenga/2022-LPE-UAF
- CVE-2022-2588,CVE-2022-2586,CVE-2022-2585  (github_poc): https://github.com/konoha279/2022-LPE-UAF
- SLUBStick exploitation of CVE-2022-2588. Converting a DF into a cross-cache arbitrary memory R/W primitive through PTE manipulation. (github_poc): https://github.com/LSinus/CacheMeIfYouCan

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

What it is: CVE-2022-2588 is a medium-severity use after free vulnerability in Canonical Ubuntu Linux, published on 8 Jan 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-2588 exists.

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-2022-2588/ (Markdown: https://insights.sbomify.com/CVE-2022-2588/index.md)
```

## Sources

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

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