# CVE-2020-35512: Use after free in D-Bus Development branch

> A use-after-free in D-Bus allows attackers to cause crashes or undefined behavior when multiple usernames share the same UID and specific policy rules are applied.

- **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:** 15 Feb 2021
- **Updated:** 19 Nov 2024
- **Also known as:** DEBIAN-CVE-2020-35512, GHSA-f5qm-fxvw-fwjg, OESA-2021-1101, SUSE-SU-2021:2211-1, SUSE-SU-2021:2292-1, SUSE-SU-2022:2788-1, UBUNTU-CVE-2020-35512, USN-5244-1, USN-5244-2, openSUSE-SU-2021:1056-1, openSUSE-SU-2021:2292-1

## What is CVE-2020-35512?

CVE-2020-35512 is a high-severity use after free vulnerability in D-Bus Development branch, published on 15 Feb 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A use-after-free flaw was found in D-Bus Development branch <= 1.13.16, dbus-1.12.x stable branch <= 1.12.18, and dbus-1.10.x and older branches <= 1.10.30 when a system has multiple usernames sharing the same UID. When a set of policy rules references these usernames, D-Bus may free some memory in the heap, which is still used by data structures necessary for the other usernames sharing the UID, possibly leading to a crash or other undefined behaviors

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2020-35512?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dbus-1` | SUSE:Enterprise Storage 6 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Enterprise Storage 6 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 1.12.2-3.11.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise High Performance Computing 15-ESPOS | All versions | 1.12.2-3.11.1 |
| `dbus-1` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 1.12.2-3.11.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise High Performance Computing 15-LTSS | All versions | 1.12.2-3.11.1 |
| `dbus-1` | SUSE:Linux Enterprise Micro 5.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 1.8.22-24.22.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server 12 SP2-BCL | All versions | 1.8.22-24.22.1 |
| `dbus-1` | SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server 15 SP1-BCL | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Linux Enterprise Server 15-LTSS | All versions | 1.12.2-3.11.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server 15-LTSS | All versions | 1.12.2-3.11.1 |
| `dbus-1` | SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 1.12.2-3.11.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server for SAP Applications 15 | All versions | 1.12.2-3.11.1 |
| `dbus-1` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Manager Proxy 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Manager Proxy 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Manager Retail Branch Server 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Manager Retail Branch Server 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | SUSE:Manager Server 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | SUSE:Manager Server 4.0 | All versions | 1.12.2-8.6.1 |
| `dbus-1` | openSUSE:Leap 15.2 | All versions | 1.12.2-lp152.6.3.1 |
| `dbus-1-x11` | openSUSE:Leap 15.2 | All versions | 1.12.2-lp152.6.3.1 |
| `dbus-1` | openSUSE:Leap 15.3 | All versions | 1.12.2-8.6.1 |
| `dbus-1-x11` | openSUSE:Leap 15.3 | All versions | 1.12.2-8.6.1 |

Products: Freedesktop Dbus.

## How do I fix CVE-2020-35512?

Apply the vendor's patch.

## Is CVE-2020-35512 being exploited?

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

## Other vulnerabilities in D-Bus Development branch

- [CVE-2008-4311](https://insights.sbomify.com/CVE-2008-4311/): Security feature bypass in n/a (medium 4.6)
- [CVE-2009-1189](https://insights.sbomify.com/CVE-2009-1189/): Other in n/a (low 3.6)
- [CVE-2011-2533](https://insights.sbomify.com/CVE-2011-2533/): Path traversal in n/a (low 3.3)
- [CVE-2014-3637](https://insights.sbomify.com/CVE-2014-3637/): Denial of service in n/a (low 2.1)
- [CVE-2008-3834](https://insights.sbomify.com/CVE-2008-3834/): Denial of service in n/a (low 2.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-35512 and fix it if it is affected.

What it is: CVE-2020-35512 is a high-severity use after free vulnerability in D-Bus Development branch, published on 15 Feb 2021. 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-2020-35512 in the wild and no public exploit code.

Affected product: D-Bus Development branch. 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-2020-35512/ (Markdown: https://insights.sbomify.com/CVE-2020-35512/index.md)
```

## Sources

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

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