CVE-2022-50340

Source
https://cve.org/CVERecord?id=CVE-2022-50340
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50340.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50340
Downstream
Related
Published
2025-09-16T16:11:19.986Z
Modified
2026-07-15T01:49:06.058291575Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
media: vimc: Fix wrong function called when vimc_init() fails
Details

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

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

In vimcinit(), when platformdriverregister(&vimcpdrv) fails, platformdriverunregister(&vimcpdrv) is wrongly called rather than platformdeviceunregister(&vimcpdev), which causes kernel warning:

Unexpected driver unregister! WARNING: CPU: 1 PID: 14517 at drivers/base/driver.c:270 driverunregister+0x8f/0xb0 RIP: 0010:driverunregister+0x8f/0xb0 Call Trace: <TASK> vimcinit+0x7d/0x1000 [vimc] dooneinitcall+0xd0/0x4e0 doinitmodule+0x1cf/0x6b0 loadmodule+0x65c2/0x7820

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50340.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

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"

Linux / Kernel

Package

Name
Kernel

Affected 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"