CVE-2022-50340

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

State
Published
Severity
5.5 Medium
Published
Sep 16, 2025
Updated
May 11, 2026
Reserved
Sep 16, 2025

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 4a29b70907496aa9da79112ec31cf9cf2b972c3f to before 14d85b600bb1f6f8ef61fa8fc1907e2e623d8350Affected
  • 4a29b70907496aa9da79112ec31cf9cf2b972c3f to before 9c9ff35d68691aaea85b2e93763772e23930b3a3Affected
  • 4a29b70907496aa9da79112ec31cf9cf2b972c3f to before 681ac2902039d9b497b3ae18fdc204314979e61eAffected
  • 4a29b70907496aa9da79112ec31cf9cf2b972c3f to before f38df8984ef1b45ba23888d0e232cc21a95bd04bAffected
  • 4a29b70907496aa9da79112ec31cf9cf2b972c3f to before f74d3f326d1d5b8951ce263c59a121ecfa65e7c0Affected
LinuxLinux
  • 4.13Affected
  • before 4.13Not affected
  • 5.10.163 through 5.10.*Not affected
  • 5.15.86 through 5.15.*Not affected
  • 6.0.16 through 6.0.*Not affected
  • 6.1.2 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.