# CVE-2021-4150: A use-after-free flaw was found in the addpartition in block/partitions/core.c in the Linux kernel.

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 28% of CVEs (2026-12-02)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-03-23T19:46:46.000Z
- Modified: 2026-06-17T04:19:07.437Z
- Weaknesses: CWE-416
- Assigned by: redhat

## Description

A use-after-free flaw was found in the add_partition in block/partitions/core.c in the Linux kernel. A local attacker with user privileges could cause a denial of service on the system. The issue results from the lack of code cleanup when device_add call fails when adding a partition to the disk.

(As written by CVE List.)

## Affected

- kernel: kernel 5.15 rc7
- linux linux_kernel: before 5.15; 5.15

## Every score

- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 4.9 Medium `AV:L/AC:L/Au:N/C:N/I:N/A:C`

## References

- <https://lkml.org/lkml/2021/10/18/485> (exploit, third-party-advisory)
- <https://lkml.org/lkml/2021/9/6/781> (exploit, third-party-advisory)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2025938> (issue-tracking, third-party-advisory)

## Sources

- CVE List: [CVE-2021-4150](https://www.cve.org/CVERecord?id=CVE-2021-4150), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-4150](https://nvd.nist.gov/vuln/detail/CVE-2021-4150), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-4150 · Whole record: https://cve.day/CVE-2021-4150.json · Rebuilt by cve.day 2026-11-25T22:58:07.256Z
