CVE Database›CVE-2024-42298

CVE-2024-42298

kernel: ASoC: fsl: fsl_qmc_audio: Check devm_kasprintf() returned value

Loading…

Severity

Moderate

Red Hat Product Security

5.5

CVSS 3.1

Review impact separately from score.

Published · August 17, 2024

Updated · June 26, 2026

Description

A vulnerability was found in the devm_kasprintf() function in the Linux kernel's fsl_qmc_audio driver. This function can return a NULL pointer if memory allocation fails, but the original code did not check for this possibility. This oversight could lead to dereferencing a NULL pointer, potentially causing crashes or undefined behavior. The fix involves adding a NULL check after the devm_kasprintf() call. If the returned pointer is NULL, an error message is logged, and the function returns an error code to prevent further use of the invalid pointer. This change enhances the robustness of the driver by handling memory allocation failures gracefully.

Statement

Red Hat Enterprise Linux is not vulnerable to this CVE, as it does not affect the versions or configurations of the Linux kernel used in its distributions.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CWE-476 · NULL Pointer Dereference