# CVE-2021-45417: Memory corruption in n/a

> Local attackers can gain root privileges via a heap-based buffer overflow in AIDE caused by crafted file metadata.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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:** 20 Jan 2022
- **Updated:** 4 Aug 2024
- **Also known as:** ALSA-2022:0441, DEBIAN-CVE-2021-45417, DLA-2894-1, DSA-5051-1, GHSA-gfm2-8gq5-m3x8, MGASA-2024-0100, OESA-2022-1523, RHSA-2022:0440, RHSA-2022:0441, RHSA-2022:0456, RHSA-2022:0464, RHSA-2022:0472, RHSA-2022:0473, RLSA-2022:0441, SUSE-SU-2022:0145-1, SUSE-SU-2022:0150-1, SUSE-SU-2022:0150-2, SUSE-SU-2022:14879-1, UBUNTU-CVE-2021-45417, USN-5243-1, USN-5243-2, openSUSE-SU-2022:0150-1, openSUSE-SU-2024:11960-1

## What is CVE-2021-45417?

CVE-2021-45417 is a high-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 20 Jan 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

AIDE before 0.17.4 allows local users to obtain root privileges via crafted file metadata (such as XFS extended attributes or tmpfs ACLs), because of a heap-based buffer overflow.

Weakness: CWE-787 (Out-of-bounds Write)

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

It affects 7 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aide` | AlmaLinux:8 | All versions | 0.16-14.el8_5.1 |
| `aide` | Red Hat:enterprise_linux:7::client | All versions | 0:0.15.1-13.el7_9.1 |
| `aide-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:0.15.1-13.el7_9.1 |
| `aide` | Red Hat:enterprise_linux:7::server | All versions | 0:0.15.1-13.el7_9.1 |
| `aide-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:0.15.1-13.el7_9.1 |
| `aide` | Red Hat:enterprise_linux:7::workstation | All versions | 0:0.15.1-13.el7_9.1 |
| `aide-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:0.15.1-13.el7_9.1 |
| `aide` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.16-14.el8_5.1 |
| `aide-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.16-14.el8_5.1 |
| `aide-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.16-14.el8_5.1 |
| `aide` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.16-11.el8_1.1 |
| `aide-debuginfo` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.16-11.el8_1.1 |
| `aide-debugsource` | Red Hat:rhel_e4s:8.1::appstream | All versions | 0:0.16-11.el8_1.1 |
| `aide` | Red Hat:rhel_els:6 | All versions | 0:0.14-11.el6_10.1 |
| `aide-debuginfo` | Red Hat:rhel_els:6 | All versions | 0:0.14-11.el6_10.1 |
| `aide` | Red Hat:rhel_eus:8.2::appstream | All versions | 0:0.16-11.el8_2.1 |
| `aide-debuginfo` | Red Hat:rhel_eus:8.2::appstream | All versions | 0:0.16-11.el8_2.1 |
| `aide-debugsource` | Red Hat:rhel_eus:8.2::appstream | All versions | 0:0.16-11.el8_2.1 |
| `aide` | Red Hat:rhel_eus:8.4::appstream | All versions | 0:0.16-14.el8_4.1 |
| `aide-debuginfo` | Red Hat:rhel_eus:8.4::appstream | All versions | 0:0.16-14.el8_4.1 |
| `aide-debugsource` | Red Hat:rhel_eus:8.4::appstream | All versions | 0:0.16-14.el8_4.1 |
| `aide` | Rocky Linux:8 | All versions | 0:0.16-14.el8_5.1 |
| `aide` | SUSE:Enterprise Storage 6 | All versions | 0.16-24.1 |
| `aide` | SUSE:Enterprise Storage 7 | All versions | 0.16-24.1 |
| `aide` | SUSE:HPE Helion OpenStack 8 | All versions | 0.16-20.15.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise Micro 5.1 | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise Point of Sale 11 SP3 | All versions | 0.13.1-40.16.6.1 |
| `aide` | SUSE:Linux Enterprise Real Time 15 SP2 | All versions | 0.16-24.1 |
| `aide` | SUSE:Linux Enterprise Server 11 SP4-LTSS | All versions | 0.13.1-40.16.6.1 |
| `aide` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 0.16-20.15.1 |
| `aide` | SUSE:Linux Enterprise Server 12 SP3-BCL | All versions | 0.16-20.15.1 |
| `aide` | SUSE:Linux Enterprise Server 12 SP3-LTSS | All versions | 0.16-20.15.1 |
| `aide` | SUSE:Linux Enterprise Server 12 SP4-LTSS | All versions | 0.16-20.15.1 |

Products: Advanced Intrusion Detection Environment Project Advanced Intrusion Detection Environment, Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Redhat Enterprise Linux, Redhat Ovirt-Node, Redhat Virtualization Host.

## How do I fix CVE-2021-45417?

Upgrade to a fixed version.

## Is CVE-2021-45417 being exploited?

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

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2025-54389](https://insights.sbomify.com/CVE-2025-54389/): AIDE improper output neutralization vulnerability (medium 6.2)
- [CVE-2025-54409](https://insights.sbomify.com/CVE-2025-54409/): AIDE null pointer dereference when reading incorrectly encoded xattr attributes from database (local DoS) (medium 6.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-45417 and fix it if it is affected.

What it is: CVE-2021-45417 is a high-severity memory corruption vulnerability in Canonical Ubuntu Linux, published on 20 Jan 2022. 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-2021-45417 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-2021-45417/ (Markdown: https://insights.sbomify.com/CVE-2021-45417/index.md)
```

## Sources

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

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