CVE-2024-35813 in Linuxinfo

Summary

by MITRE • 05/17/2024

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

mmc: core: Avoid negative index with array access

Commit 4d0c8d0aef63 ("mmc: core: Use mrq.sbc in close-ended ffu") assigns prev_idata = idatas[i - 1], but doesn't check that the iterator i is
greater than zero. Let's fix this by adding a check.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 12/15/2025

This vulnerability resides within the linux kernel's multimedia card mmc core subsystem where a potential buffer overflow condition exists due to improper array bounds checking. The flaw manifests in the mmc core driver when processing certain mmc request sequences, specifically during the handling of fast firmware update operations. The vulnerability stems from a direct array index access pattern that does not validate the index bounds before use, creating an opportunity for unauthorized memory access patterns that could potentially lead to system instability or privilege escalation.

The technical implementation of this vulnerability occurs in the mmc core driver where the variable i serves as an array index for accessing idatas array elements. When the code executes prev_idata = idatas[i - 1], it assumes that i will always be greater than zero, but this assumption fails when i equals zero, resulting in a negative array index access. This type of error falls under the common category of buffer over-read conditions and can be classified as CWE-129, which represents insufficient validation of array index values. The vulnerability specifically impacts the mmc subsystem's handling of request queue management and data transfer operations.

The operational impact of this vulnerability extends beyond simple memory corruption as it could potentially allow attackers to manipulate the mmc subsystem's behavior during firmware updates or data transfers. When the mmc core driver encounters a scenario where i equals zero, the negative index access could result in reading from arbitrary memory locations, potentially exposing kernel memory contents or causing system crashes. This type of vulnerability aligns with ATT&CK technique T1068 which covers the use of local privilege escalation techniques through kernel vulnerabilities, and T1547.001 which involves the exploitation of kernel modules for privilege escalation.

The fix for this vulnerability requires implementing a simple bounds check before the array access operation, ensuring that the iterator i is greater than zero before performing the index calculation. This defensive programming approach prevents the negative array index access that would otherwise occur. The solution involves adding a conditional check that validates the index bounds before executing the assignment operation, thereby preventing the potential for unauthorized memory access patterns. This remediation approach follows established security best practices for preventing buffer overflow conditions and aligns with the principle of least privilege by ensuring that all memory access operations remain within valid bounds.

The vulnerability demonstrates the critical importance of proper bounds checking in kernel code, particularly in subsystems handling hardware interfaces where memory corruption can lead to system compromise. The mmc subsystem's design must account for all possible iteration scenarios and ensure that array access operations remain within valid memory boundaries. This particular flaw underscores the need for comprehensive testing of edge cases in kernel subsystems and highlights the potential for seemingly minor programming errors to create significant security risks. The fix represents a fundamental defensive programming measure that prevents unauthorized memory access patterns while maintaining the intended functionality of the mmc core driver.

Reservation

05/17/2024

Disclosure

05/17/2024

Moderation

accepted

CPE

ready

EPSS

0.00237

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!