{"id":"CVE-2022-49830","state":"PUBLISHED","title":"drm/drv: Fix potential memory leak in drm_dev_init()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/drv: Fix potential memory leak in drm_dev_init()\n\ndrm_dev_init() will add drm_dev_init_release() as a callback. When\ndrmm_add_action() failed, the release function won't be added. As the\nresult, the ref cnt added by device_get() in drm_dev_init() won't be put\nby drm_dev_init_release(), which leads to the memleak. Use\ndrmm_add_action_or_reset() instead of drmm_add_action() to prevent\nmemleak.\n\nunreferenced object 0xffff88810bc0c800 (size 2048):\n  comm \"modprobe\", pid 8322, jiffies 4305809845 (age 15.292s)\n  hex dump (first 32 bytes):\n    e8 cc c0 0b 81 88 ff ff ff ff ff ff 00 00 00 00  ................\n    20 24 3c 0c 81 88 ff ff 18 c8 c0 0b 81 88 ff ff   $<.............\n  backtrace:\n    [<000000007251f72d>] __kmalloc+0x4b/0x1c0\n    [<0000000045f21f26>] platform_device_alloc+0x2d/0xe0\n    [<000000004452a479>] platform_device_register_full+0x24/0x1c0\n    [<0000000089f4ea61>] 0xffffffffa0736051\n    [<00000000235b2441>] do_one_initcall+0x7a/0x380\n    [<0000000001a4a177>] do_init_module+0x5c/0x230\n    [<000000002bf8a8e2>] load_module+0x227d/0x2420\n    [<00000000637d6d0a>] __do_sys_finit_module+0xd5/0x140\n    [<00000000c99fc324>] do_syscall_64+0x3f/0x90\n    [<000000004d85aa77>] entry_SYSCALL_64_after_hwframe+0x63/0xcd","publishedAt":"2025-05-01T14:09:48.918Z","updatedAt":"2026-05-11T19:07:35.805Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"c47a823ea186263ab69cfb665327b7f72cb5e779","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"07e56de8766fe5be67252596244b84ac0ec0de91","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"bd8d1335e6e70a396094ef98913b513140c0b86b","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"ff963634f7b2e0dc011349abb3fb81a0d074f443","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/drm_drv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.156","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.80","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/drm_drv.c"]}],"references":["https://git.kernel.org/stable/c/c47a823ea186263ab69cfb665327b7f72cb5e779","https://git.kernel.org/stable/c/07e56de8766fe5be67252596244b84ac0ec0de91","https://git.kernel.org/stable/c/bd8d1335e6e70a396094ef98913b513140c0b86b","https://git.kernel.org/stable/c/ff963634f7b2e0dc011349abb3fb81a0d074f443"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49830.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49830","state":"PUBLISHED","datePublished":"2025-05-01T14:09:48.918Z","dateUpdated":"2026-05-11T19:07:35.805Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-05-01T14:05:17.228Z"},"containers":{"cna":{"title":"drm/drv: Fix potential memory leak in drm_dev_init()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/drv: Fix potential memory leak in drm_dev_init()\n\ndrm_dev_init() will add drm_dev_init_release() as a callback. When\ndrmm_add_action() failed, the release function won't be added. As the\nresult, the ref cnt added by device_get() in drm_dev_init() won't be put\nby drm_dev_init_release(), which leads to the memleak. Use\ndrmm_add_action_or_reset() instead of drmm_add_action() to prevent\nmemleak.\n\nunreferenced object 0xffff88810bc0c800 (size 2048):\n  comm \"modprobe\", pid 8322, jiffies 4305809845 (age 15.292s)\n  hex dump (first 32 bytes):\n    e8 cc c0 0b 81 88 ff ff ff ff ff ff 00 00 00 00  ................\n    20 24 3c 0c 81 88 ff ff 18 c8 c0 0b 81 88 ff ff   $<.............\n  backtrace:\n    [<000000007251f72d>] __kmalloc+0x4b/0x1c0\n    [<0000000045f21f26>] platform_device_alloc+0x2d/0xe0\n    [<000000004452a479>] platform_device_register_full+0x24/0x1c0\n    [<0000000089f4ea61>] 0xffffffffa0736051\n    [<00000000235b2441>] do_one_initcall+0x7a/0x380\n    [<0000000001a4a177>] do_init_module+0x5c/0x230\n    [<000000002bf8a8e2>] load_module+0x227d/0x2420\n    [<00000000637d6d0a>] __do_sys_finit_module+0xd5/0x140\n    [<00000000c99fc324>] do_syscall_64+0x3f/0x90\n    [<000000004d85aa77>] entry_SYSCALL_64_after_hwframe+0x63/0xcd"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"c47a823ea186263ab69cfb665327b7f72cb5e779","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"07e56de8766fe5be67252596244b84ac0ec0de91","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"bd8d1335e6e70a396094ef98913b513140c0b86b","versionType":"git"},{"version":"2cbf7fc6718b9443ecd6261308c6348d8ffcccae","status":"affected","lessThan":"ff963634f7b2e0dc011349abb3fb81a0d074f443","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/drm_drv.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"5.10.156","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.80","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.10","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/gpu/drm/drm_drv.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c47a823ea186263ab69cfb665327b7f72cb5e779"},{"url":"https://git.kernel.org/stable/c/07e56de8766fe5be67252596244b84ac0ec0de91"},{"url":"https://git.kernel.org/stable/c/bd8d1335e6e70a396094ef98913b513140c0b86b"},{"url":"https://git.kernel.org/stable/c/ff963634f7b2e0dc011349abb3fb81a0d074f443"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:07:35.805Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.10.156"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"5.15.80"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.0.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}