# CVE-2022-50340: media: vimc: Fix wrong function called when vimc_init() fails

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `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.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-09-16T16:11:19.986Z
- Modified: 2026-06-17T05:23:16.087Z
- Weaknesses: CWE-617
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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

media: vimc: Fix wrong function called when vimc_init() fails

In vimc_init(), when platform_driver_register(&vimc_pdrv) fails,
platform_driver_unregister(&vimc_pdrv) is wrongly called rather than
platform_device_unregister(&vimc_pdev), which causes kernel warning:

 Unexpected driver unregister!
 WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driver_unregister+0x8f/0xb0
 RIP: 0010:driver_unregister+0x8f/0xb0
 Call Trace:
  <TASK>
  vimc_init+0x7d/0x1000 [vimc]
  do_one_initcall+0xd0/0x4e0
  do_init_module+0x1cf/0x6b0
  load_module+0x65c2/0x7820

(As written by CVE List.)

## Affected

- Linux Linux: from 4a29b70907496aa9da79112ec31cf9cf2b972c3f before 14d85b600bb1f6f8ef61fa8fc1907e2e623d8350; from 4a29b70907496aa9da79112ec31cf9cf2b972c3f before 9c9ff35d68691aaea85b2e93763772e23930b3a3; from 4a29b70907496aa9da79112ec31cf9cf2b972c3f before 681ac2902039d9b497b3ae18fdc204314979e61e; from 4a29b70907496aa9da79112ec31cf9cf2b972c3f before f38df8984ef1b45ba23888d0e232cc21a95bd04b; from 4a29b70907496aa9da79112ec31cf9cf2b972c3f before f74d3f326d1d5b8951ce263c59a121ecfa65e7c0; 4.13 (not affected: before 4.13; from 5.10.163 up to 5.10.*; from 5.15.86 up to 5.15.*; from 6.0.16 up to 6.0.*; from 6.1.2 up to 6.1.*; from 6.2 up to *)
- linux linux_kernel: from 4.13 before 5.10.163; from 5.11 before 5.15.86; from 5.16 before 6.0.16; from 6.1 before 6.1.2

## Every score

- CISA-ADP: 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:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/14d85b600bb1f6f8ef61fa8fc1907e2e623d8350> (patch)
- <https://git.kernel.org/stable/c/9c9ff35d68691aaea85b2e93763772e23930b3a3> (patch)
- <https://git.kernel.org/stable/c/681ac2902039d9b497b3ae18fdc204314979e61e> (patch)
- <https://git.kernel.org/stable/c/f38df8984ef1b45ba23888d0e232cc21a95bd04b> (patch)
- <https://git.kernel.org/stable/c/f74d3f326d1d5b8951ce263c59a121ecfa65e7c0> (patch)

## Sources

- CVE List: [CVE-2022-50340](https://www.cve.org/CVERecord?id=CVE-2022-50340), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50340](https://nvd.nist.gov/vuln/detail/CVE-2022-50340), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-50340 · Whole record: https://cve.day/CVE-2022-50340.json · Rebuilt by cve.day 2026-11-25T22:58:21.171Z
