{"schema_version":"1.9.0","id":"CVE-2022-50340","published":"2025-09-16T16:11:19.986Z","modified":"2026-08-12T03:51:24.990889185Z","related":["SUSE-SU-2025:03615-1","SUSE-SU-2025:03628-1","SUSE-SU-2025:3716-1","SUSE-SU-2025:3761-1"],"summary":"media: vimc: Fix wrong function called when vimc_init() fails","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vimc: Fix wrong function called when vimc_init() fails\n\nIn vimc_init(), when platform_driver_register(&vimc_pdrv) fails,\nplatform_driver_unregister(&vimc_pdrv) is wrongly called rather than\nplatform_device_unregister(&vimc_pdev), which causes kernel warning:\n\n Unexpected driver unregister!\n WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driver_unregister+0x8f/0xb0\n RIP: 0010:driver_unregister+0x8f/0xb0\n Call Trace:\n  <TASK>\n  vimc_init+0x7d/0x1000 [vimc]\n  do_one_initcall+0xd0/0x4e0\n  do_init_module+0x1cf/0x6b0\n  load_module+0x65c2/0x7820","affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4a29b70907496aa9da79112ec31cf9cf2b972c3f"},{"fixed":"14d85b600bb1f6f8ef61fa8fc1907e2e623d8350"},{"fixed":"9c9ff35d68691aaea85b2e93763772e23930b3a3"},{"fixed":"681ac2902039d9b497b3ae18fdc204314979e61e"},{"fixed":"f38df8984ef1b45ba23888d0e232cc21a95bd04b"},{"fixed":"f74d3f326d1d5b8951ce263c59a121ecfa65e7c0"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50340.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.13.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50340.json"}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/14d85b600bb1f6f8ef61fa8fc1907e2e623d8350"},{"type":"WEB","url":"https://git.kernel.org/stable/c/681ac2902039d9b497b3ae18fdc204314979e61e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9c9ff35d68691aaea85b2e93763772e23930b3a3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f38df8984ef1b45ba23888d0e232cc21a95bd04b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f74d3f326d1d5b8951ce263c59a121ecfa65e7c0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50340.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50340"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50340.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}