# CVE-2021-23133: Linux Kernel sctp_destroy_sock race condition

> A race condition in Linux Kernel SCTP sockets allows local attackers to escalate privileges to root via improper locking in sctp_destroy_sock.

- **Severity:** Medium 6.7 (`CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Apr 2021
- **Updated:** 16 Sep 2024
- **Also known as:** AZL-6530, DEBIAN-CVE-2021-23133, GHSA-hp5q-cmxv-w64v, SUSE-SU-2021:2366-1, SUSE-SU-2021:2384-1, SUSE-SU-2021:2460-1, UBUNTU-CVE-2021-23133

## What is CVE-2021-23133?

CVE-2021-23133 is a medium-severity vulnerability in Debian Debian Linux, published on 22 Apr 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A race condition in Linux kernel SCTP sockets (net/sctp/socket.c) before 5.12-rc8 can lead to kernel privilege escalation from the context of a network service or an unprivileged process. If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock then an element is removed from the auto_asconf_splist list without any proper locking. This can be exploited by an attacker with network service privileges to escalate to root or from the context of an unprivileged user directly if a BPF_CGROUP_INET_SOCK_CREATE is attached which denies creation of some SCTP socket.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

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

It affects 15 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kgraft-patch-SLE12-SP5_Update_17` | SUSE:Linux Enterprise Live Patching 12 SP5 | All versions | 4-2.2 |
| `kgraft-patch-SLE12-SP5_Update_18` | SUSE:Linux Enterprise Live Patching 12 SP5 | All versions | 3-2.1 |
| `kernel-livepatch-SLE15-SP2_Update_11` | SUSE:Linux Enterprise Live Patching 15 SP2 | All versions | 6-2.2 |
| `kernel-livepatch-SLE15-SP2_Update_12` | SUSE:Linux Enterprise Live Patching 15 SP2 | All versions | 3-2.1 |
| `kernel-livepatch-SLE15-SP2_Update_13` | SUSE:Linux Enterprise Live Patching 15 SP2 | All versions | 3-2.1 |
| `kernel-livepatch-SLE15-SP3_Update_0` | SUSE:Linux Enterprise Live Patching 15 SP3 | All versions | 3-3.1 |

Products: Broadcom Brocade Fabric Operating System, Debian Debian Linux, Fedoraproject Fedora, Linux kernel, Netapp Cloud Backup, Netapp H300e Firmware, Netapp H300s Firmware, Netapp H410c Firmware, Netapp H410s Firmware, Netapp H500e Firmware, Netapp H500s Firmware, Netapp H700e Firmware, Netapp H700s Firmware, Netapp Solidfire \& Hci Management Node, Netapp Solidfire Baseboard Management Controller Firmware.

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

Apply the vendor's patch.

## Is CVE-2021-23133 being exploited?

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

## Other vulnerabilities in Debian Debian Linux

- [CVE-2023-31432](https://insights.sbomify.com/CVE-2023-31432/): Privilege issues in multiple commands (high 7.8)
- [CVE-2023-31926](https://insights.sbomify.com/CVE-2023-31926/): Arbitrary File Overwrite using less command (high 7.1)
- [CVE-2023-31928](https://insights.sbomify.com/CVE-2023-31928/): XSS vulnerability in Brocade Webtools (medium 6.3)
- [CVE-2023-31428](https://insights.sbomify.com/CVE-2023-31428/): CLI allows upload or transfer files of dangerous types (medium 5.5)
- [CVE-2023-31430](https://insights.sbomify.com/CVE-2023-31430/): buffer overflow vulnerability in “secpolicydelete” command (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-23133 is a medium-severity vulnerability in Debian Debian Linux, published on 22 Apr 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-2021-23133 in the wild and no public exploit code.

Affected product: Debian Debian 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-23133/ (Markdown: https://insights.sbomify.com/CVE-2021-23133/index.md)
```

## Sources

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

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