CVE-2022-49830

drm/drv: Fix potential memory leak in drm_dev_init()

MEDIUM
5.5
CVSS Score
Published: May 1, 2025 at 02:09 PM UTC
Updated: June 17, 2026 at 05:19 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: drm/drv: Fix potential memory leak in drm_dev_init() drm_dev_init() will add drm_dev_init_release() as a callback. When drmm_add_action() failed, the release function won't be added. As the result, the ref cnt added by device_get() in drm_dev_init() won't be put by drm_dev_init_release(), which leads to the memleak. Use drmm_add_action_or_reset() instead of drmm_add_action() to prevent memleak. unreferenced object 0xffff88810bc0c800 (size 2048): comm "modprobe", pid 8322, jiffies 4305809845 (age 15.292s) hex dump (first 32 bytes): e8 cc c0 0b 81 88 ff ff ff ff ff ff 00 00 00 00 ................ 20 24 3c 0c 81 88 ff ff 18 c8 c0 0b 81 88 ff ff $<............. backtrace: [<000000007251f72d>] __kmalloc+0x4b/0x1c0 [<0000000045f21f26>] platform_device_alloc+0x2d/0xe0 [<000000004452a479>] platform_device_register_full+0x24/0x1c0 [<0000000089f4ea61>] 0xffffffffa0736051 [<00000000235b2441>] do_one_initcall+0x7a/0x380 [<0000000001a4a177>] do_init_module+0x5c/0x230 [<000000002bf8a8e2>] load_module+0x227d/0x2420 [<00000000637d6d0a>] __do_sys_finit_module+0xd5/0x140 [<00000000c99fc324>] do_syscall_64+0x3f/0x90 [<000000004d85aa77>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11 ≤ v < 5.15.805.16 ≤ v < 6.0.105.8 ≤ v < 5.10.1565.8 ≤ v < 5.15.805.8 ≤ v < 6.0.105.8 ≤ v < 6.12cbf7fc6718b9443ecd6261308c6348d8ffcccae5.86.1 rc16.1 rc26.1 rc36.1 rc46.1 rc5
Vendor states this is fixed in 07e56de8766fe5be67252596244b84ac0ec0de91 (fixed)
Vendor states this is fixed in bd8d1335e6e70a396094ef98913b513140c0b86b (fixed)
Vendor states this is fixed in c47a823ea186263ab69cfb665327b7f72cb5e779 (fixed)
Vendor states this is fixed in ff963634f7b2e0dc011349abb3fb81a0d074f443 (fixed)
Vendor states this is fixed in 5.10.156 (unaffected)
Vendor states this is fixed in 5.15.80 (unaffected)
Vendor states this is fixed in 5.8 (unaffected)
Vendor states this is fixed in 6.0.10 (unaffected)
Vendor states this is fixed in 6.1 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/07e56de8766fe5be67252596244b84ac0ec0de91
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bd8d1335e6e70a396094ef98913b513140c0b86b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c47a823ea186263ab69cfb665327b7f72cb5e779
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ff963634f7b2e0dc011349abb3fb81a0d074f443

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card