CVE-2022-50846
Unknown Unknown - Not Provided

Null Pointer Dereference in Linux mmc_add_host() Causes Kernel Crash

Vulnerability report for CVE-2022-50846, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2025-12-30

Last updated on: 2025-12-30

Assigner: kernel.org

Description

In the Linux kernel, the following vulnerability has been resolved: mmc: via-sdmmc: fix return value check of mmc_add_host() mmc_add_host() may return error, if we ignore its return value, it will lead two issues: 1. The memory that allocated in mmc_alloc_host() is leaked. 2. In the remove() path, mmc_remove_host() will be called to delete device, but it's not added yet, it will lead a kernel crash because of null-ptr-deref in device_del(). Fix this by checking the return value and goto error path which will call mmc_free_host().

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2025-12-30
Last Modified
2025-12-30
Generated
2026-07-06
AI Q&A
2025-12-30
EPSS Evaluated
2026-07-05
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability occurs in the Linux kernel's mmc subsystem, specifically in the via-sdmmc driver. The function mmc_add_host() may return an error, but if its return value is ignored, two problems arise: first, memory allocated by mmc_alloc_host() is leaked; second, during device removal, mmc_remove_host() is called on a device that was never successfully added, causing a kernel crash due to a null pointer dereference in device_del(). The fix involves properly checking the return value of mmc_add_host() and handling errors by freeing allocated memory.

Impact Analysis

This vulnerability can lead to memory leaks and kernel crashes on affected Linux systems using the via-sdmmc driver. The kernel crash caused by a null pointer dereference can result in system instability or denial of service, potentially disrupting normal operations.

Mitigation Strategies

To mitigate this vulnerability, update the Linux kernel to a version where the mmc: via-sdmmc driver includes the fix for checking the return value of mmc_add_host(). This prevents memory leaks and kernel crashes caused by null pointer dereferences. Until the update is applied, avoid using affected MMC devices if possible.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2022-50846. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart