CVE-2023-53607

Description

An assertion failure was found in the Linux kernel's Yamaha YMF sound card driver during buffer validation. The probe function includes a BUG_ON assertion that compares DMA buffer sizes without accounting for alignment, causing the assertion to fail when the aligned buffer size doesn't exactly match the requested size. This triggers a kernel warning and can lead to driver initialization failure and denial of service.

Statement

The YMF PCI sound driver allocates DMA buffers for audio operations during device probe. Recent changes to the DMA buffer allocation code made the bytes field reflect the aligned buffer size rather than the exact requested size—this ensures proper memory alignment for DMA operations. However, the snd_ymfpci_create function contains a snd_BUG_ON check that asserts the allocated size exactly matches the requested size. With the new alignment behavior, buffers are typically rounded up to page or cache-line boundaries, causing the sizes to differ slightly. When this happens, the assertion fires, producing kernel warnings and potentially failing driver initialization. While primarily a debug check rather than actual memory corruption, on systems with panic-on-warn enabled or depending on driver initialization behavior, this could prevent the sound card from functioning at all.

Mitigation

To mitigate this issue, prevent the snd_ymfpci module from being loaded. See https://access.redhat.com/solutions/41278 for instructions on blacklisting kernel modules.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.55.5N/A
Attack VectorLocalLocalN/A
Attack ComplexityLowLowN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactNoneNoneN/A
Availability ImpactHighHighN/A

Vector

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

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

Understanding the Weakness (CWE)

Integrity,Availability,Confidentiality

Technical Impact: DoS: Crash, Exit, or Restart; Execute Unauthorized Code or Commands; Read Memory; Modify Memory

If the incorrect calculation is used in the context of memory allocation, then the software may create a buffer that is smaller or larger than expected. If the allocated buffer is smaller than expected, this could lead to an out-of-bounds read or write (CWE-119), possibly causing a crash, allowing arbitrary code execution, or exposing sensitive data.

Frequently Asked Questions

Want to get errata notifications? Sign up here.