# CVE-2022-50269: drm/vkms: Fix memory leak in vkms\_init()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-09-15T14:21:05.485Z
- **Modified:** 2026-11-05T20:17:31.020Z

## Who should check

- Anyone running Linux \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bad13de764888b765ceaa4668893b52bd16653cc; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bebd60ec3bf21062f103e32e6203c6daabdbd51b; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 07ab77154d6fd2d67e465ab5ce30083709950f02; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 0d0b368b9d104b437e1f4850ae94bdb9a3601e89
- Anyone running Linux 5.12

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/vkms: Fix memory leak in vkms\_init()

A memory leak was reported after the vkms module install failed.

unreferenced object 0xffff88810bc28520 (size 16):
  comm "modprobe", pid 9662, jiffies 4298009455 (age 42.590s)
  hex dump (first 16 bytes):
    01 01 00 64 81 88 ff ff 00 00 dc 0a 81 88 ff ff  ...d............
  backtrace:
    \[\<00000000e7561ff8\>\] kmalloc\_trace+0x27/0x60
    \[\<000000000b1954a0\>\] 0xffffffffc45200a9
    \[\<00000000abbf1da0\>\] do\_one\_initcall+0xd0/0x4f0
    \[\<000000001505ee87\>\] do\_init\_module+0x1a4/0x680
    \[\<00000000958079ad\>\] load\_module+0x6249/0x7110
    \[\<00000000117e4696\>\] \_\_do\_sys\_finit\_module+0x140/0x200
    \[\<00000000f74b12d2\>\] do\_syscall\_64+0x35/0x80
    \[\<000000008fc6fcde\>\] entry\_SYSCALL\_64\_after\_hwframe+0x46/0xb0

The reason is that the vkms\_init() returns without checking the return
value of vkms\_create(), and if the vkms\_create() failed, the config
allocated at the beginning of vkms\_init() is leaked.

 vkms\_init()
   config = kmalloc(...) \# config allocated
   ...
   return vkms\_create() \# vkms\_create failed and config is leaked

Fix this problem by checking return value of vkms\_create() and free the
config if error happened.

## Affected and fixed versions

- Linux: \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bad13de764888b765ceaa4668893b52bd16653cc; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bebd60ec3bf21062f103e32e6203c6daabdbd51b; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 07ab77154d6fd2d67e465ab5ce30083709950f02; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 0d0b368b9d104b437e1f4850ae94bdb9a3601e89 (cvelist)
- Linux: 5.12 (cvelist)

## Mitigation

- Upgrade Linux to 0d0b368b9d104b437e1f4850ae94bdb9a3601e89 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50269. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50269.md
Affected: Linux >= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, < bad13de764888b765ceaa4668893b52bd16653cc; >= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, < bebd60ec3bf21062f103e32e6203c6daabdbd51b; >= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, < 07ab77154d6fd2d67e465ab5ce30083709950f02; >= 2df7af93fdadb9ba8226fe4…
Fixed in: Linux 07ab77154d6fd2d67e465ab5ce30083709950f02, Linux 0d0b368b9d104b437e1f4850ae94bdb9a3601e89

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50269 being exploited?

There is no confirmed exploitation: CVE-2022-50269 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50269?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bad13de764888b765ceaa4668893b52bd16653cc; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< bebd60ec3bf21062f103e32e6203c6daabdbd51b; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 07ab77154d6fd2d67e465ab5ce30083709950f02; \>= 2df7af93fdadb9ba8226fe443fae15ecdefda2a6, \< 0d0b368b9d104b437e1f4850ae94bdb9a3601e89; Linux 5.12.

### Is there a fix for CVE-2022-50269?

Yes. Fixed in Linux 07ab77154d6fd2d67e465ab5ce30083709950f02, Linux 0d0b368b9d104b437e1f4850ae94bdb9a3601e89. Upgrade Linux to 0d0b368b9d104b437e1f4850ae94bdb9a3601e89 or later.

### How do I check if I'm affected by CVE-2022-50269?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/bad13de764888b765ceaa4668893b52bd16653cc>
- patch: <https://git.kernel.org/stable/c/bebd60ec3bf21062f103e32e6203c6daabdbd51b>
- patch: <https://git.kernel.org/stable/c/07ab77154d6fd2d67e465ab5ce30083709950f02>
- patch: <https://git.kernel.org/stable/c/0d0b368b9d104b437e1f4850ae94bdb9a3601e89>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50269>

HTML: <https://flawdb.com/CVE-2022-50269> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50269>
