CVE-2022-49857 in Linuxinfo

Summary

by MITRE • 05/01/2025

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

net: marvell: prestera: fix memory leak in prestera_rxtx_switch_init()

When prestera_sdma_switch_init() failed, the memory pointed to by sw->rxtx isn't released. Fix it. Only be compiled, not be tested.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 03/14/2026

The vulnerability identified as CVE-2022-49857 resides within the Linux kernel's networking subsystem, specifically affecting the marvell prestera driver implementation. This issue manifests as a memory leak condition that occurs during the initialization process of network switch hardware components. The affected driver is part of the Marvell Prestera family of network switch drivers that manage hardware switch fabrics in various networking equipment. The vulnerability is categorized under the Common Weakness Enumeration framework as CWE-401, which represents "Improper Release of Memory Before Removing Last Reference" and falls within the broader category of memory management flaws that can lead to resource exhaustion vulnerabilities.

The technical flaw occurs within the prestera_rxtx_switch_init() function where the driver attempts to initialize receive and transmit hardware components for network switch operations. When the prestera_sdma_switch_init() function fails during the initialization sequence, the memory allocation associated with the sw->rxtx pointer is not properly released back to the system. This represents a classic resource leak scenario where allocated memory remains allocated even though the initialization process has failed and the driver cannot proceed with normal operation. The failure condition typically occurs when hardware initialization encounters errors such as missing hardware resources, incorrect register configurations, or other initialization failures that prevent proper device setup.

The operational impact of this memory leak vulnerability extends beyond simple resource consumption, as it can lead to progressive system degradation and potential system instability. While the leak is relatively small in scope, repeated initialization failures can accumulate over time, causing memory fragmentation and eventually leading to system memory exhaustion. This vulnerability affects systems that utilize Marvell Prestera network switch hardware, particularly those implementing SDMA (Scatter-Gather DMA) functionality for network packet processing. The issue is particularly concerning in embedded networking equipment, network switches, and routers where memory resources are constrained and continuous operation is critical. The vulnerability can be exploited by attackers who can trigger repeated initialization failures through malformed network traffic or by manipulating the hardware initialization sequence.

Mitigation strategies for CVE-2022-49857 involve both immediate and long-term approaches to address the memory leak. The primary fix is to ensure proper memory cleanup in the error handling path of the prestera_rxtx_switch_init() function, specifically ensuring that when prestera_sdma_switch_init() fails, the sw->rxtx memory allocation is properly freed before the function returns. System administrators should ensure their Linux kernel versions include the patched implementation, which typically involves applying the relevant kernel security patch from the official kernel release. Additionally, monitoring systems should be implemented to track memory usage patterns and detect potential resource exhaustion conditions that may result from such memory leaks. The fix aligns with ATT&CK framework technique T1499.001, which covers "Resource Exhaustion" by ensuring proper memory management and preventing accumulation of leaked resources that could lead to system resource exhaustion. Organizations should also consider implementing automated monitoring and alerting systems to detect unusual memory consumption patterns that might indicate the presence of such memory leaks in production environments.

Responsible

Linux

Reservation

05/01/2025

Disclosure

05/01/2025

Moderation

accepted

CPE

ready

EPSS

0.00165

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!